Using LionScreens Webservices
LION supports the SOAP protocol for communicating with the LionScreens web services. This means that you can interact with your LION application through WSDL files.
The LionScreens web service contains two sets of operations:
The newer AMT operations, can be identified by their names which all start with "Amt". See 'AMT Operations' below for more information.
For AMT applications, the older LionScreens web service operations are also still available. See "Legacy Operations" below for help with these operations.
The biggest difference between the two sets of operations is that the newer AMT methods have the SOAP binding style
"Document" with a literal use, which pass ComplexTypes as parameters to and from the operations.
While the
older legacy operations have the SOAP binding style "RPC" with "encoded" as use, which pass XML structures in strings
as parameters to and from the operations.
AMT Operations
SOAP binding style: Document/literal
The following operations are available:
Function name | Return type | Parameters | Description | |
Name | Type | |||
AmtLogOn | FormResponse ComplexType | LogOnRequest | LogOnRequest ComplexType | Connects to the Application server or Application manager (depending on your configuration) and creates a web
service session. If the VERIFYUSERACCOUNT option in the LionScreens.ini configuration file is set to false, the usercode and password parameters can be left empty. The parameter options are listed in the LOGON section below. Returns the FormResponse ComplexType. |
AmtGetFormNames | FormList ComplexType | FormNamesRequest | FormNamesRequest ComplexType | With this function you retrieve form names of the application you are connected to. Returns a list of form names. |
AmtGetFormFields | FieldList ComplexType | FieldsRequest | FormFieldsRequest ComplexType | With this function you retrieve the fields of a specific form name. Returns a list of fields of a specific form. |
AmtSendForm | FormResponse ComplexType | FormRequest | FormRequest ComplexType | With this function you transmit the form or select the form based on your
action. Returns FormResponse ComplexType. |
AmtLogOff | FormResponse ComplexType | LogOffRequest | LogOffRequest ComplexType | Closes the web service session. Returns FormResponse ComplexType. |
ComplexTypes used in the AMT operations:
ComplexType Name |
ComplexType Members | Location | Description | |
Name | Type | |||
LogOnRequest | UserCode | String | Header | |
Password | String | Header | ||
Station | String | Body | ||
SessionData | String | Body | ||
Parameter | String | Body | ||
FormResponse | Error | Boolean | Header | |
FormName | String | Header | ||
SessionId | String | Header | ||
UserCode | String | Header | ||
FormResponse | List of Field ComplexTypes | Body | ||
Messages | List of Message ComplexTypes | Body | ||
Field | Options | List of Options ComplexTypes | -- | ComplexType member of the FormResponse & FormRequest ComplexTypes. The field name The field value |
Name | String | -- | ||
Value | String | -- | ||
Options | Item | String | -- | |
Value | String | -- | ||
Message | MessageType | String | -- | ComplexType member of the FormResponse, FormList & FieldList ComplexTypes. |
Text | String | -- | ||
FormNamesRequest | Usercode | String | Header | |
SessionId | String | Header | ||
-- | -- | Body | ||
FormList | Error | Boolean | Header | |
MessageList | List of Message ComplexTypes | Body | ||
FormNameList | List of Strings | Body | ||
FormFieldsRequest | Usercode | String | Header | |
SessionId | String | Header | ||
FormName | String | Header | ||
-- | -- | Body | ||
FieldList | Error | Boolean | Header | |
FormName | String | Header | ||
FieldDefinitions | List of FieldDefinition ComplexTypes | Body | ||
Messages | List of Message ComplexTypes | Body | ||
FieldDefinition | Name | String | -- | ComplexType member of the FieldList ComplexType. |
EditType | String | -- | ||
Length | Integer | -- | ||
Decimals | Integer | -- | ||
FormRequest |
UserCode | String | Header | The possible FormAction values are "Page2Recall" and "Transmit" |
SessionId | String | Header | ||
FormName | String | Header | ||
FormAction | String | Header | ||
Fields | List of Field ComplexTypes | Body |
AmtLogOn
The AmtLogOn operation is used to connect to the Application server or Application manager (depending on your configuration).
If the option VERIFYUSERACCOUNT is set to true in the LionScreens.ini configuration file, the password for the user must be specified in this function.
Example:
AmtGetFormNames
The AmtGetFormNames operation returns a list of all the forms in the application.
Example:
AmtGetFormFields
The AmtGetFormFields operation returns the field definitions of all fields on a specified form.
Example:
AmtSendForm
The AmtSendForm operation enables a transmit a form or select (page2recall) a form based on your action.
Example:
The Buttongroup in the example triggered a gotoform statement.
AmtLogOff
The AmtLogOff operation closes the web service session.
Example:
Legacy Operations
SOAP binding style: RPC/encoded
The following operations are available:
Function name | Return type | Parameters | Description | |
Name | Type | |||
Logon | String | Usercode | String | Connects to the Application server or Application manager (depending on your configuration) and
creates a web service session. If the VERIFYUSERACCOUNT option in the LionScreens.ini configuration file is set to false, the usercode and password parameters can be left empty. The parameter options are listed in the LOGON section below. The return string will be an XML response with the initial screen and Session id. |
Password | String | |||
Parameter | String | |||
Sendscreen | String | Input | String | Enables the sending of screen data to the LION application. This function needs to be specified between the
Logon and Logoff instructions. The input must have the format of XML, see the SENDSCREEN section below for more information. The return string will be in the XML format. |
Logoff | String | Usercode | String | Closes the web service session. The return string will be an XML response with the Bye screen. |
Session | String |
LOGON
The LOGON function is used to connect to the Application server or Application manager (depending on your configuration).
The following optional parameter options are available:
Tag | Parameter |
/X: | <Sessiondata> |
/S: | <Station> |
If the option VERIFYUSERACCOUNT is set to true in the LionScreens.ini configuration file, the password for the user must be specified in this function.
Example in Lion:
SENDSCREEN
The SENDSCREEN function enables you to send screen data to your LION application. This function needs to be specified between the LOGON and LOGOFF instructions.
The input must have the format of XML and can contain the following options:Tag | Attribute | Mandatory |
SCREEN | Name | Yes |
SESSION | Yes | |
USER | Yes | |
FIELDLIST | No | |
FIELD | Name | No |
Example A:
The value between start tag and end tag from SESSION and USER must be equal to what is specified at the LOGON.
Example B:
Sending the screen without the FIELDLIST
If the current screen is equal to the previous sent screen the values that are received from the application will be sent to the application without change and the process section will be performed.
If the current screen is not equal to the previous sent screen the values that are designed as default will be sent
to the application without change and the display section will be performed (same as the GOTOFORM instruction in LION
code).
Sending the screen with the FIELDLIST
The "process_main" of the specified screen is executed and the values in the FIELDLIST are passed to the business
logic.
LOGOFF
With this function you can close the session from the web service. The specified USER and SESSION parameters must be equal to what is specified during the LOGON.
XML Outputfile
All functions return an XML string that can contain the following tags and attributes:
Tag | Attribute |
SCREEN | Name |
Desc | |
SESSION | |
USER | |
MESSAGES | |
MESSAGE | Type [Info, Error] |
FIELDLIST | |
FIELD | Name |
OPTION | Item |
The OPTION Tag will be added for the following fields.
- Button Groups
- Radio Buttons
- Listboxes
- Comboboxes
Example:
INPUT:
<?xml version="1.0"?>
<SCREEN name="PURCHASE">
<SESSION>1908728592</SESSION>
<USER>S_1</USER>
<FIELD name="VENDOR">BRCAR</FIELD>
</SCREEN>
OUTPUT:
<?xml version="1.0"?>
<SCREEN name="PURCHASE" desc="Register a new Purchase" ver="22">
<SESSION>1908728592</SESSION>
<USER>S_1</USER>
<MESSAGES>
<MESSAGE type="info">ERROR Select product please</MESSAGE>
</MESSAGES>
<FIELDLIST>
<FIELD name="BUTTONHOME"><OPTION item="Home">x</OPTION></FIELD>
<FIELD name="BUTTONOK">x<OPTION item="OK">x</OPTION></FIELD>
<FIELD name="BUTTONGOODBYE"><OPTION item="Goodbye">x</OPTION></FIELD>
<FIELD name="SYSTEMDATEYN"><OPTION item="System date/time">y</OPTION><OPTION item="Manually
entered date/time">n</OPTION></FIELD>
<FIELD name="BUYDATE"></FIELD>
<FIELD name="BUYTIME"></FIELD>
<FIELD name="QUANT"></FIELD>
<FIELD name="VENDOR">BRCAR<OPTION item="BRCAR CARNIVAL GAME STORE">BRCAR</OPTION><OPTION
item="FRCLI CLICHEAUX ET FILS">FRCLI</OPTION><OPTION item="NYJEN JENSEN
INC.">NYJEN</OPTION></FIELD>
<FIELD name="PRODUCT"><OPTION item="PUPPET1 CHILDPUPPETS SERIES1">PUPPET1</OPTION>
<OPTION item="PUPPET2 CHILDPUPPETS SERIES2">PUPPET2</OPTION>
<OPTION item="PUPPET3 CHILDPUPPETS SERIES3">PUPPET3</OPTION>
<OPTION item="PUPPET4 CHILDPUPPETS SERIES4">PUPPET4</OPTION>
<OPTION item="PUPPET5 CHILDPUPPETS SERIES5">PUPPET5</OPTION>
<OPTION item="PUPPET6 CHILDPUPPETS SERIES6">PUPPET6</OPTION>
<OPTION item="PUPPET7 CHILDPUPPETS SERIES7">PUPPET7</OPTION>
<OPTION item="PUPPET8 CHILDPUPPETS SERIES8">PUPPET8</OPTION>
<OPTION item="PUZZLE100 JIG SAW PUZZLE 100">PUZZLE100</OPTION>
<OPTION item="PUZZLE1000 JIG SAW PUZZLE 1000">PUZZLE1000</OPTION>
<OPTION item="PUZZLE250 JIG SAW PUZZLE 250">PUZZLE250</OPTION>
<OPTION item="PUZZLE050 JIG SAW PUZZLE 50">PUZZLE050</OPTION>
<OPTION item="PUZZLE500 JIG SAW PUZZLE 500">PUZZLE500</OPTION>
<OPTION item="ZBALL02 PLAYING BALL">ZBALL02</OPTION>
<OPTION item="BALL-SB PLAYING BALL">BALL-SB</OPTION>
<OPTION item="BALL-MB PLAYING BALL">BALL-MB</OPTION>
<OPTION item="BALL-LB PLAYING BALL">BALL-LB</OPTION>
<OPTION item="ZBALL01 PLAYING BALL">ZBALL01</OPTION>
</FIELD>
<FIELD name="EDT_TEST1"></FIELD>
<FIELD name="EDT_TEST2"></FIELD>
<FIELD name="01EDT_VERT"></FIELD>
<FIELD name="02EDT_VERT"></FIELD>
<FIELD name="03EDT_VERT"></FIELD>
<FIELD name="COMBOBOX_0"><OPTION item="abc">1</OPTION>
<OPTION item="abcd">2</OPTION>
<OPTION item="ABC">3</OPTION>
<OPTION item="ABCD">4</OPTION>
<OPTION item="ABD">5</OPTION>
<OPTION item="ACD">6</OPTION>
</FIELD>
<FIELD name="01TESTBTN"><OPTION item="A">A</OPTION>
<OPTION item="B">B</OPTION>
<OPTION item="C">C</OPTION>
</FIELD>
<FIELD name="02TESTBTN"><OPTION item="A">A</OPTION>
<OPTION item="B">B</OPTION>
<OPTION item="C">C</OPTION>
</FIELD>
<FIELD name="03TESTBTN"><OPTION item="A">A</OPTION>
<OPTION item="B">B</OPTION>
<OPTION item="C">C</OPTION>
</FIELD>
<FIELD name="04TESTBTN"><OPTION item="A">A</OPTION>
<OPTION item="B">B</OPTION>
<OPTION item="C">C</OPTION>
</FIELD>
<FIELD name="05TESTBTN"><OPTION item="A">A</OPTION>
<OPTION item="B">B</OPTION>
<OPTION item="C">C</OPTION>
</FIELD>
</FIELDLIST>
</SCREEN>