Transports and Interfaces: Siebel eBusiness Application Integration Volume III > EAI HTTP Transport > Using the EAI HTTP Transport for Inbound Integration >

Calling EAI HTTP Transport Over a Network


The EAI HTTP Transport can be used in two modes:

The following sections explain the use of these two modes.

Session Mode Between HTTP Requests

This mode uses HTTP Session Cookie to retain the session information between the HTTP requests. The session mode can be viewed when a sequence of calls is supported from an HTTP application into the EAI HTTP Transport.

To view the session mode from an HTTP application into an EAI HTTP Transport

  1. Log in to the Siebel application. If successful, an HTTP session cookie gets returned in HTTP set-cookie header.
  2. Submit one or more requests.
  3. Each request is intended as a call to a Siebel business service. Requests must contain the session cookie from Step 1 in the HTTP cookie header.

  4. Log off. The request must contain the session cookie from Step 1 in the HTTP Cookie header. The cookie refers to the session to be closed.
  5. The Session cookie is passed to the caller after a successful login request as in Step 1. The caller then should use that cookie for subsequent data requests in Step 2 and the log off request in Step 3.

Login Examples

HTTP protocol requests can be represented as URLs for HTTP GET, and as a combination of URL and request body for HTTP POST. The following sections explain in detail how each of the session mode calls is configured.

Login HTTP Request Example 1

In this example, if the call completes successfully, it will return a session cookie.

Using HTTP GET

URL   = http://webserver/path/start.swe?SWEExtSource=source&SWEExtCmd=ExecuteLogin&UserName=username&Password=password

Using HTTP POST

URL  = http://webserver/path/start.swe

HTTP Body  = SWEExtSource=source&SWEExtCmd=ExecuteLogin&UserName=username&Password=password

Table 10 presents each of the Login HTTP Request variables for session mode.

Table 10.  Session Mode Variables
Variable
Description
webserver
URL of the Web server that has Siebel Web Engine installed, such as www.myserver.com.
path
Virtual path on the server referring to specific SWE configuration. This value should be eai.
source
If you are not using named subsystems, this is the name of the Business Service Source as specified in [HTTP Services] section in the .cfg file that describes the Business Service call.
username
Siebel user name for the Siebel Object Manager login.
password
Password for the login user name above.

Example Login URL

http://www.myserver.com/eai/start.swe?SWEExtSource=SiebelQuery&SWEExtCmd=ExecuteLogin&UserName=user1&Password=login123

Login HTTP Request Example 2

In this example, for the call to complete successfully, it must include the session cookie from the login.

Using HTTP GET

URL = http://webserver/path/start.swe?SWEExtData=data text

Using HTTP POST

URL = http://webserver/path/start.swe

HTTP Body = data text

where data text is the business service input data. Most of the time, this is the text of an XML document that on the server side is converted to a PropertySet and passed to the business service.

Example Request URL

http://www.myserver.com/eai/start.swe?SWEExtData=<?xml version="1.0" encoding="UTF-8"?><SiebelMessage MessageId="" MessageType="Integration Object" IntObjectName="Sample Account">

   <ListofSampleAccount>

      <Account>

         <Name>A. K. Parker Distribution</Name>

         <ListOfContact>

            <Contact>

               <FirstName>Stan</FirstName>

               <LastName>Graner</LastName>

            </Contact>

         </ListOfContact>

      </Account>

   </ListofSampleAccount>

</SiebelMessage>

To use this URL, you change the WebServer address www.myserver.com to the actual server URL you will be using. Data that is sent as part of the URL should be UTF-8 encoded before being URL-encoded. POST requests can send the data without URL encoding and should include the Content-Type HTTP header. The Content-Type should specify the charset of the incoming data as in Content-Type=text/xml;charset="UTF-8".

Logoff HTTP Request

This request must include the session cookie from Login:

Using HTTP GET

URL = http://webserver/path/start.swe?SWEExtCmd=Logoff

NOTE:  HTTP GET should always be used for the Logoff HTTP Request.

Example Logoff URL

http://www.myserver.com/eai/start.swe?SWEExtCmd=Logoff

EAI HTTP Transport in Sessionless Mode

Using the EAI HTTP Transport in sessionless mode allows you to use one URL to perform Login, Request, and Logoff in a single HTTP request. This mode does not use session cookies because there is no login session between the HTTP requests. The disadvantage of this mode is the overhead incurred by the Siebel Object Manager needing to log in with every request.

Example

In this example, the URL describes the parameters for the HTTP Inbound Transport call over HTTP.

Using HTTP GET

URL = http://webserver/path/start.swe?SWEExtSource=source&SWEExtCmd=Execute&UserName=username&Password=password&SWEExtData=data text

NOTE:  Unlike session mode, the SWEExtCmd is Execute, not ExecuteLogin.

Using HTTP POST

URL = http://webserver/path/start.swe

HTTP Body = SWEExtSource=source&SWEExtCmd=Execute&UserName=username&Password=password&SWEExtData=data text

NOTE:  When using the sessionless mode with the POST method, the XML data text must be URL-encoded to prevent any errors.

Table 11 presents each of the variables for sessionless mode.

Table 11.  Sessionless Mode Variables 
Variable
Description
webserver
URL of the Web server that has Siebel Web Engine installed, such as www.myserver.com.
path
Default is eai. Virtual path on the server referring to specific SWE configuration.
source
If you are not using named subsystems, this is the name of the Business Service Source as specified in [HTTP Services] section in the .cfg file that describes the Business Service call.
username
Siebel user name for the Siebel Object Manager login.
password
Password for the login user name.
data text
Business service input data. Most of the time, this is the text of an XML document that on the server side is converted to a PropertySet and passed to the business service.

Example Sessionless Mode URL

NOTE:  This sample URL should be entered as a single line of text. The URL is presented here on separate lines for clarity.

http://www.myserver.com/eai/start.swe?SWEExtSource=SiebelQuery&
SWEExtCmd=Execute&UserName=user1&Password=login123
&SWEExtData=<?xml version="1.0" encoding="UTF-8"?><SiebelMessage MessageId="" MessageType="Integration Object" IntObjectName="Sample Account">

   <ListofSampleAccount>

      <Account>

         <Name>A. K. Parker Distribution</Name>

         <ListOfContact>

            <Contact>

               <FirstName>Stan</FirstName>

               <LastName>Graner</LastName>

            </Contact>

         </ListOfContact>

      </Account>

   </ListofSampleAccount>

</SiebelMessage>

To use this URL you will:


 Transports and Interfaces: Siebel eBusiness Application Integration Volume III 
 Published: 23 June 2003