Hi Daniel,

Thanks a lot. I've already done it the same way.

public class WSAddressingVersionOutInterceptor extends 
AbstractPhaseInterceptor<Message>  {
    private String version;
    public WSAddressingVersionClientOutInterceptor() {
        super(Phase.PRE_LOGICAL);
        addBefore(MAPAggregator.class.getName());
    }
    @Override
    public void handleMessage(Message message) throws Fault {
        AddressingPropertiesImpl props = new AddressingPropertiesImpl();
        props.exposeAs(version);

        message.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, props);
    }
    public void setVersion(String version) {
        this.version = version;
    }
}

Regards,
Sergey

-----Original Message-----
From: Daniel Kulp [mailto:[email protected]] 
Sent: Wednesday, November 16, 2011 1:27 AM
To: [email protected]
Cc: Zhemzhitsky Sergey
Subject: Re: WS-Addressing version

On Thursday, November 10, 2011 7:58:05 AM Zhemzhitsky Sergey wrote:
> Hi there,
> 
> I'm using CXF 2.4.2 as a client for the .NET WCF Service which is 
> configured to use 2004/08 version of WS-Addressing 
> (http://schemas.xmlsoap.org/ws/2004/08/addressing). As a rule CXF uses 
> http://www.w3.org/2005/08/addressing by default.
 
> I know that CXF 2.4.2 WS-RM implementation uses transformation of 
> WS-Addressing of version 2005/08 into 2004/08.
 
> So the question is whether it is possible to configure CXF to use 
> http://schemas .xmlsoap.org/ws/2004/08/addressing version for 
> WS-Addressing by default by means of interceptors or somehow else?

If using a proxy based client, I think you can do something like:

        AddressingPropertiesImpl maps
                 = new AddressingPropertiesImpl("http://schemas
.xmlsoap.org/ws/2004/08/addressing");

        ((BindingProvider)port).getRequestContext()
            .put("javax.xml.ws.addressing.context", maps);

or similar.  


Dan


 
> 
> Best Regards,
> Sergey
> 
> _______________________________________________________
> 
> The information contained in this message may be privileged and conf 
> idential and protected from disclosure. If you are not the original 
> intended recipient, you are hereby notified that any review, 
> retransmission, dissemination, or other use of, or taking of any 
> action in reliance upon, this information is prohibited. If you have 
> received this communication in error, please notify the sender 
> immediately by replying to this message and delete it from your 
> computer. Thank you for your cooperation. Troika Dialog, Russia.
 If you need assistance please contact
> our Contact Center  (+7495) 258 0500 or go to 
> www.troika.ru/eng/Contacts/system.wbp
--
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to