NonStop SOAP User's Manual
NonStop SOAP Features and Functions
NonStop SOAP User’s Manual—520501-012
4-5
Starting a Session
A request to start a session must not include a value for the SessionID attribute of the
session element. If it does, the server returns a fault.
After starting the session, the SOAP server returns a response that includes the
session ID as the value of the SessionID attribute.
In Example 4-1, the client requests the SOAP server to run a service within a new
session. Notice the namespace specified for the NonStop SOAP header elements.
The response includes the session ID to be used in all subsequent requests
associated with the session.
A request that starts a session need not invoke a target service. This request starts a
session without invoking a service:
Example 4-1. Request to Start a Session and Invoke a Service
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
<SOAP-ENV:Header xmlns:sd="urn:compaq_nsk_oss_SoapHeader">
<sd:Session
SessionCommand="Begin"/>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<GetBalance><ItemNo>10029389760</ItemNo></GetBalance>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example 4-2. Response to Session Initiation, with Response from Service
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
<SOAP-ENV:Header xmlns:sd="urn:compaq_nsk_oss_SoapHeader">
<sd:Session
SessionID="UnC9BZ21FAKG"/>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<GetBalanceResponse><Quantity>1621</Quantity></GetBalance
Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope