Integration Platform Technologies: Siebel Enterprise Application Integration > Web Services > About Siebel Authentication and Session Management SOAP Headers >

Examples of Using SOAP Headers for Authentication and Session Management


The following examples illustrate using Siebel Authentication and Session Management SOAP headers. These examples use various authentication and session type combinations. For more information, see Combinations of Session Types and Authentication Types.

Anonymous Request No Session

This example illustrates an anonymous request and a session type of None, which closes the session after the response is sent out:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
     <SessionType xmlns="http://siebel.com/webservices">None</SessionType>
</soap:Header>
<soap:Body>
     <!-- data goes here -->
</soap:Body>
</soap:Envelope>

Siebel Authorization No Session

This example illustrates a request that includes authentication credentials (username and password) and a session type of None, which closes the session after the response is sent out:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
     <UsernameToken xmlns="http://siebel.com/webservices">user</UsernameToken>
     <PasswordText xmlns="http://siebel.com/webservices">hello123</PasswordText>
     <SessionType xmlns="http://siebel.com/webservices">None</SessionType>
</soap:Header>
<soap:Body>
     <!-- data goes here -->
</soap:Body>
</soap:Envelope>

Siebel Authorization Stateless Session

The following examples illustrate a request, response, and subsequent request for a session type set to Stateless, which keeps the session open after the initial response is sent out.

Initial Request

This example illustrates the initial request that includes authentication credentials (username and password) needed to log in:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
     <UsernameToken xmlns="http://siebel.com/webservices">user</UsernameToken>
     <PasswordText xmlns="http://siebel.com/webservices">hello123</PasswordText>
     <SessionType xmlns="http://siebel.com/webservices">Stateless</SessionType>
</soap:Header>
<soap:Body>
     <!-- data goes here -->
</soap:Body>
</soap:Envelope>

Response

This example illustrates the session token (encrypted) generated by the Siebel Server and sent back in the SOAP header of the response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
     <siebel-header:SessionToken xmlns:siebel-header="http://siebel.com/     webservices">2-r-JCunnMN9SxI9Any9zGQTOFIuJEJfCXjfI0G-     9ZOOH4lJjbSd2P.G7vySzo07sFeJxUA0WhdnK_
     </siebel-header:SessionToken>
</soap:Header>
<soap:Body>
     <!-- data goes here -->
</soap:Body>
</soap:Envelope>

Subsequent Request Using Session Token

This example illustrates a subsequent request that includes the encrypted session token that was generated by the Siebel Server and passed in a previous response. The session token includes the user credentials and session information needed to reconnect to an existing session, or log in to a new one if the initial session has been closed:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
     <SessionType xmlns="http://siebel.com/webservices">Stateless</SessionType>
     <SessionToken xmlns="http://siebel.com/webservices">
     2-r-JCunnMN9SxI9Any9zGQTOFIuJEJfCXjfI0G-9ZOOH4lJjbSd2P.G7vySzo07sFeJxUA0WhdnK_
     
</SessionToken>
</soap:Header>
<soap:Body>
     <!-- data goes here -->
</soap:Body>
</soap:Envelope>

Siebel Authorization Stateful Session

The following examples illustrate a request, response, and subsequent request for a session type set to Stateful, which keeps the session open after the initial response is sent out.

Initial Request

This example illustrates the initial request that includes authentication credentials (username and password) needed to log in:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
     <UsernameToken xmlns="http://siebel.com/webservices">user</UsernameToken>
     <PasswordText xmlns="http://siebel.com/webservices">hello123</PasswordText>
     <SessionType xmlns="http://siebel.com/webservices">Stateful</SessionType>
</soap:Header>
<soap:Body>
     <!-- data goes here -->
</soap:Body>
</soap:Envelope>

Response

This example illustrates the session token (encrypted) generated by the Siebel Server and sent back in the SOAP header of the response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
     <siebel-header:SessionToken xmlns:siebel-header="http://siebel.com/     webservices">Q7ABhvXBNUX5qTIoKJ9hZjhMzJ6lfTPa0oUDYxOBHkmOXB7j
     </siebel-header:SessionToken>
</soap:Header>
<soap:Body>
     <!-- data goes here -->
</soap:Body>
</soap:Envelope>

Subsequent Request Using Session Token

This example illustrates a subsequent request that includes the encrypted session token that was generated by the Siebel Server and passed in a previous response. The session token includes the user credentials and session information needed to reconnect to an existing session:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
     <SessionType xmlns="http://siebel.com/webservices">Stateful</SessionType>
     <SessionToken xmlns="http://siebel.com/     webservices">Q7ABhvXBNUX5qTIoKJ9hZjhMzJ6lfTPa0oUDYxOBHkmOXB7j
     </SessionToken>
</soap:Header>
<soap:Body>
     <!-- data goes here -->
</soap:Body>
</soap:Envelope>

Simple Query Starting With <soap:body>

This example illustrates data for a simple query starting with the <soap:body> element:

<soap:body>
   <Account_spcService_Account_spcServiceQueryPage_Input
   xmlns="http://siebel.com/CustomUI">
          <ListOfTestAccount
          xmlns="http://www.siebel.com/xml/Test%20Account/Query">
                 <Account>
                       <Name>A*</Name>
                 </Account>
          </ListOfTestAccount>
   </Account_spcService_Account_spcServiceQueryPage_Input>
</soap:body>

Integration Platform Technologies: Siebel Enterprise Application Integration Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.