• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to maintain session in Client side

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my client extends org.apache.axis2.client.Stub

I've a login method its returning true,

after this if I invoke anyother bussiness method throwing Unauthorized Access fault,

if set like this

_serviceClient.getOptions().setManageSession(true); getting below exception

Exception in thread "main" org.apache.axiom.om.OMException: java.lang.RuntimeException: [was class java.io.IOException] Attempted read on closed stream.at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:239)
at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.next(OMChildrenQNameIterator.java:93)
at org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:224)


if Im removed _serviceClient.getOptions().setManageSession(true);
while invoking this call, I'm getting

: Unauthorized Access exception

How to maintain session this object? Could any one help to solve this issue?
[ April 11, 2008: Message edited by: Karthik ... ]
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI: SOAP web services should not rely on HTTP Session
[ April 11, 2008: Message edited by: Peer Reynders ]
 
    Bookmark Topic Watch Topic
  • New Topic