Creating Objects and Arrays for Web Service Method Calls

Applies to TestComplete 15.48, last modified on January 31, 2023
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.

To call a web service’s method from a keyword test or script, you should prepare the method's parameters. Web service methods can use parameters of an object or array type. To call these methods from script, you need to create an appropriate object and assign values to its properties before calling the method. You can easily generate object creation code:

  1. Open the desired WebService element for editing. To do this, right-click the element in the Project Explorer panel and choose Edit from the context menu. This will invoke the WebService editor.

  2. In the editor, select the desired data type in the tree (select the type’s node, not its child node).

  3. Click Code in the Data Type cell. TestComplete will generate the code for creating the object and will invoke the Generated Code dialog displaying the generated text. If the properties of the object refer to other objects, TestComplete will generate the code for these child objects as well. You can then copy the code from the dialog and paste it into your script unit.

See Also

Creating Web Service Tests
About Testing Web Services
About Testing Web Services

Highlight search results