You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by "Baker, Richard" <Ri...@solers.com> on 2004/05/23 06:46:52 UTC

issue with SOAP version detection in WSS4J

I had the following issue occur with WSS4J:
WSS4J was trying to verify a message whose Envelope, Header, and Body were
in the SOAP 1.1 namespace.  A declaration of the SOAP 1.2 namespace did
appear in the attributes of the Envelope.  (The message came from a WASP 5.0
Beta service that imported the WS-Eventing schema.  The WS-Eventing schema
imports the SOAP 1.2 schema because it specifies the SOAP 1.2 role, actor,
and mustUnderstand attributes in its SubscriptionEnd message.)  When WSS4J
tried to verify the signature of this message, it threw a
ResourceNotFoundException saying that the Body element could not be found.
I used IntelliJ IDEA to step through the WSS4J processing, and I found that
the reason for this was because WSS4J was trying to find the Body in the
SOAP 1.2 namespace (when in fact the Body was really in the SOAP 1.1
namespace).  Tracing it a little further, I found that this occurred because
WSS4J saw the declaration for the SOAP 1.2 namespace in the attributes of
the Envelope, and because of this it loaded the SOAP12_Constants instead of
the SOAP11_Constants.

Perhaps a better way of determining what version of SOAP_Constants to load
when processing a message would be to call getNamespaceURI() on the Envelope
element.