Bookshelf Home | Contents | Index | PDF |
Siebel Portal Framework Guide > Delivering Content to External Web Applications > Connecting to the XML Web Interface > Submitting Requests Using the Web Engine InterfaceUsing Siebel's Object Interfaces you can access business services. The Web Engine Interface business service allows you to make requests to the Siebel Web Engine without having to submit requests through the Web server. Commands can be a query string or XML command block. The response is in the XML output property set of the business service. For example, using the The following code fragments show four tasks required to make the request:
NOTE: For the complete code sample, see Web Engine Interface Code Sample). For example, the following code fragment instantiates the Web Engine Interface business service:
The following code fragment defines the input properties for invoking the request method: { pi.setProperty("J", "0"); // Mode You can invoke SWE business service methods by calling the SiebelPropertySet pi = sdBean.newPropertySet(); printInfo("Initializing SWE......"); Query StringUsing the Web Engine Interface, you can send requests to SWE either as a URL query string or as an XML document in the request body data. To send a request using a URL, set the property "QueryString" to the URL query string with all the SWE commands and parameters. For example, the following code sample defines the input properties (Step 2 in the SiebelDataBean example) using a query string: { The following code fragment invokes the Request Web Engine Interface business service method (Step 3 in the SiebelDataBean example): boolean result = swe.invokeMethod("Request", pi, po); NOTE: The Request method is the most commonly used Web Engine Interface method. XML Command BlockTo send a request using an XML command block, set the input properties "RequestBodyData," "RequestBodyLength," and "RequestBodyLengthTotal." The property "RequestBodyData" must contain the XML request as specified in Outbound DTD. You should either leave the query string blank or make sure it does not contain the parameter "SWECmd" or its short form "C" (for example, SWECmd=GotoView or C=Gv). For example, the following code sample defines the input properties (Step 2 in the SiebelDataBean example) using an XML command block: { xmlRequest = "<?xml version=\"1.0\"?> " + xmlRequest; The following code fragment invokes the Request Web Engine Interface business service method (Step 3 in the SiebelDataBean example): |
Siebel Portal Framework Guide |