Tom,
Thanks for the reply. If tested your suggestion, but i get a null pointer exception in someStub._getCall().setMaintainSession(true); // enable sessions
At that point the _call variable is not instantiated, this variable will be instantiated when i call one of my service method's. (so, that to late)
But when i look into the generated code 'SomeSoapBindingStub', i found in the method 'createCall()' the next entry :
if (super.maintainSessionSet) {
_call.setMaintainSession(super.maintainSession);
}
Is there a way to set the maintainSessionSet in the super method (maybe via a config-file or an other way)
Kind regards, Peter
Tom Ziemer schreef:
Hi Peter,
you could try the following in your client:
SomeServiceLocator someLocator = new SomeServiceLocator(); // ant generated
SomeSoapBindingStub someStub = null; // ant generated
try
{
someStub = SomeSoapBindingStub someLocator.getSomeService(); // get the service
someStub._getCall().setMaintainSession(true); // enable sessions
someStub.someMethod(); // call one of your service's methods
...
}
...
Hope this helps, Regards, Tom
Peter Bosmans wrote:
Hi,
In my build.xml file, to generate client-side java code, i specify that the client must work in a session scope.
<target name="wsdl2java_client"> <echo message="Running WSDL2Java Client Emitters"/>
<!-- NdsAdmin WSDL to Java for server --> <axis-wsdl2java url="src/NdsAdmin.wsdl" output="${project.home.client}/src" deployscope="session" serverSide="no" skeletonDeploy="no" noimports="no" verbose="no" testcase="no"> </axis-wsdl2java> </target>
When i run the client, it will not work in session scope. Therefore i must add the following line in the generated Service source. _call.setMaintainSession(true);
But i don't want to add or change stuff in generated code. Is there an other way to set the maintainsession ?
Peter
