Creating Objects and Arrays for Web Service Method Calls

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

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
Testing Web Services - Overview
Testing Web Services

Highlight search results