Feedback

  • Contents
 

SOAP Create RPC Response

This SOAP tool is a convenience tool for composing the response envelope for an RPC request. It copies the source envelope and replaces the method element in the body with an element that has the same name but “Response” added to its name. It also adds a <Result> element as child of the method element.

Usually, the type of the return value is given by the service description and doesn’t need to be included in the <Result> element. However, the service may define the type as xsd:anyType, for example for VARIANT types. In this case, the type must be included in the argument. The ‘Return Value Type’ argument permits specifying the type of the result value. For example, if a type of “double” is specified, the <Result> element will look as follows:

<Result xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:type=“xsd:double”>1234.567</Result>

Notes: The selection namespaces from the source envelope document are copied to the response envelope document as well.

The tool fails if the request body does not contain a method element.

Inputs

Envelope

Envelope node of the request SOAP payload. Can be a document node whose document element is <SOAP-ENV:Envelope> or the node is the element itself.

Method Name Mask

Optional mask to create the name of the response method.

The string passed here may contain the following substitution tags:

%1 Namespace prefix of the first child element of the <Body> element (RPC method).

%2 Base name of the first child element of the <Body> element (RPC method).

%{ Treat everything up to closing ‘}’ as XPath query to be run against the ‘Envelope’ node and substitute the value of the first node found into element name string.

%%%’ character

Default: “%1:%2Response”.

Method Namespace

Namespace of the method element. If not specified, namespace of request method is used.

Result Element Name

Name of the return value element (first child of the method element).

Default: “result”

Result Element Namespace

Namespace URI of the result element. If the parameter is omitted and the name has a namespace prefix, the tool will search in the parent elements for the namespace with the same prefix and make the element a member of that namespace.

Return Value

String containing the return value of the method. This parameter does not parse XML data. This toolstep uses the return value as content of the <Result> child element. Optional.

No Return Value (void response)

Check this box if you do not want to add a <Result> element. Leave this box unchecked if you do want to add a <Result> element.

Copy Header

Check this box to copy the <Header> element and its contents from the source envelope. Leave this box unchecked if you do not want to copy the <Header> element from the source envelope.

Copy Method Element Attributes

Check this box to copy all attributes of the request method element into response method element. Leave this box unchecked if you do not want to copy the attributes from request method element.

Outputs

Response Envelope

Document node of the response envelope.

Method Element

Node of the response method element.

Result Element

Node of the <Result> element in the method element.

Exit Paths

Success

This path is taken if the RPC response is successfully created.

Failure

This path is taken if the operation fails.