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

Reply via email to