Story

Siebel XML Web Interface

The XML Web Interface can be used against any Siebel eBusiness Application. Requests to generate XML from Siebel eBusiness Applications can be submitted through a Siebel Web Server using a query string or an XML command block.
Example:
Code Snippet to open HTTP connection to SWE get data from account list applet – using XML command:
###################################################################
<% @LANGUAGE="VBScript" %>
<%
'----------------------------------------------
'Open HTTP connection and send XML command req
'----------------------------------------------
strURL = "http://" & Request.form ("swe") & "/
start.swe?SWECmd=ExecuteLogin&SWEDataOnly=1&SWEUserName=sadmin&SWE
Password=sadmin&SWESetMarkup=XML
ZOSet xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", strURL, False
xmlhttp.send ()
Set ologinXmlDoc = xmlhttp.responseXML
strCookie = xmlhttp.getResponseHeader ("Set-Cookie")
On Error Resume Next
If strCookie = "" Then
Response.Write ("Unable to connect to Siebel Web Server. Please
check Login Name, Password, and Siebel Web Server URL")
Response.End
End If
strSessionId =
mid(strCookie,inStr(strCookie,"!"),inStr(strCookie,";")-
inStr(strCookie,"!"))
strURL = "http://" & Request.form ("swe") & "/
start.swe?SWECmd=GotoView&SWEView=Account+List+View&SWESetMarkup=X
ML&SWEDataOnly=1" & "&_sn=" & strSessionId
Set xmlhttp = Nothing
Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", strURL, False
xmlhttp.send ()
Set oXmlDoc = xmlhttp.responseXML
'-----------
'Session Var
'-----------
Session ("SWESessionId") = strSessionId
Session ("swe") = Request.form ("swe")
'-----------
'Prepare XSL
'-----------
sXsl = "acctresponse.xsl"
Set oXslDoc = Server.CreateObject("Msxml2.DOMDocument")
oXslDoc.async = false
oXslDoc.load(Server.MapPath(sXsl))
%>
<HTML>
<HEAD>
<TITLE>My Portal</TITLE>...
<BODY>
...
<TD colSpan=2><%Response.Write (oXmlDoc.transformNode(oXslDoc))%>
</TD>
</BODY>
</HTML>
###################################################################
 
 
Note: For any examples/code snippet/commands related to the various features listed in this document, please make use of the documents listed in the reference section.
 
·      XML Response Structure
 
When you send a command block to a Siebel eBusiness SWE -XML application, you access the Siebel eBusiness XML application screens. If the action specified in the command block is successfully executed, the data and all of the objects from the resulting screen are returned within an HTTP response. The format of the response is XML, HTML, or WML, depending on the SWESetMarkup setting that was sent in the request payload.
You must develop the mechanism by which your Web server handles XML responses. Using the information provided in this section you can develop a parser, a Web application, or another control to extract the necessary data from XML responses and display the appropriate information to users.
 
·      Common Operations
 
There are various combinations of XML commands you can use to execute an action in a Siebel eBusiness XML application. Each operation below offers one solution for executing a Siebel eBusiness Application action.
 
                      i.        Logging In (Using LDAP/DB authentication/SSO)
                     ii.        Logging Off
                    iii.        Navigating to a Screen/Within the Screen
                    iv.        Querying Items
                     v.        Modifying Records
                    vi.        Deleting Records
                   vii.        Picking Records
 
 
·      SWE API
 
There are several SWE Coomands, SWE Methods and arguments available to control the Siebel eBusiness Application actions.
 
·      Manipulating Siebel XML with XSL Stylesheets and XSLT
 
SWE can perform embedded XSL transformation on outbound XML documents. This way, you can generate outbound documents in the desired markup language format directly from SWE, without requiring a middle-tier server to perform the transformation.
To do so, application developers must provide the XSL stylesheets used for the transformation and specify the names of the stylesheets to SWE.