axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yan Lin <>
Subject RE: Chris, the example doesn't work, why?
Date Thu, 13 Nov 2003 22:06:51 GMT
Hi, Chris,

I tried to use the example you gave out and it didn't work.  I always got NullPointerException
from line "Long oId = getSessionId(oCqServiceLocator);" because there is no session id ever

Do you know what possible caused the problem?



Here is the example you gave out:

void CallServices() {

// create the service locator object
CqServiceLocator oServiceLocator = new CqServiceLocator();

// this will globally set all client calls to maintain session state
// NOTE: SimpleSessionHandler must be present in the flows on both the
// client and server

// CALL Service to Initialize Session ID !!!

// Grab the service session id
Long oId = getSessionId(oCqServiceLocator);

TpServiceLocator oTpServiceLocator = new TpServiceLocator();

// Link the ticketPurchase session to the concertQuery session !!

// call Tp methods

static public void setSessionId(Service oService, Long oId) {
   AxisEngine engine = oService.getEngine();

static public Long getSessionId(Service oService) {

   AxisEngine engine = oService.getEngine();
   return (Long)engine.getOption(SimpleSessionHandler.SESSION_ID);

Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

View raw message