• Post Reply Bookmark Topic Watch Topic
  • New Topic

CXF Client and WS-Addressing attributes  RSS feed

 
Monica Valverde
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys, I've been spending too many hours trying to find a solution but to no avail. I need to implement a client side code using CXF that invokes webservice asynchronously and sends ws-addressing values in the request, but the code I've created so far is not including them in the SOAP header.

Here's my client-side code:



The server-side code I have for testing purposes is the following:

CxfAdd.java:



CxfAddImpl.java:



When running my client-side code, in the server-side I get the following error:


INFO: Inbound Message
----------------------------
ID: 46
Address: http://localhost:8080/CxfAddressingServer/services/cxfadd
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml; charset=UTF-8
Headers: {Accept=[*/*], cache-control=[no-cache], connection=[keep-alive], Content-Length=[211], content-type=[text/xml; charset=UTF-8], host=[localhost:8080], pragma=[no-cache], SOAPAction=[""], user-agent=[Apache CXF 3.1.3]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:myMethodOneWay xmlns:ns2="http://test.com/wsdl"><arg0>Input message</arg0></ns2:myMethodOneWay></soap:Body></soap:Envelope>
--------------------------------------
Out 30, 2015 7:18:56 PM org.apache.cxf.ws.addressing.ContextUtils retrieveMAPs
WARNING: WS-Addressing - failed to retrieve Message Addressing Properties from context


Can anyone enlighten me on this? Thank you.
 
g tsuji
Ranch Hand
Posts: 697
3
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WARNING: WS-Addressing - failed to retrieve Message Addressing Properties from context

Firstly, just to note that it is a warning. It does not a priori mean the functionality server-side is broken resulting from the warning ... In fact, it is not uncommon that warning appears often in the log for some reason which could be obscur and could be safely ignored.

Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:myMethodOneWay xmlns:ns2="http://test.com/wsdl"><arg0>Input message</arg0></ns2:myMethodOneWay></soap:Body></soap:Envelope>

That could be the real concern. Functionality could break because of it ...

Your client-side code should at least make it clear that the addressing feature is registered with the port set up.

With that, your header should start to behave.
 
Monica Valverde
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It worked, thank you!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!