• Post Reply Bookmark Topic Watch Topic
  • New Topic

rataining session in java client while invoking dotnet webservice.  RSS feed

 
tejal.khatri
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Forum

I am invoking a dotnet webservice using a java client.
My need is to maintain session in this java client. But
I have to do this using only java api�s. I came across a
Solution using axis.. but I just need it using sun api�s.
If you have any idea please do let me know�..

Any help will be appreciated.
Best Regards,
Tejal
 
Watsh Rajneesh
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Axis 1.2 implements the JAX-RPC 1.1 spec and hence the SAAJ 1.2 spec. So probably the solution you already have found with axis apis will work with sun's jaxrpc runtime if they use javax.xml.rpc version of the apis.

When you are maintaining state information on client side then you may want to check this out (esp. 5.4.1.2 section which talks about synchronizing shared state info among mulitple clients). For this and the other reason (overhead incurred in passing state information with method calls), you should if possible, implement the service to maintain the session state for you.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tejal,
Welcome to the JavaRanch. There aren't many rules around here, however one of them is adherence to the JavaRanch Naming Policy is one of them. Please change your display name to one that complies with that policy (changing the period to a space will suffice). Your cooperation is appreciated.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by tejal khatri:
My need is to maintain session in this java client.


You haven't mentioned how the session is maintained. An interoperable Web service should hand out a correlation ID in its SOAP response. The session is maintained by specifying the correlation ID in the next SOAP request (i.e. the correlation ID is a part of the data in the SOAP messages). If the web service uses an HTTP session instead, try setting the javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY on the client stub.

For some Ideas see:
Lost Session at JWSP-Client
Web Service session maintenance
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!