Hi,

How to set content type in CXF client code for web service.

Below is my code, which send content type as text/xml while invoking web
wervice.
I have to have content type as "application/soap+xml; charset=utf-8".

How can i achieve this in this code.

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

                        factory.getInInterceptors().add(new 
LoggingInInterceptor());
                        factory.getOutInterceptors().add(new 
LoggingOutInterceptor());
                        factory.setServiceClass(IShuiOnService.class);
                
factory.setAddress("http://localhost/Test/TestAppService/TestService.svc";);

                        factory.setUsername("username");
                        factory.setPassword("pass");
                        IShuiOnService client = (IShuiOnService) 
factory.create();
                        String message = client.getUserPoints("12/12/2011");
                        System.out.println("Server said: " + message);



thanks,
Manoj

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Setting-Content-type-in-CXF-Client-tp5070865p5070865.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to