Thanks for quick response. I can set custom value in Addressing header
indeed . However, I still get fault from web service:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:wsa="
http://schemas.xmlsoap.org/ws/2004/03/addressing"; xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/03/addressing/fault
</wsa:Action>
<wsa:MessageID>xxxx</wsa:MessageID><
wsa:RelatesTo>xxxx</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
</wsa:To>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode xmlns:code="http://schemas.xmlsoap.org/ws/2004/03/addressing";>*
code:DestinationUnreachable*</faultcode>
<faultstring>Destination Unreachable</faultstring>
<faultactor>urn:IWSG</faultactor>
</soap:Fault>
</soap:Body>
</soap:Envelope>


My request contains namespace http://www.w3.org/2005/08/addressing
when web service uses  http://schemas.xmlsoap.org/ws/2004/03/addressing

Could above namespace differences be a root cause of getting
code:DestinationUnreachable?

Is there any way to set custom namespace for WS-Addressing?

Regards,
Maciej


On Wed, Jul 23, 2008 at 11:56 AM, Freeman Fang <[EMAIL PROTECTED]>
wrote:

> 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
>>
>>
>>
>
>

Reply via email to