You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Pete Long <Pe...@gmail.com> on 2014/06/23 14:50:30 UTC

Unable to get WS-Addressing working

Hi

I am trying to send a web service call into my endpoint via soapUI with
WS-Addressing enabled. 

I get an error reported when I send the soapUI reqest.

The request I send is :-

   <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" 
xmlns:wsa="http://www.w3.org/2005/08/addressing/">
      <soap:Header>
         <wsa:MessageID>http://example.com/someuniquestring</wsa:MessageID>
         <wsa:To>http://example.com/fabrikam/Purchasing</wsa:To>
         <wsa:Action>http://example.com/fabrikam/SubmitPO</wsa:Action>
      </soap:Header>

      <soap:Body>

      </soap:Body>
   </soap:Envelope>


Response is 
   <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:addr="http://schemas.xmlsoap.org/ws/2004/08/addressing">
      <env:Body>
         <env:Fault>
            <env:Code>
               <env:Value
xmlns:ns1="http://www.w3.org/2005/08/addressing">ns1:MessageAddressingHeaderRequired</env:Value>
            </env:Code>
            <env:Reason>
               <env:Text xml:lang="en">A required header representing a
Message Addressing Property is not present   </env:Text>
                </env:Reason>
         </env:Fault>
      </env:Body>
   </env:Envelope>


Also I am getting the following reported in my log file :-

     WARN org.apache.cxf.ws.addressing.ContextUtils 443 | WS-Addressing -
failed to retrieve Message   Addressing Properties from context


This is what I have done to configure/enable WS-Addressing on the web
service :-

1) Updated wsdl to introduce the following to the wsdl:binding element
     <wsaw:UsingAddressing wsdl:required="true" /> 

as shown here -
http://docs.oracle.com/cd/E24329_01/web.1211/e24965/wsaddressing.htm#CEGFHIJA

2) Updated my web service implementation class with the following annotation 
   @Addressing(enabled = true, required = true)

as shown here -
http://docs.oracle.com/cd/E24329_01/web.1211/e24965/wsaddressing.htm#CEGGHCBE


3) Updated my applicationContext file with the following

   <jaxws:endpoint id="myEndPoint">  
            <jaxws:features>    <wsa:addressing
xmlns:wsa="http://cxf.apache.org/ws/addressing"/>       
            </jaxws:features>
   </jaxws:endpoint> 


I am using CXF 2.7.5.

Any help/suggestion to overcome the soapUI error that is returned would be
appreciated.

Thank you.

Pete





--
View this message in context: http://cxf.547215.n5.nabble.com/Unable-to-get-WS-Addressing-working-tp5745490.html
Sent from the cxf-dev mailing list archive at Nabble.com.