Siebel Portal Framework Guide > Delivering Content to External Web Applications > XML Request Structure >

XML Command Block


To initiate an action on a Siebel Business Applications XML screen, you must use a specific set of XML tags and they must conform to a specific structure. Table 19 lists the three valid XML tags that are used to perform a command.

Table 19. XML Tags
Tag
Description

<EXEC>

This is the root tag for each command that you want to send to the SWE. The <EXEC> tag encloses the <CMD> and <ARG> tags. This tag represents a single command.

<CMD>

This tag indicates the SWE command that you want to access and encloses all of the arguments for the command.

<ARG>

This tag indicates the object on which the command is to be executed and any additional parameters that are required. Unlike the <EXEC> and <CMD> tags, which are used only once in a command block, you can have multiple arguments within a command block.

For example, using the information from Table 19, a valid syntax format for an XML command block is as follows:

<EXEC>

<CMD NAME="SWEcmd" VALUE="command name">

<ARG NAME="argumentName">argument1Value</ARG>

<ARG NAME="argumentName">argument2Value</ARG>

...

<ARG NAME="argumentName">argumentNValue</ARG>

<ARG NAME="SWESetMarkup"> XML | HTML </ARG>

<ARG NAME="SWEDataOnly"> TRUE | FALSE </ARG>

<ARG NAME="SWESetNoTempl"> TRUE </ARG>

</CMD>

</EXEC>

Each <EXEC> tag encloses a complete command block. The <CMD> and <ARG> tags are enclosed within the <EXEC> tag, and their attributes and values specify which commands are executed by the SWE.

A valid XML command block must conform to a specific structure. It must have a valid execute tag followed by a command tag that encloses the arguments. The syntax of the name-value pairs and the attributes that accompany the XML tags within a command block must follow a specific format. This topic describes the syntax of each XML tag. For the DTD for the inbound XML document, see Inbound DTD.

EXE Tag

The Execute tag is the root tag for each command that you want to execute.

Description

Think of the Execute tag as a container. Each container represents a single SWE command or screen action. Enclosed within an Execute tag are the commands, arguments, and information required to complete a single command. Use only one <EXEC> tag for each command that you want to execute. The PATH attribute is the only attribute used by the <EXEC> tag, although it is not required.

Attributes

Table 20 lists the attribute used with the Execute tag:

Table 20. EXEC Tag Attribute
Attribute
Description

PATH

The PATH attribute is used to indicate the location of the SWE object manager. By default, the SWE XML application looks in its root directory for the SWE object manager. If you want to specify an Application Object Manager for the Web application to use, then you must indicate its location using the PATH attribute.

Example

The following example uses the Execute tag to enclose the login command.

<?xml version="1.0" encoding="UTF-8"?>

<EXEC PATH="/callcenter/start.swe">

<CMD NAME="SWECmd" VALUE="ExecuteLogin">

<ARG NAME="SWEUserName">jdoe</ARG>

<ARG NAME="SWEPassword">jdoepassword</ARG>

<ARG NAME="SWESetMarkup">XML</ARG>

<ARG NAME="SWEDataOnly">TRUE</ARG>

<ARG NAME="SWESetNoTempl">TRUE</ARG>

</CMD>

</EXEC>

CMD Tag

The Command tag is required for each command block and is used to indicate the SWE command that you want to execute.

Description

Like the Execute tag, the Command tag also acts as a container. Enclosed between the open and close Command tags are the arguments required to complete a command. Use only one <CMD> tag for each command block that you want to execute.

Attributes

Table 21 lists the attributes that are used with the Command tag:

Table 21. CMD Tag Attributes
Attribute
Description

NAME

The NAME attribute must be set to SWECmd. This indicates that the type of command you want to execute is a SWE command.

VALUE

The VALUE attribute specifies which SWECmd you want to execute. Listed below are the SWE commands most commonly used with Business:

  • ExecuteLogin
  • GotoPageTab
  • InvokeMethod
  • LogOff
Example

Using the information from the table above, the following example illustrates how to use the Command tag to execute a login command:

<?xml version="1.0" encoding="UTF-8"?>
<EXEC PATH="/callcenter/start.swe">

<CMD NAME="SWECmd" VALUE="ExecuteLogin">

<ARG NAME="SWEUserName">jdoe</ARG>

<ARG NAME="SWEPassword">jdoepassword</ARG>

<ARG NAME="SWESetMarkup">XML</ARG>

<ARG NAME="SWEDataOnly">TRUE</ARG>

<ARG NAME="SWESetNoTempl">TRUE</ARG>

</CMD>

</EXEC>

ARG Tag

A command block can contain multiple Argument tags. Each Argument tag indicates an additional command parameter required to complete the action specified in the command block.

