axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yakubovich, Alexey" <>
Subject session in AddressBook sample
Date Wed, 16 Jun 2004 20:39:41 GMT
Ok, I figured out how to fix AddressBook sample.  Just on case somebody
else will struggle, please have these advices.
So, to get SimpleSessionHandler invoked on client side, you need to use
special client-config.wsdd.  I added the following method to Main class
from sample:
AddressBookService getService() throws Exception
        String clientWsdlLocation =
        InputStream is = new FileInputStream(clientWsdlLocation);
        WSDDDocument doc = new WSDDDocument(XMLUtils.newDocument(is));
        WSDDDeployment deployment = doc.getDeployment();
        QName serviceName = new QName("AddressBook");;
        AddressBookService service = new
        return service;
Now, in Main class, call 
        AddressBookService abs = new AddressBookServiceLocator();
got replaced for 
        AddressBookService abs = getService();
Client-config-AddressBook.wsdd file look like this:
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns=""
 <transport name="http"
 <transport name="local"
 <transport name="java"
 <handler name="smplSession"
  <requestFlow> <handler type="smplSession"/> </requestFlow>
  <responseFlow> <handler type="smplSession"/> </responseFlow>
   <service name="AddressBook">
      <requestFlow> <handler type="smplSession"/> </requestFlow>
      <responseFlow> <handler type="smplSession"/> </responseFlow>
Note, that you can desine header on globalConfiguration level or on
service level, both works.
And I didn't toutch client-config.wsdd in axis.jar.

View raw message