2 Replies Latest reply on Jul 22, 2008 11:39 AM by Darran Lofthouse

    JBWS-2234 - SOAP 1.2 JAX-RPC Endpoint sends SOAP 1.1 message

    Darran Lofthouse Master

      I am currently working on continuing the following Jira issue and adding a full test case: -

      http://jira.jboss.com/jira/browse/JBWS-2234

      I am now seeing that requests are correctly received as SOAP 1.2 and the response is being correctly sent back as SOAP 1.2 but for both checked and unchecked exceptions these are being sent back as SOAP 1.1.

      Looking at the classes CommonSOAPBinding and CommonSOAP12Binding these both create a MessageFactoryImpl with the correct envelope namespace so messages created by these are now correct.

      However the SOAPFaults are created by a different utility: -

      SOAPFaultHelperJAXRPC and SOAPFaultHelperJAXWS - both of these create a new MessageFactoryImpl with the default envelope namespace so default to SOAP 1.1.

      I did start to think that both of these should have the CommonSOAPBinding passed in and that the could use that to create the message so it will correctly reflect SOAP 1.2 and 1.1 as required.

      For the JAX-RPC implementation this would be fine but when JAX-WS is added there are further calls to cope with that make this impossible.

      The SOAPFaultHelperJAXWS calls the SOAPFaultHelperJAXRPC so anything required for JAX-RPC needs to be present from JAX-WS.

      The SOAPFaultHelperJAXWS can also be called from the following classes: -
      MessageBinding
      PayloadBinding
      HandlerChainExecutor

      These no longer extend the CommonSOAPBinding so this is not something we can pass in.

      A couple of ideas I have thought of.
      - Anything that calls either of the FaultHelper classes should pass in the correct MessageFactoryImpl
      - The CommonBinding interface could have a createMessage method added and then CommonBinding is passed in for the calls.

      Either of these might be options but things get slightly more complicated with the HandlerChainExecutor as the CommonBinding is not available there.

      Are there any further thoughts on the correct envelope namespace being made available for all faults created using either FaultHelper?