PrepareRequestObject Method

Applies to TestComplete 15.64, last modified on May 16, 2024
Testing web services with TestComplete is obsolete. We recommend that you use ReadyAPI, another SmartBear's automated testing tool for SOAP and REST web services.
If needed, you can run ReadyAPI tests from TestComplete.


Use the WebServiceInfo.PrepareRequestObject method to get an object holding input parameters for a web service method. You can then use properties of the returned object to specify the desired parameter values to be passed to the web service method.



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

Applies To

The method is applied to the following object:


The method has the following parameter:


A string holding the name of a web service method.

Result Value

The PrepareRequestObject method creates and returns an object that holds input data for a specified web service method. This object contains properties whose names coincide with the names of the method’s input parameters.


You can also create an object that holds input parameters for a web service method using the ParseRequest method. The difference is that the PrepareRequestObject method returns an object whose properties are not initialized, whereas the properties of an object returned by the ParseRequest method hold values specified in the SOAP request.

To generate the new contents of a SOAP request for a web service method, use the PrepareRequest method.


You can find an example that demonstrates how you can use the PrepareRequestObject method for creating an object that holds input parameters for the specified web service method in the Preparing SOAP Requests in Scripts help topic.

See Also

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

Highlight search results