Tuesday, March 17, 2015

Siebel: Testing Siebel Inbound Web Service on a Mobile Web Client

Siebel Mobile Web Client can serve the same web services that are deployed on the Siebel server.
This helps developers in testing their Inbound Web Services without going through installing the whole Siebel enterprise.

The Web service functionality is an extension of the Siebel mobile web client and is processed by a second siebel.exe process. As soon as the siebel mobile client is started, this second siebel.exe process also starts and listens on a specific port which we define in the client's .cfg file. The child process exits once we logoff the mobile web client.






This setup supports authentication in URL format, SOAP headers, WS-Security headers.
It does not support Single sign-on,  stateful and stateless.

We need to add the below 2 parameters in the client's .cfg file to enable Web services on mobile web client.

  • set the following parameters in the [siebel] section of the client's .cfg file:
    • EnableWebServices = TRUE
    • WebServicesPort = port number to lister (default is 2330)
After this, once the siebel mobile web client starts, you can see 2 siebel.exe processes, one if which will accept and process web service requests.


We can also start the siebel.exe process which will support the web services without starting the siebel mobile web client by running the below command:

  • SIEBEL_CLIENT_ROOT\bin\siebel.exe /l <language_code> /c <configuration_file> /u <username> /p <password> /d <datasource_in_cfg> /webservice <port_number>
  • for example:  C:\Siebel\8118\client1\bin\siebel.exe /l enu /c enu\uagent.cfg /u SADMIN /p SADMIN /d Sample /webservice 2330
  • To stop the process, you have to manually end the process from Task manager.

You can use the netstat utility from the DOS prompt to determine if the siebel.exe process is listening to accept and process requests:

  • From the DOS prompt, give the below command:
    • netstat -a -p TCP
  • examine the output for the port number and it should be "LISTENING"

Now, we can invoke Web services on the Siebel mobile web client by passing credentials in the URL, in the SOAP header, or in the WS-Security header.


Example of Passing User Credentials in the URL
The URL format is:
http://<host>:<port>?SWEExtSource=WebService&Username=<username>&Password=<password>
For example:
http://localhost:2330?SWEExtSource=WebService&Username=<username>&Password=<password>
The following is an example of a request:
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:asi="http://siebel.com/asi/">
  <soapenv:Header/>
  <soapenv:Body>
<asi:SiebelContactQueryById>
<PrimaryRowId>1-ABC</PrimaryRowId>
</asi:SiebelContactQueryById >
  </soapenv:Body>
</soapenv:Envelope>

Example of Passing User Credentials in the SOAP Header
The URL format is:
http://<host>:<port>?SWEExtSource=WebService&WSSOAP=1
For example:
http://localhost:2330?SWEExtSource=WebService&WSSOAP=1
The following is an example of a request:
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:asi="http://siebel.com/asi/">
  <soapenv:Header>
<UsernameToken xmlns="http://siebel.com/webservices">SADMIN</UsernameToken>
<PasswordText xmlns="http://siebel.com/webservices">SADMIN</PasswordText>
<SessionType xmlns="http://siebel.com/webservices">None</SessionType>
  </soapenv:Header>
  <soapenv:Body>
<asi:SiebelContactQueryById >
<PrimaryRowId>1-ABC</PrimaryRowId>
</asi:SiebelContactQueryById >
  </soapenv:Body>
</soapenv:Envelope>

Example of Passing User Credentials in the WS-Security Header
The URL format is:
http://<host>:<port>?SWEExtSource=SecureWebService&WSSOAP=1
For example:
http://localhost:2330?SWEExtSource=SecureWebService&WSSOAP=1
The following is an example of a request:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:asi="http://siebel.com/asi/">
  <soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">
<wsse:Username>SADMIN</wsse:Username>
<wsse:Password Type="wsse:PasswordText">SADMIN</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
  </soapenv:Header>
  <soapenv:Body>
<asi:SiebelContactQueryById soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<PrimaryRowId xsi:type="xsd:string">1-ABC</PrimaryRowId>
</asi:SiebelContactQueryById>
  </soapenv:Body>
</soapenv:Envelope>

123Siebel

Search 123Siebel