The ws-addressing sample works.But when i try the same code in my jax-ws 
client,it doesnt send the addressing headers to the server(tomcat).I do 
not see them on the TCPMonitor either.Not sure if this is a bug like we 
had with cxf soap with attachment clients earlier(dropping the 
attachment).

                BindingProvider bp = (BindingProvider)port;

            // get Message Addressing Properties instance
            AddressingBuilder builder = AddressingBuilder.
getAddressingBuilder();
            AddressingProperties maps = builder.newAddressingProperties();

            // set MessageID property
            AttributedURIType messageID =
                WSA_OBJECT_FACTORY.createAttributedURIType();
            messageID.setValue("urn:uuid:" + System.currentTimeMillis());
            maps.setMessageID(messageID);

            // associate MAPs with request context
            Map<String, Object> requestContext =  bp.getRequestContext();
           requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);



thanks and regards,
Bharath
Bharath Thippireddy <[EMAIL PROTECTED]> wrote on 05/06/2008 
10:38:55 AM:

> Hi Willem,
> 
> com.primavera.ws.p6.authentication.AuthenitcationService is a class 
> generated by the java2wsdl tool cxf provides.
> I am trying to get the cxf addressing work with our application deployed 

> on the tomcat.I am following the CXF documentation ,and see the 
exception 
> below.
> 
> http://cwiki.apache.org/CXF20DOC/ws-addressing.html
> 
> thanks and regards,
> Bharath
> 
> Willem Jiang <[EMAIL PROTECTED]> wrote on 05/05/2008 08:45:43 PM:
> 
> > Hi Bharath,
> > 
> > Does the com.primavera.ws.p6.authentication.AuthenticationService be 
an 
> > interface class?
> > If not , the ClientProxyFactoryBean can't create a proxy for you.
> > 
> > Willem
> > Bharath Thippireddy wrote:
> > > I am trying to use the CXF Addressing Feature and i see the 
following 
> > > exception while constructing the client object.Is this the right way 

> to 
> > > get ws-addressing running on the JAXWS client?
> > >
> > >          ClientProxyFactoryBean factory = new 
> ClientProxyFactoryBean();
> > >         factory.setServiceClass(AuthenticationService.class);
> > >         factory.setAddress(Authentication_SERVICE_URL);
> > >         factory.getFeatures().add(new WSAddressingFeature());
> > >         AuthenticationService client = 
> > > (AuthenticationService)factory.create();
> > >
> > > Exception in thread "main" java.lang.IllegalArgumentException: 
> > > com.primavera.ws.p6.authentication.AuthenticationService is not an 
> > > interface
> > >         at java.lang.reflect.Proxy.getProxyClass(Proxy.java:362)
> > >         at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
> > >         at org.apache.cxf.frontend.ClientProxyFactoryBean.create(
> > > ClientProxyFactoryBean.java:105)
> > >         at com.primavera.wsclient.WSAddressingClient.main(
> > > WSAddressingClient.java:25)
> > >
> > > thanks and regards,
> > > Bharath
> > > 
> > 
> > 

Reply via email to