JBoss Community

Re: WebServiceContext

created by Richard Opalka in JBoss Web Services Development - View the full discussion

Yes, your webservice clients have to be configured to handler sessions properly.

Here's the sample code:

 

QName serviceName = new QName(targetNS, "ServiceName");
wsdlURL = new URL(wsdlURLString)Service service = Service.create(wsdlURL, serviceName);
HelloWorldIface proxy = (HelloWorldIface)service.getPort(HelloWorldIface.class);
((BindingProvider)proxy).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
proxy.invokeSomeMethod(); // this will handle/propagate sessions properly

Reply to this message by going to Community

Start a new discussion in JBoss Web Services Development at Community