Web Services adapter request and response using method two
This method includes the persistent connectivity feature available for terminal adapters. This method supports connection through a proxy server. The proxy settings provided with the adapter request override the configuration proxy settings.
When you use a context item as an input for an adapter request, you must enclose the adapter request in <request-data> elements. However, when you create a static request, <request-data> is not required and the adapter request starts with the <adapterName-adapter-request> element.
BMC recommends that you do not include empty elements in the adapter request because they might cause errors.
The following table describes the elements for the Web Services adapter request with method two:
Elements for the Web Services adapter request with method two
The following figure shows an XML template of the Web Services adapter request using method two.
XML template of the Web Services adapter request using method two
<soap-rpc-request>
<soap-url></soap-url>
<user-name></user-name>
<password></password>
<soap-action></soap-action>
<soap-version></soap-version>
<connection>
<name></name>
<terminate-on-exit></terminate-on-exit>
</connection>
<soap-header-content>
<></>
</soap-header-content>
<soap-body-content>
<></>
</soap-body-content>
</soap-rpc-request>
The following figure shows an XML sample of the Web Services adapter request using method two. Use the adapter request XML when you create a custom process by using the Call Adapter activity in BMC Atrium Orchestrator Development Studio.
XML sample of the Web Services adapter request using method two
<soap-rpc-request>
<soap-url>http://www.webservicemart.com/uszip.asmx</soap-url>
<soap-action>http://webservicemart.com/ws/ValidateZip</soap-action>
<soap-body-content>
<ws:ValidateZip xmlns:ws="http://webservicemart.com/ws/">
<ws:ZipCode>94041</ws:ZipCode>
</ws:ValidateZip>
</soap-body-content>
</soap-rpc-request>
The following figure shows an XML sample of the adapter request that supports custom HTTP headers.
XML sample of the Web Services adapter request that supports custom HTTP headers
<soap-rpc-request>
<soap-url>http://vm-w23-rds87:8080/CalculatorWS/CalculatorWebServiceService</soap-url>
<chunked-encoding>true</chunked-encoding>
<http-request-headers>
<http-request-header>
<name>X-method-name</name>
<value>add</value>
</http-request-header>
<http-request-header>
<name>X-client-name</name>
<value>rnayar-LT-01</value>
</http-request-header>
</http-request-headers>
<soap-header-content />
<soap-body-content>
<ns2:add xmlns:ns2="http://service.calc.netbeans.com/">
<num1>4</num1>
<num2>4</num2>
</ns2:add>
</soap-body-content>
</soap-rpc-request>
The Web Services adapter returns an adapter response that contains the header and body content from the SOAP response to the adapter request.
The following figure illustrates an XML sample of the Web Services adapter response to a request using method two.
XML sample of the Web Services adapter response to a request using method two
<soap-response>
<metadata>
<status>success</status>
</metadata>
<response>
<soap-header-content />
<soap-body-content>
<ValidateZipResponse xmlns="http://webservicemart.com/ws/">
<ValidateZipResult><result code="200"><item zip="94041" state="CA" latitude ="37.38949" longitude ="-122.07846"/></result></ValidateZipResult>
</ValidateZipResponse>
</soap-body-content>
</response>
</soap-response>
The following figure shows an XML sample of an adapter response to a request that supports custom HTTP headers.
XML sample of the Web Services adapter response to a request that supports custom HTTP headers
<soap-response>
<metadata>
<status>success</status>
</metadata>
<response>
<soap-header-content />
<soap-body-content>
<addResponse xmlns="http://service.calc.netbeans.com/">
<return xmlns="">8</return>
</addResponse>
</soap-body-content>
</response>
</soap-response>