client state with AXIS WebService

  • Thread starter Reinhold Mannsberger
  • Start date
R

Reinhold Mannsberger

Hello!

I'm trying to access an AXIS WebService from .NET.
After a lot of WSDL hacking I was able to create a proxy,
furthermore it was necessary to implement a SoapExtension
to get it working.
However there remains a problem: The session state.
I know about the CookieContainer property. But the
CookieContainer never gets filled right
(CookieCollection.Count is always 0).
It is for sure, that there are cookies:
-------------------
HTTP/1.1 200 200 OK
Date: Tue, 24 Feb 2004 11:39:46 GMT
Server: Netscape-Enterprise/6.0
Content-type: text/xml; charset=utf-8
Set-Cookie: GX_jst=90c7c67c662d6165;Path=/NASApp/axis;
path=/NASApp/System
Set-Cookie: GX_jst=90c7c67c662d6165;Path=/NASApp/axis
Set-Cookie: JSESSIONID=-
8498574363882303979;Path=/NASApp/axis
X-Cache: MISS from www.ksv.at
Keep-Alive: timeout=180
Connection: Keep-Alive
Transfer-Encoding: chunked

153
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<response method="ksvLogin">
<payload>
<info>ok</info>
</payload>
</response>
</soapenv:Body>
</soapenv:Envelope>
-------------------

As a consequence of the missing cookies subsequent calls
to WebService methods always return an "User not logged
in" error.

I have an fully functional Java client for the same
WebService:
------------------- (code snippet)
java.net.URL portAddress = new java.net.URL
("http://www.ksv.at/testws/services/urn:ksv-premium");
KSVInfoServiceLocator locator = new KSVInfoServiceLocator
();
KSVInfoBindingStub stub = (KSVInfoBindingStub)
locator.getKSVInfoPort(portAddress);
stub.setMaintainSession(true);
// calling login method
// calling other methods
-------------------
The Java client works fine.
When I set
-------------------
stub.setMaintainSession(false);
-------------------
then I the "User not logged in" error occurs on subsequent
WebService method calls. So it crucial that this value is
set to true.
But how can the same be done in .NET?

Any help on this topic would be appreciated.


Regards,

Reinhold
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top