• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Maintaining session problem... Save and send cookie?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have recently switched to programming in Java after programming for a while in C++, so bare with me if I ask dumb questions... In the company I work I have a situation which requires me to connect to a webservice.

I have used WSDL2Java successfully to generate the stub from the WSDL. I can connect and login to the webservice (Axis2),but for some reason I cannot keep the session active. I send the login request, I receive the correct response, together with the cookie. The thing is I don't know how to extract it and send it along...

Here is my code:



I have tried to myStub._getServiceClient().getOptions().setManageSession(true) but that doesn't seem to work. Is there any way to extract the cookie string from the response I get to the login request and then pass it to the following data request?
Or am I not invoking the webservice well?

Any advice is highly appreciated! Thank you very much!
 
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!