Bookshelf Home | Contents | Index | Search | PDF |
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:
- Session mode
- Sessionless mode
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
- Log in to the Siebel application. If successful, an HTTP session cookie gets returned in HTTP set-cookie header.
- Submit one or more requests.
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.
- 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.
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.sweHTTP Body = SWEExtSource=
source
&SWEExtCmd=ExecuteLogin&UserName=username
&Password=password
Table 10 presents each of the Login HTTP Request variables for session mode.
Example Login URL
http://www.
myserver
.com/eai/start.swe?SWEExtSource=SiebelQuery&SWEExtCmd=ExecuteLogin&UserName=user1&Password=login123Login 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.sweHTTP 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=LogoffEAI 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.sweHTTP 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.
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:
- Change the WebServer address, www.
myserver
.com, to your actual Web server URL.- Verify that the
SWEExtSource
argument has a corresponding section in your eai.cfg file in the[HTTP Services]
section.- Change the Username and Password arguments to a valid system user, such as "SADMIN/SADMIN."
Bookshelf Home | Contents | Index | Search | PDF |
Transports and Interfaces: Siebel eBusiness Application Integration Volume III Published: 23 June 2003 |