[jboss-dev-forums] [JBoss Web Services Development] - Re: WebServiceContext

Richard Opalka do-not-reply at jboss.com
Wed Oct 13 02:26:11 EDT 2010


Richard Opalka [http://community.jboss.org/people/richard.opalka%40jboss.com] created the discussion

"Re: WebServiceContext"

To view the discussion, visit: http://community.jboss.org/message/566174#566174

--------------------------------------------------------------
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
[http://community.jboss.org/message/566174#566174]

Start a new discussion in JBoss Web Services Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2047]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20101013/150dfd34/attachment.html 


More information about the jboss-dev-forums mailing list