Something like this (assuming AxisTest is my web service):
AxisTestServiceLocator ats = new AxisTestServiceLocator();
ats.setMaintainSession(true); // Axis specific
AxisTest stub = ats.getAxisTest(URL);
// This is the JAX-RPC way of setting it at the Stub level, // no need to do it if you called ats.setMaintainSession(true) // above ((javax.xml.rpc.Stub) stub)._setProperty(Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE).
Tim
Tim K. (Gmane) wrote:
On the generated <Foo>ServiceLocator call setMaintainSession(true)
Or you can cast the generated Stub to javax.xml.rpc.Stub and then call stub._setProperty(Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE) which is the JAX-RPC way.
Both work in Axis, but the first one is Axis specific while the second one follows the JAX-RPC spec.
Tim
Praveen Peddi wrote:
Hello all,
I was using Apache SOAp on client side and Axis on server side. Since ouor soap services need enabling of cookies on client side, I was maintaining juts one Call object and calling Call.setMaintainSession(true). This enables cookies on client side.
Now we are migrating our clients to use Axis generated stubs. I looked at the generated code and I see that the stub is creating a new Call object for every soap call. This way, how do I enable cookies on client side (other than URLRewriting)?
Thanks
Praveen
**************************************************************
Praveen Peddi
Sr Software Engg, Context Media, Inc.
email:[EMAIL PROTECTED]
Tel: 401.854.3475
Fax: 401.861.3596
web: http://www.contextmedia.com
**************************************************************
Context Media- "The Leader in Enterprise Content Integration"