Search code examples
javaapache-camelcxf

Camel CXF configure WS-Adressing - ReplyTo and MessageID


I need to configure my CxfEndpoint in Camel for WS-Addressing. My CxfEndpoint Service gets called and sends back a confirmation message. I need to add/configure ReplyTo, RelatesTo and MessageID fields to the message.

This is how it should look like:

<a:MessageID u:Id="_4">169</a:MessageID> 
<a:ReplyTo u:Id="_5"> 
   <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>

I have set up the CxfEndpoint in camel as such:

CxfEndpoint cxfEndpoint = new CxfEndpoint();
cxfEndpoint.setAddress("http://0.0.0.0:8888/service");
cxfEndpoint.setWsdlURL("Service.wsdl");
cxfEndpoint.setCamelContext(camelContext); 
....

I added WS-Addressing simply by adding the following:

<cxf:features>
  <wsa:addressing/>     
</cxf:features>   

I could not find any information how to add WS-Addressing configuration to camel cxf. I saw cxf documentation ws-a but it eludes me how to add the mentioned AddressingProperties maps to a camel CxfEndpoint. What is the preferred way to configure WS-Addressing for Camel CxfEndpoint? Thank you very much


Solution

  • I will close this question for now, because I think I misunderstood the problem and need to investigate this further.