Table of Contents

Search

  1. Preface
  2. Web Service Concepts
  3. Understanding the Web Services Provider
  4. Using the Web Services Hub Console
  5. Batch Web Service Operations
  6. Writing Client Applications
  7. Working with Web Service Sources and Targets
  8. Editing Web Service Sources and Targets
  9. Working with Web Service Mappings
  10. Working with Web Service Workflows
  11. Appendix A: Web Service Sample Client Applications
  12. Appendix B: Configure the Web Browser

Web Services Provider Guide

Web Services Provider Guide

Session Maintenance in Axis

Session Maintenance in Axis

The Web Services Hub requires session maintenance to cache resources. The SOAP header in the SOAP message carries the session information facilitating session maintenance.
To perform session maintenance, complete the following steps:
  1. Extract the SOAP header with the root element name Context and the namespace http://www.informatica.com/wsh from the response of the Login operation call using the MWSProxy object. This SOAP header contains the session ID sent by the Web Services Hub.
    /** Create session ID in the Soap message header **/ public static SOAPHeaderElement createSessionHeader(String sessID) throws SOAPException    {     String WSSE_NS ="http://www.informatica.com/wsh";     String WSSE_PREFIX = "infa";     Name hdrname = SOAPFactory.newInstance().createName("Context",WSSE_PREFIX,WSSE_NS);     SOAPHeaderElement header = new SOAPHeaderElement(hdrname);     SOAPElement token = header.addChildElement("SessionId","","");     token.addTextNode(sessID);     return header;    }
  2. Send this session ID in a SOAP header for all subsequent requests using the MWSProxy object. You set the SOAP header once in the MWSProxy object after the Login operation call:
    ((org.apache.axis.client.Stub) MWSProxy).setHeader(createSessionHeader(sessionID));
  3. Set the SOAP header in the DIWSProxy object with the same SOAP header:
    ((org.apache.axis.client.Stub) DIWSProxy).setHeader(createSessionHeader(sessionID));

0 COMMENTS

We’d like to hear from you!