Web Service - Execute

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.

IMPORTANT: Before using this action, 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 variable.

General Parameters

           

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 Object from custom type(s) 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 a variable which can be specified in this parameter.

Arguments Parameters

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 Parameters

Property

Type

Required

Default

Markup

Description

Authentication Type

Text (options)

No

None

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 user name 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 tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.

Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)

On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)

Example

The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

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

<AMEXECUTEWEBSERVICE WSDLURL="asa" TYPENAME="text" 
METHODNAME="text" 
RESULTVARIABLE="text" RESULTSTRUCTURE="text" 
PROTOCOL="Soap12" AUTHENTICATIONTYPE="Basic" 
USERNAME="text" PASSWORD="AM14X/Mzt7l1ZJKI5puXATapg==aME" 
DOMAINNAME="text" CERTIFICATE="text" 
PASSPHRASE="AM1A1ccLj1w0WwPoNgZM+UvjQ==aME"><Argument 
ArgType="text" ArgValue="text" /></AMEXECUTEWEBSERVICE>