7 Replies Latest reply on Jun 27, 2018 11:49 PM by tbh_8772

    SOAP Header Action mustUnderstand Exception

    canastasiou

      We are trying to create a web service that will participate in 2PC. We have an annoying exception concerning Action tag in the Header of the SOAP message.

       

      SOAP message sent:

       

      <s:Envelope xmlns:a="http://www.w3.org/2005/05/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
       <s:Header>
        <a:Action s:mustUnderstand="1">createBankAccountTransfer</a:Action> 
        <a:MessageID>urn:uuid:123456aa4-c9f7-44a1-b761-49f0742s33e6</a:MessageID> 
       <a:ReplyTo>
        <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address> 
        </a:ReplyTo>
        </s:Header>
       <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <createBankAccountTransfer xmlns="http://ejb.company.com.cy/">
        <username xmlns="">username</username> 
        <password xmlns="">password</password> 
        <requestXML xmlns=""></requestXML> 
        </createBankAccountTransfer>
        </s:Body>
        </s:Envelope>
      

       

      Exception thrown from JBoss:

       

      15:21:18,656 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
      javax.xml.ws.soap.SOAPFaultException: Unprocessed 'mustUnderstand' header element: {http://www.w3.org/2005/05/addressing}Action
          at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:84)
          at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:107)
          at org.jboss.ws.core.CommonSOAP11Binding.verifyUnderstoodHeader(CommonSOAP11Binding.java:86)
          at org.jboss.ws.core.CommonSOAPBinding.checkMustUnderstand(CommonSOAPBinding.java:962)
          at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:194)
          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
          at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
          at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:595)
      

       

      Setting "mustUnderstand" to 0 solves the issue, but we do not have access to the client code, so we must solve it from our side. I have been searching for a solution for days, but noone gives a clear solution, or at least the use of <Action> and how to process it.