Description

The Argument tag uses name-value pairs to send command parameters to the SWE. A command does not execute without having all the appropriate parameters passed to the SWE.

Attributes

Table 22 lists the attributes that are used with the Argument tag.

Table 22. ARG Tag Attributes
Attribute
Description

NAME

This is the only attribute used by the Argument tag. The NAME attribute is used to indicate an argument, or the name of a parameter, for which you are sending additional information. The parameter's value is entered between the open and close Argument tags.

Listed below are the parameter names most commonly used with Business:

  • SWEApplet
  • SWEDataOnly
  • SWEMethod
  • SWEPassword
  • SWEScreen
  • SWESetNoTempl
  • SWESetMarkup
  • SWESetRowCount
  • SWEStyleSheet
  • SWEUserName
  • SWEView

Table 23 lists the values that are most commonly used with these parameter names.

Example

For each argument name that you include in a command block, you must also indicate a value for the argument. For example, to use the InvokeMethod command, you must indicate which method you want to invoke. Additionally, if the method is one that requires parameters, as is the case with the WriteRecord, then you must send those parameters to the SWE. With the WriteRecord method, you must indicate the view and the applet that you are working with. You also must indicate the column to which you want to write the record, and you must indicate what information you want to write.

The following example illustrates how to use Argument tags to send the required parameters for a WriteRecord method:

<?xml version="1.0" encoding="UTF-8"?>

<EXEC PATH="/callcenter/start.swe">

<CMD NAME="SWECmd" VALUE="InvokeMethod">

<ARG NAME="SWEMethod">WriteRecord</ARG>

<ARG NAME="SWEView">Account List View</ARG>

<ARG NAME="SWEApplet">Account List Applet</ARG>

<ARG NAME="Lot Name">65 metal car</ARG>

<ARG NAME="Starting Price">3.00</ARG>

<ARG NAME="SWESetMarkup">XML</ARG>

<ARG NAME="SWEDataOnly">TRUE</ARG>

<ARG NAME="SWESetNoTempl">TRUE</ARG>

</CMD>

</EXEC>

Required Arguments

The following arguments are required for each command block sent to the SWE:

<ARG NAME="SWESetMarkup">XML | HTML | WML</ARG>

<ARG NAME="SWEDataOnly">TRUE | FALSE</ARG>

<ARG NAME="SWESetNoTemp">TRUE</ARG>

For detailed information about these arguments, see the following:

  • SWESetMarkup. The SWE returns a response for each command block it receives. You can use the SWESetMarkup attribute to indicate whether a response is returned as XML, HTML, or WML.

    You can also set the response markup format by allowing the User Agent (UA) service to retrieve the default markup from the UA device table, or by setting the SWESetMarkup property in the appropriate Siebel Server configuration file. The SWESetMarkup tag is not required in the payload when you use one of these alternatives. The examples in this chapter specify the response markup format using the SWESetMarkup attribute in the payload.

    NOTE:  SWESetMarkup is not used for the Siebel Open UI client, which supports HTML only.

  • SWEDataOnly. In addition to specifying the type of markup language for a SWE response, you must also indicate whether the response includes data only or data and user interface information, such as non-data controls (anchors and navigation controls). Set the SWEDataOnly attribute to TRUE to indicate that only data can be returned or set it to FALSE to indicate that both data and user interface information can be returned.

    NOTE:  If the SWEDataOnly parameter is not included, then the default is FALSE.

  • SWESetNoTempl. By default, Siebel Business Applications XML uses a server-side Web template to filter specific items and controls from SWE responses. When using XML, you can control whether a response returns all the information related to the request or a subset of it dictated by the Web template. Setting the attribute to TRUE makes sure that the Web template is not used and that the SWE response contains all the necessary information to complete an action. When a SWESetNoTempl attribute is set to FALSE, the Web template is used and the page items and controls specified in the template are filtered from the response.

    NOTE:  If the SWESetNoTempl parameter is not included, then the default is FALSE.

Common Name-Value Pairs

Table 23 lists commonly used argument name-value pairs.

Table 23. ARG Parameter Name-Value Pairs
Parameter Name
Parameter Values

SWEApplet

Applet name

SWEDataOnly

TRUE

FALSE

SWEMethod

DeleteRecord

EditRecord

ExecuteQuery

GoToNextSet

GotoPageTab

NewRecord

NewQuery

WriteRecord

SWEPassword

Password

SWEScreen

Screen name

SWESetMarkup

HTML

XML

SWEUserName

User name

SWEView

View name

NOTE:  When determining what arguments to define, it is a good idea to look at the XML Response. The response includes the expected arguments.

Siebel Portal Framework Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.