Hi,

I am getting the following error while using CXF Client to consume web
service.

javax.xml.ws.soap.SOAPFaultException: The security context token is expired
or is not valid. The message was not processed.
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
        at $Proxy38.getUserPoints(Unknown Source)
        at com.cxf.auth.client.SOCCXFClient.main(SOCCXFClient.java:68)

Below is my Client Code:

                        JaxWsProxyFactoryBean factory = new 
JaxWsProxyFactoryBean();

                        factory.getInInterceptors().add(new 
LoggingInInterceptor());
                        factory.getOutInterceptors().add(new 
LoggingOutInterceptor());
                        factory.setServiceClass(IShuiOnService.class);
                
factory.setAddress("http://192.168.2.74:8080/webtools/control/SOAPService";);

                        factory.setUsername("test");
                        factory.setPassword("test");

                        
factory.setBindingId("http://schemas.xmlsoap.org/wsdl/soap12/";);
                        IShuiOnService client = (IShuiOnService) 
factory.create();

                        Client cl = ClientProxy.getClient(client);
                        HTTPConduit httpConduit = (HTTPConduit) cl.getConduit();
                        HTTPClientPolicy httpClientPolicy = new 
HTTPClientPolicy();
                        httpClientPolicy.setContentType("application/soap+xml; 
charset=utf-8");
                        httpClientPolicy.setAllowChunking(false);
                        httpConduit.setClient(httpClientPolicy);

                        String message = client.getUserPoints("");
                        System.out.println("Server said: " + message);

Can someone help me on this please.

Thanks,
Manoj

--
View this message in context: 
http://cxf.547215.n5.nabble.com/The-security-context-token-is-expired-or-is-not-valid-ERROR-tp5076527p5076527.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to