質問

I am working with an Oracle 11g database (thus JDK 1.5) and trying to call a webservice with SOAP. I have to use ws-security, so I followed this documentation: http://docs.oracle.com/cd/E15523_01/security.1111/e10037/wss.htm

I did everything in the document, but when I try to set the WsuID on the X509BinarySecurityToken by using the setWsuID method, I get an AbstractMethodError with the following stacktrace:

org.apache.axis.SOAPPart.getUserData(Ljava/lang/String;)Ljava/lang/Object;
oracle.security.xmlsec.util.IDCache.getIdCache(IDCache.java:139)
oracle.security.xmlsec.util.IDCache.addToIDCache(IDCache.java:199)
oracle.security.xmlsec.wss.util.WSSUtils.addWsuIdToElement(WSSUtils.java:476)
oracle.security.xmlsec.wss.WSSElement.setWsuId(WSSElement.java:107)
Discimus.generateSoapMessage(Discimus.java:162)

The code where it happens:

X509BinarySecurityToken x509token = ws.createBST_X509((X509Certificate)certificate);
x509token.setWsuId("MyCert");
ws.addX509CertificateToken(x509token);

Everything works perfectly when I try to run the code using JDK 1.7, so I'm guessing it has be a library thing? The org.apache.axis.SOAPPart file is in axis.jar, which inherits the getUserData method from org.w3c.dom.Node (http://www.docjar.com/docs/api/org/apache/axis/SOAPPart.html).

Does anybody have any idea where I can look, or where it goes wrong? I tried using other versions of axis.jar, but I still get the same error.

Thanks in advance!

役に立ちましたか?

解決

As suspected (and found when googling the AbstractMethodError on org.w3c.dom.Node), it was a library issue: using saaj-impl and saaj-api did the trick

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top