Hi,
Yes, the follow code just show how to specify the "to" you want
AddressingBuilder builder =
AddressingBuilder.getAddressingBuilder();
AddressingProperties maps = builder.newAddressingProperties();
AttributedURIType to = new AttributedURIType();
to.setValue("what ever you want");
EndpointReferenceType toRef = new EndpointReferenceType();
toRef.setAddress(to);
maps.setTo(toRef);
//associate MAPs with request context
Map<String, Object> requestContext =
((BindingProvider)greeter).getRequestContext();
requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
//invoke the service
String greeting = greeter.greetMe("explicitly set to");
Regards
Freeman
Maciej Kwiecien wrote:
Hello All,
I'd like to invoke web service requiring WS-Addressing header.
I've followed CXF WS-Addressing Tutorial, available here :
http://jbws.dyndns.org/mediawiki/index.php?title=CXF_WS-Addressing_Tutorial#Providing_Client_CXF_Configuration
WS-Addressing header is generated and added to SOAP request:
soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
...
<MessageID xmlns="http://www.w3.org/2005/08/addressing">
urn:uuid:aada019d-adba-48f0-acff-2dc9840572ca
</MessageID>
<To xmlns="http://www.w3.org/2005/08/addressing">
http://www.stie.com/Listener.ashx
</To>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>
http://www.w3.org/2005/08/addressing/anonymous
</Address>
</ReplyTo>
<FaultTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>
http://www.w3.org/2005/08/addressing/anonymous
</Address>
</FaultTo>
<Action xmlns="http://www.w3.org/2005/08/addressing">
http://www.site.com/SampleAction
</Action>
</soap:Header>
<soap:Body>
...
</soap:Body>
</soap:Envelope>
However, web service requires "To" value to be set to different address then
generated.
Does WS-Addressing CXF implementation support setting custom values for
swsa:To, wsa:ReplyTo, wsa:FaultTo?
Any help with example will be highly appreciated.
Regards,
Maciek