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>

Related Topics   

Description

Executes a web service call using the provided WSDL (Web Service Definition Language) URI (Uniform Resource Identifier) and parameters.

NOTE: Before continuing, you should have a basic understanding of HTML, XML, Web service and related platform elements, such as WSDL, SOAP and UDDI.

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 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, clicking the Go button to query available WSDL methods.
Web Service 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 Go button 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 Web Service Type field. Clicking the down arrow corresponding to this field will display a full list of queried type names in which to select from.  
Method Text Yes (Empty) METHODNAME="InvertString" The WSDL method (or operation) to invoke. Upon selection of an available class as specified under the Web Service Type parameter, all discovered methods relating to that class will be populated into the Method field. Clicking the down arrow corresponding to this field will display a full list of queried method names in which 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.
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 Define Type and Create Object action. The Define Type action defines a custom object type or types defined in a Web service. The Create Object action creates an Automate Object from custom types defined by the Define Type action. 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 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 Go button accomplished a successful query of the WSDL document/URI and one or more methods were selected from the Method field, 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
  • AUTHENTICATIONTYPE="default"
  • AUTHENTICATIONTYPE="basic"
  • AUTHENTICATIONTYPE="digest"
The type of authentication required (if any). Different parameters may become available depending on the option selected. The available options are:
  • None (default) - No authentication.
  • Default - Default authentication.
  • Basic - Uses a username and password to authenticate a service client to a secure endpoint.
  • Digest - Authentication scheme based on cryptographic hashes.
  • Windows (NTLM or Kerberos) - Windows standard authentication types.
Domain Text No (Empty) DOMAINNAME="mydomain.com" The domain name used 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 user name used 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 used for authentication.  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" The path to a valid client certificate used 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 used for authentication.
Protocol Text (options) No SOAP PROTOCOL="Soap12" The protocol version. The available options are:
  • SOAP (default)
  • SOAP 1.2

Description

Error Causes

On Error

Example

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description

Execute Web Service method "text" at location "asa" .Place result in variable "text". Create datastructure "text" from result.

Copy
<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>