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

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


    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. (?)

     Could not handle mustUnderstand headers: {}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.

    public class AbstractAddressingVersion ....
     public final boolean understands(SoapHeaderElement headerElement) {
            return getNamespaceUri().equals(headerElement.getName().getNamespaceURI());
    I am not expecting FALSE here. --> The value comparison "" Equals "".

    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 !