InboundWebServiceCall
You use the InboundWebServiceCall keyword to read an XML request from a .xml file, post the request to the server, and save the XML response from the server. The keyword also verifies the expected TagName and value in the XML response.
Signature
The InboundWebServiceCall keyword supports the following signature:
Inboundwebservicecall(XMLFIle;Tagname|@VAR1/Value,Tagname2|@var2/Value/ NULL;Tagname|Value/
@var/@STOREvar1,Tagname|value/@var/@STOREvar2)
Note the following about the InboundWebServiceCall keyword signature:
-
You must provide the full Tagname in the signature.
-
The variable name must begin with @STORE to store the response value of a tagname into the variable.
For EAI Webservice calls over HTTPS, Application CA certificate must be imported into Java default truststore (cacerts). Sample command to complete the step:
<JAVA_HOME>\bin\keytool -import -file
<PATH_TO_CERTIFICATE_FILE> -alias "<Alias>" -keystore
"<JAVA_HOME>\lib\security\cacerts"
Replace JAVA_HOME with JRE install location (for example: C:\DISA\jre
) and
PATH_TO_CERTIFICATE_FILE should be replaced with CA certificate file location. You may provide a
name for the certificate by replacing <Alias>.
XML Structure
To pass the dynamic variable into the XMLFIle, use the following XML structure:
<tagname>$var</tagname>
<tagname>="$var"</tagname>
For unit run, update EAI section in unitconfig.xml as follows:
<EAI>
<EAI-SERVERNAME>Component Alias</EAI-SERVERNAME>
<EAI-USERNAME>Username</EAI-USERNAME>
<EAI-PASSWORD>Password</EAI-PASSWORD>
</EAI>
Desktop Examples
The following table describes how to use the InboundWebServiceCall keyword to read, post, and save an XML request and then verify the response in desktop applications.
Target Object | Inputs | Closing Action | Comments |
---|---|---|---|
N/A |
Prod1.xml;swip:WorkspaceName|@var,swip:WorkspaceReuseFlag|@var2;ActiveFlag|@STOREVAR In the Test Step Applet: RequestXMLFile = Prod1.xml TagName to Send=swip:WorkspaceName Variable=@var TagName to Send=swip:WorkspaceReuseFlag Variable=@var2 TagName to Verify=ActiveFlag Value/Variable/@Storevar=@STOREVAR |
N/A |
Stores the tagname value in the response (ActiveFlag) in the @STOREVAR variable. |
N/A |
Prod1.xml;swip:WorkspaceName|@var,swip:WorkspaceReuseFlag|@var2;ActiveFlag|Y In the Test Step Applet: RequestXMLFile = Prod1.xml TagName to Send=swip:WorkspaceName Variable=@var TagName to Send=swip:WorkspaceReuseFlag Variable=@var2 TagName to Verify=ActiveFlag Value/Variable/@Storevar=Y |
N/A |
Passes the values to a SOAP request dynamically. |
N/A |
Currency.xml;NULL;ConversionRateResult|0.0161 In the Test Step Applet: RequestXMLFile = Currency.xml TagName to Send=NULL Variable= TagName to Verify=ConversionRateResult Value/Variable/@Storevar=0.0161 |
N/A |
Sends the XML request and verifies the response. |
N/A |
Currency.xml;swip:WorkspaceName|@var,swip:WorkspaceReuseFlag|@var2;ActiveFlag|@var2 In the Test Step Applet: RequestXMLFile = Currency.xml TagName to Send=swip:WorkspaceName Variable=@var TagName to Send=swip:WorkspaceReuseFlag Variable=@var2 TagName to Verify=ActiveFlag Value/Variable/@Storevar=@var2 |
N/A |
Passes the values to a SOAP request dynamically. |
N/A |
new.xml;NULL;OrderItem|ProductId|88-46TS9:ActionCode|@STOREsdf In the Test Step Applet: RequestXMLFile = new.xml TagName to Send=NULL Variable= TagName to Verify=OrderItem|ProductId|88-46TS9:ActionCode Value/Variable/@Storevar=@STOREsdf |
N/A |
Stores ActionCode from Order item tags in the @STOREsdf variable with the unique productID 88-46TS9. |
N/A |
InactiveWS.xml;con:FirstName|#FirstName,con:LastName|#LastName;faultstring|@STOREmessageIn the Test Step Applet:RequestXMLFile = InactiveWS.xmlTagName to Send=con:FirstNameVariable/Value=#FirstName( FirstName is the data set column Name) TagName to Send=con:LastNameVariable/Value=#LastName (LastName is the data set column Name) TagName to Verify=faultstringValue/Variable/@Storevar=@STOREmessage |
N/A |
Illustrates referencing Data Set Values |
Mobile Examples
The InboundWebServiceCall keyword does not apply to mobile applications.