PrepareRequest Method

Applies to TestComplete 14.93, last modified on October 12, 2021

Description

Use the WebServiceInfo.PrepareRequest method to generate the contents of a SOAP request to be sent to a web service method. The PrepareRequest method returns an object that implements the IXMLDOMDocument interface (SOAP uses XML and the request contents match the DOM object model). You can use methods and properties of this interface to work with the SOAP request contents.

Declaration

WebServiceInfoObj.PrepareRequest(MethodName, RequestObject)

WebServiceInfoObj An expression, variable or parameter that specifies a reference to a WebServiceInfo object
MethodName [in]    Required    String    
RequestObject [in]    Required    Object    
Result An IXMLDOMDocument object

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

MethodName

A string holding the name of the desired web service method.

RequestObject

An object that holds input parameters for the MethodName method. You can obtain this object using the ParseRequest or PrepareRequestObject method.

Result Value

An object implementing the IXMLDOMDocument interface.

Remarks

For information on methods and properties of the IXMLDOMDocument interface and about DOM, see the XML Core Services and Document Object Model article in the MSDN Library.

Example

You can find an example that demonstrates how you can use the PrepareRequest method for creating the contents of a SOAP request to be sent to a web service method in the Preparing SOAP Requests in Scripts help topic.

See Also

TypeFactory Property
ParseRequest Method
ParseResponse Method
PrepareRequestObject Method
Prepare SOAP Requests in Scripts

Highlight search results