Announcement Announcement Module
Collapse
No announcement yet.
Spring WS is mixing up WSSE namespace with the WS Addressing namespace Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring WS is mixing up WSSE namespace with the WS Addressing namespace

    Hi

    I need to implement a webservice with WSSE and WSAddressing support.
    Since I am using WSSE encryption on the SOAP Body element level, I could not use the @PayloadRoot because Spring would not find the mapped endpointmethod. So I had to come up with another alternative, i.e. one which is advised in the forum: make use of the SOAPAction to directly route your message to the intended method, i.e. by using/setting the SOAPAction HTTP header. In addition, I annotated my method with @SOAPAction("<some URI>").
    Fortunately, this worked for me UNTIL I came to the next step in my requirementlist, that is to include WSAddressing.

    Since WSAddressing achieves the same effect with respect to the mapping of the SOAPAction to the method, I replaced my @PayloadRoot with @Action. (By the way: I am also using DOM element instances in my method and therefore I am using the annotations @ResponsePayload and @RequestPayload in order to bind the payload to my java variables.)

    Coming back to WS Addressing:
    When my client (SOAPUI) is sending in SOAP request with WSSE (timestamp, signing and encryption) and WSAddressing as "mustUnderstand" SOAP headers, I get an error / soapfault. (?)

    Code:
     Could not handle mustUnderstand headers: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security. Returning fault
    After debugging in Spring WS code I discovered that for some reason AbstractAddressingVersion.understands(SoapHeaderEl ement headerElement) is evaluating to false because
    it is comparing its WS Addressing NAMESPACE URI with WSSE NAMESPACE URI ! ???? Therefore the evaluation result is FALSE.

    Code:
    public class AbstractAddressingVersion ....
    ...
     public final boolean understands(SoapHeaderElement headerElement) {
            return getNamespaceUri().equals(headerElement.getName().getNamespaceURI());
        }
    ...
    I am not expecting FALSE here. --> The value comparison "http://www.w3.org/2005/08/addressing" Equals "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd".

    I see a mix up here?
    Is this a bug?
    This is blocking at the moment. Eager to get some reactions.

    Kind Regards

  • #2
    I have EXACTLY the SAME problem !

    Comment

    Working...
    X