Web Service - Execute function
Declaration
<AMWEBSERVICE PROXYPASSWORD="text (options)" PROXYUSERNAME="text" PROXYPORT="number" PROXYSERVER="text" TIMEOUT="number" PROTOCOL="text (options)" PASSPHRASE="text (encrypted)" CERTIFICATE="text" PASSWORD="text (encrypted)" USERNAME="text" DOMAINNAME="text" PROXYTYPE="text (options)" AUTHENTICATIONTYPE="text (options)" WSDLURL="text" TYPENAME="text" METHODNAME="text" RETURNTYPE="text" REQUESTVARIABLE="text" RESULTVARIABLE="text" RESPONSEVARIABLE="text" RESULTSTRUCTURE="text"><ARGUMENT ARGTYPE="text" ARGVALUE="text" /></AMWEBSERVICE>
Description
Executes a web service call using the provided WSDL (Web Service Definition Language) URI (Uniform Resource Identifier) and parameters.
Practical usage
Provides an automated means of calling a web service method by way of a WSDL document or URI. This action supports variables, static values and standard parameter types (such as strings and numbers) as well as support for structure information. Data can be returned into a corresponding structure or a specified Automate Desktop variable.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
WSDL URI | Text | Yes | (Empty) | WSDLURL="http://example.com/ services/stockquote/WSDL" |
The location to a WSDL (Web Services Description Language) URL, or a file location to a WSDL file. After entering the WSDL URL or file, click the icon to query available WSDL methods. |
Type | Text | Yes | (Empty) | TYPENAME="StockQuote" | The web service class which contains the available methods. After entering a WSDL location in the WSDL URI parameter, clicking the icon will attempt to query available Web Service Types specified in the WSDL URL or file. Upon a successful query, all discovered Web Service Types will be populated into the Type parameter. Clicking the down arrow corresponding to this field will display a full list of queried type names in which to select from. |
Function name | Text | Yes | (Empty) | METHODNAME="InvertString" | The WSDL method (or operation) to invoke. Upon selection of an available class as specified under the Type parameter, all discovered methods relating to that class will be populated into the Function name parameter. Click the box to display a full list of queried method names to select from. |
Populate variable with return value | Text | No | (Empty) | RESULTVARIABLE="theVar" | The name of an existing variable to be populated with the return value of the selected method. |
Function return value type | Text (options) | No | (Empty) | RETURNTYPE="DateTime" | Specifies the type of the return object. If function return type is non-primitive (that is, a built-in type), then manually specify the type in parameter's box. The available options are:
|
Create and populate object with complex return value (optional) | Text | No | (Empty) | RESULTSTRUCTURE="returnValue" | Specifies the name of the object to create and populate with a complex return value. |
(SOAP messag(es) Populate variable with request message | Text | No | (Empty) | REQUESTVARIABLE="soap1" | Specifies an existing variable to populate with SOAP request messag(es). |
(SOAP messag(es) Populate variable with response message | Text | No | (Empty) | RESPONSEVARIABLE="soap2" | Specifies an existing variable to populate with SOAP response messag(es). |
Create structure with returned complex type | Text | No | (Empty) | RESULTSTRUCTURE="Structure" | The name of the structure created by the user. A Web Service call may require the use of one or more structures as parameters. If such structures are required, the user must initially create them in prior steps during design time using the Type - Define and Type - Create Object activities. The Type - Define activity defines a custom object type or types defined in a Web service. The Type - Create Object action creates an Automate Desktop Object from custom types defined by the Type - Define activity. The structure contents can then be defined in this parameter with the returned user defined object’s properties. Structures can be saved to an Automate Desktope variable which can be specified in this parameter. |
Arguments
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Type | Text | No | (Empty) | ARGTYPE="string" | The WSDL method argument type. If clicking the icon accomplished a successful query of the WSDL document/URI and one or more methods were selected from the Function name parameter, this column becomes pre-populated with any corresponding parameter types in the order in which they were selected. This allows the user to simply enter the necessary parameter values under the Value column. |
Value | Text | No | (Empty) | ARGVALUE="Hello" | The value to enter corresponding to the argument type populated under the Type column. |
Credentials
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Authentication Type | Text (options) | No | None |
|
The
type of authentication to use (if any). The available
options are:
|
Domain | Text | No | (Empty) | DOMAINNAME="mydomain.com" | The domain name to use for authentication. This parameter is available only if the Authentication Type parameter is set to Basic, Digest or Windows (NTLM or Kerberos). |
Username | Text | No | (Empty) | USERNAME="theUser" | The username to use for authentication. This parameter is available only if the Authentication Type parameter is set to Basic, Digest or Windows (NTLM or Kerberos). |
Password | Text | No | (Empty) | PASSWORD="encrypted" | The password that corresponds with the Username parameter. This parameter is available only if the Authentication Type parameter is set to Basic, Digest or Windows (NTLM or Kerberos). |
Client certificate | Text | No | (Empty) | CERTIFICATE="C:\Temp\Cert" | Specifies the file path to a valid client certificate to use for authentication. This parameter is available only if the Authentication Type parameter is set to Basic, Digest or Windows (NTLM or Kerberos). |
Passphrase | Text | No | (Empty) | PASSPHRASE="encrypted" | The passphrase to use for authentication. |
Protocol | Text (options) | No | SOAP | PROTOCOL="Soap12" | The
protocol version. The available options are:
|
Timeout (seconds) | Text | Yes | 100 | TIMEOUT="120" | Specifies the number of seconds to wait for the web service to respond before timing out. The default value is 100 seconds. |
Ignore warnings | Yes/No | No | Yes | IGNOREWARNINGS="NO" | If selected (default), warnings from the web service are ignored. |
Proxy
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Proxy type | Text (options) | No | None |
|
Specifies the proxy protocol to use. If you are unsure of
the value to use in this parameter, contact your network administrator.
The available options are:
|
Use authentication | --- | --- | --- | --- | Select to specify the connection to the proxy server requires
authentication (disabled by default). NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Proxy server | Text | Yes | (Empty) | PROXYSERVER="proxy.host.com" | The hostname (for example, server.domain.com) or IP address (for example, xxx.xxx.xxx.xxx) of the proxy server. |
Proxy username | Text | No | (Empty) | PROXYUSERNAME="username" | The username to use to authenticate with the proxy server. This parameter becomes available when the Proxy type parameter is set to HTTP, and the Use autThis option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication. |
Proxy port | Text | Yes | 808 | PROXYPORT="1000" | The port to use to connect to the web service. The default value is 808. |
Proxy password | Text | No | (Empty) | PROXYPASSWORD="encrypted" | The password to use to authenticate with the proxy server. When the step is created using the Task Builder it is written to the task encrypted. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication. |
Example
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
This sample task executes a web service call, and returns the result in a variable.
<AMWEBSERVICE PROTOCOL="Soap12" CERTIFICATE="text" PASSWORD="AM5ppKFCcxQoIRHU8+AYNj7hw==aME" USERNAME="text" DOMAINNAME="text" AUTHENTICATIONTYPE="basic" WSDLURL="asa" TYPENAME="text" METHODNAME="text" RESULTVARIABLE="text" RESULTSTRUCTURE="text"><ARGUMENT ARGTYPE="Text" ARGVALUE="Text" /></AMWEBSERVICE>