<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    SOAP Header Action mustUnderstand Exception
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/canastasiou">canastasiou</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/585928#585928">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>SOAP message sent:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><span>&lt;s:Envelope xmlns:a="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/05/addressing" target="_blank">http://www.w3.org/2005/05/addressing</a><span>" xmlns:s="</span><a class="jive-link-external-small" href="http://www.w3.org/2003/05/soap-envelope" target="_blank">http://www.w3.org/2003/05/soap-envelope</a><span>"&gt;</span></span>
 <span class="jive-xml-tag">&lt;s:Header&gt;</span>
&#160; <span class="jive-xml-tag">&lt;a:Action s:mustUnderstand="1"&gt;</span>createBankAccountTransfer<span class="jive-xml-tag">&lt;/a:Action&gt;</span> 
&#160; <span class="jive-xml-tag">&lt;a:MessageID&gt;</span>urn:uuid:123456aa4-c9f7-44a1-b761-49f0742s33e6<span class="jive-xml-tag">&lt;/a:MessageID&gt;</span> 
 <span class="jive-xml-tag">&lt;a:ReplyTo&gt;</span>
&#160; <span class="jive-xml-tag">&lt;a:Address&gt;</span>http://www.w3.org/2005/08/addressing/anonymous<span class="jive-xml-tag">&lt;/a:Address&gt;</span> 
&#160; <span class="jive-xml-tag">&lt;/a:ReplyTo&gt;</span>
&#160; <span class="jive-xml-tag">&lt;/s:Header&gt;</span>
 <span class="jive-xml-tag"><span>&lt;s:Body xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>" xmlns:xsd="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a><span>"&gt;</span></span>
 <span class="jive-xml-tag"><span>&lt;createBankAccountTransfer xmlns="</span><a class="jive-link-external-small" href="http://ejb.company.com.cy/" target="_blank">http://ejb.company.com.cy/</a><span>"&gt;</span></span>
&#160; <span class="jive-xml-tag">&lt;username xmlns=""&gt;</span>username<span class="jive-xml-tag">&lt;/username&gt;</span> 
&#160; <span class="jive-xml-tag">&lt;password xmlns=""&gt;</span>password<span class="jive-xml-tag">&lt;/password&gt;</span> 
&#160; <span class="jive-xml-tag">&lt;requestXML xmlns=""&gt;</span><span class="jive-xml-tag">&lt;/requestXML&gt;</span> 
&#160; <span class="jive-xml-tag">&lt;/createBankAccountTransfer&gt;</span>
&#160; <span class="jive-xml-tag">&lt;/s:Body&gt;</span>
&#160; <span class="jive-xml-tag">&lt;/s:Envelope&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Exception thrown from JBoss:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">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
&#160;&#160;&#160; at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:84)
&#160;&#160;&#160; at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:107)
&#160;&#160;&#160; at org.jboss.ws.core.CommonSOAP11Binding.verifyUnderstoodHeader(CommonSOAP11Binding.java:86)
&#160;&#160;&#160; at org.jboss.ws.core.CommonSOAPBinding.checkMustUnderstand(CommonSOAPBinding.java:962)
&#160;&#160;&#160; at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:194)
&#160;&#160;&#160; at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
&#160;&#160;&#160; at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
&#160;&#160;&#160; at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
&#160;&#160;&#160; at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
&#160;&#160;&#160; at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
&#160;&#160;&#160; at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&#160;&#160;&#160; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:595)
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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 &lt;Action&gt; and how to process it.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/585928#585928">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>