Preparing SOAP Requests in Scripts

Applies to TestComplete 12.60, last modified on September 17, 2018

This topic describes how you can create custom SOAP requests in TestComplete scripts and send these requests to the tested web service methods.

General Information

Usually, to perform functional testing of a web service with TestComplete, you directly call the needed methods of the service from your test and pass the required parameters to the methods (see Testing Web Services - Overview). However, sometimes, you may need to submit custom requests to the tested web service methods. Web services use the SOAP protocol to transmit data in the XML format to web service methods and to return the results to the caller.

The SOAP protocol supposes that XML data transmitted to a web service in a request consist of a root Envelope element, which includes the required Body element (the SOAP body part) and an optional Header element (the SOAP header part). Method parameters are transferred in the request’s SOAP body. SOAP headers can contain some additional information transmitted to a web service. For instance, SOAP headers may be used for passing authentication credentials to a web service. For more information on the format of SOAP requests, see the Understanding SOAP article in the MSDN Library.

In your TestComplete test, you can use methods of the WebServiceInfo program object to create an XML document with a SOAP body to be sent to a web service method. Using the object returned by the PrepareRequestObject method, you can easily specify the needed values of the parameters to be passed to the tested web service method. This object is then used by the PrepareRequest method to create an appropriate XML document with the method parameters specified in the SOAP body. So, there is no need to directly edit this document in your test to specify the method parameters. However, this XML document does not contain a SOAP header. Currently, to specify a SOAP header in TestComplete, you need to programmatically create the needed XML elements representing the SOAP header and insert them into the XML document created for the SOAP request. Below in this topic, we will provide an example that demonstrates how you can create custom SOAP requests with SOAP headers in your TestComplete tests.

The Algorithm of Preparing SOAP Requests in Scripts

Below are general instructions on preparing a SOAP request and sending it to the tested web service method from scripts:

  1. Create a WebServiceInfo object by calling the WebServices.CreateWebServiceInfo or WebServices.CreateWebServiceInfoFromItem method (the latter is preferable when the tested web service is added to the Web Services project item).

  2. Call the PrepareRequestObject method to create an object that will hold parameters to be passed to the specified web service method.

  3. Specify parameters of the web service method by assigning the needed values to the properties of the object returned by the PrepareRequestObject method. This object contains properties whose names coincide with the names of the method’s parameters.

  4. Call the PrepareRequest method to generate an XML document with the contents of the SOAP request to be sent to the specified web service method. PrepareRequest returns an object that implements the IXMLDOMDocument interface. Using the properties and methods of this program interface, you can work with the contents of the created XML document. For detailed information, see the description of the IXMLDOMDocument interface in the MSDN Library.

  5. Use the capabilities of the IXMLDOMDocument interface to modify the contents of the SOAP request created by the PrepareRequest method. This mainly may be needed if you want to specify a SOAP header in the request. In this case, you need to create a Header XML element, add the header’s data as child XML elements to it and insert the created XML data into the SOAP request. For detailed information on how to use the IXMLDOMDocument interface to change XML data, see its documentation in the MSDN Library.

    If the tested web service does not require that SOAP requests contain SOAP headers, then there is no need to modify the contents of the SOAP request created by the PrepareRequest method. Such a request already contains the SOAP body with the method parameters that were specified via the properties of the object returned by the PrepareRequestObject method. However, if you need, you can also modify the SOAP body by using the IXMLDOMDocument program interface.

  6. Send the created XML data to the web service via the HTTP protocol. For this purpose, create an XMLHTTP object that allows sending XML data within requests to an HTTP server and receiving server responses. Using the open and send methods of the IXMLHTTPRequest interface implemented in the XMLHTTP object, you can easily send the created SOAP request to the tested web service method. For detailed information, see the documentation on the XMLHTTP object and on the IXMLHTTPRequest interface in the MSDN Library.

  7. (Optional.) If you want to work with the method’s return data in your scripts, you can get the response body as an XML document:

    JavaScript, JScript

    ResponseXML = XmlHttpRequest.responseXML;
    Log.Message("See the response's XML data in the Additional Information pane", responseXML.xml);

    Python

    ResponseXML = XmlHttpRequest.responseXML
    Log.Message("See the response's XML data in the Additional Information pane", responseXML.xml)

    VBScript

    Set ResponseXML = XmlHttpRequest.responseXML
    Call Log.Message("See the response's XML data in the Additional Information pane", responseXML.xml)

    DelphiScript

    ResponseXML := XmlHttpRequest.responseXML;
    Log.Message('See the response''s XML data in the Additional Information pane ', responseXML.xml);

    C++Script, C#Script

    ResponseXML = XmlHttpRequest["responseXML"];
    Log["Message"]("See the response's XML in the Additional Information pane", responseXML["xml"]);

    Then, you can work with the obtained XML document, or parse it using the ParseResponse method and work with the resulting object. This object contains properties whose names coincide with the names of the method’s output parameters:

    JavaScript, JScript

    Response = ServiceInfo.ParseResponse("MethodName", ResponseXML);
    Log.Message("Result Value: " + Response.resultValue);

    Python

    Response = ServiceInfo.ParseResponse("MethodName", ResponseXML)
    Log.Message("Result Value: " + Response.resultValue)

    VBScript

    Set Response = ServiceInfo.ParseResponse("MethodName", ResponseXML)
    Call Log.Message("Result Value: " & Response.resultValue)

    DelphiScript

    Response := ServiceInfo.ParseResponse('MethodName', ResponseXML);
    Log.Message('Result Value: ' + Response.resultValue);

    C++Script, C#Script

    Response = ServiceInfo["ParseResponse"]("MethodName", ResponseXML);
    Log["Message"]("Result Value: " + Response["resultValue"]);

Adding WCF Authentication Headers to SOAP Requests

If the tested web service uses the WCF technology and requires complex authentication, it is impossible to create a proper request header from scripts.

In this case, create a request using the WebServices object as described in the Creating Web Service Tests topic.

To modify a request, use the OnWebServiceRequest event. You can use it to:

Example

The script code below demonstrates how you can prepare SOAP requests and send them to the tested web service method from your scripts. The example sends a SOAP request to a web service method named ProcessData. The method takes two integer values and an array of integers as input parameters (the ItemCount, MaxVolume and Items parameters, respectively). Besides these input parameters, the method requires authentication credentials to be sent within the SOAP request’s header. As it is defined in the tested web service’s WSDL document, these credentials must be specified in the UserID and Password child elements of the Credentials XML element included in the request’s SOAP header. The script below creates these XML elements, sets the “jsmith” and “25jeL3n” values in them as the user’s identifier and password, respectively, and adds the elements holding the specified values to the SOAP request by using the IXMLDOMDocument program interface.

JavaScript

function WebServiceMethodTest()
{
  var MethodName;
  var ServiceInfo, RequestObj, RequestXml;
  var ArrayObj;
  var Root, HeaderNode, CredentialsNode, UserIDNode, PasswordNode;
  var HeaderElement, CredentialsElement, UserIDElement, PasswordElement;
  var UserIDValue, PasswordValue;
  var XmlHttpRequest;

  // Specify the name of the web service method to be tested
  MethodName = "ProcessData";

  // Create a WebServiceInfo object
  ServiceInfo = WebServices.CreateWebServiceInfoFromItem("WebService1");

  // Create an object with the method's input parameters
  RequestObj = ServiceInfo.PrepareRequestObject(MethodName);

  // Specify the values of the ItemCount and MaxVolume method parameters
  RequestObj.ItemCount = 5;
  RequestObj.MaxVolume = 30;

  // Create an array of 5 elements for the Items parameter
  ArrayObj = ServiceInfo.TypeFactory.ArrayOfInt;
  ArrayObj.int = BuiltIn.CreateVariantArray(0, 4);

  // Initialize the array
  ArrayObj.int(0) = 1;
  ArrayObj.int(1) = 3;
  ArrayObj.int(2) = 5;
  ArrayObj.int(3) = 7;
  ArrayObj.int(4) = 9;

  // Use the created array as the Items parameter
  RequestObj.Items = ArrayObj;

  // Make an XML document for the SOAP request
  RequestXml = ServiceInfo.PrepareRequest(MethodName, RequestObj);

  // Modify the XML data and add a SOAP header with credentials

  Root = RequestXml.documentElement;

  // Create a Header element and insert it into the request
  HeaderElement = RequestXml.createElement("s:Header");
  HeaderNode = Root.insertBefore(HeaderElement, Root.childNodes.item(0));

  // Create a Credentials element and insert it into the header
  CredentialsElement = RequestXml.createNode(1, "Credentials", "http://tempuri.org/");
  CredentialsNode = HeaderNode.appendChild(CredentialsElement);

  // Create a UserID element within the Credentials element
  // and specify the user identifier
  UserIDElement = RequestXml.createNode(1, "UserID", "http://tempuri.org/");
  UserIDNode = CredentialsNode.appendChild(UserIDElement);
  UserIDValue = RequestXml.createTextNode("jsmith");
  UserIDNode.appendChild(UserIDValue);

  // Create a Password element within the Credentials element
  // and specify the password
  PasswordElement = RequestXml.createNode(1, "Password", "http://tempuri.org/");
  PasswordNode = CredentialsNode.appendChild(PasswordElement);
  PasswordValue = RequestXml.createTextNode("25jeL3n");
  PasswordNode.appendChild(PasswordValue);

  // Create an XMLHTTP object for sending the SOAP request
  XmlHttpRequest = getActiveXObject("MSXML2.XMLHTTP.3.0");

  // Send the created SOAP request to the web service
  XmlHttpRequest.open("POST", "http://www.myserver.com/WebServices/MyService.asmx", false);
  XmlHttpRequest.send(RequestXml);
}

JScript

function WebServiceMethodTest()
{
  var MethodName;
  var ServiceInfo, RequestObj, RequestXml;
  var ArrayObj;
  var Root, HeaderNode, CredentialsNode, UserIDNode, PasswordNode;
  var HeaderElement, CredentialsElement, UserIDElement, PasswordElement;
  var UserIDValue, PasswordValue;
  var XmlHttpRequest;

  // Specify the name of the web service method to be tested
  MethodName = "ProcessData";

  // Create a WebServiceInfo object
  ServiceInfo = WebServices.CreateWebServiceInfoFromItem("WebService1");

  // Create an object with the method's input parameters
  RequestObj = ServiceInfo.PrepareRequestObject(MethodName);

  // Specify the values of the ItemCount and MaxVolume method parameters
  RequestObj.ItemCount = 5;
  RequestObj.MaxVolume = 30;

  // Create an array of 5 elements for the Items parameter
  ArrayObj = ServiceInfo.TypeFactory.ArrayOfInt;
  ArrayObj.int = BuiltIn.CreateVariantArray(0, 4);

  // Initialize the array
  ArrayObj.int(0) = 1;
  ArrayObj.int(1) = 3;
  ArrayObj.int(2) = 5;
  ArrayObj.int(3) = 7;
  ArrayObj.int(4) = 9;

  // Use the created array as the Items parameter
  RequestObj.Items = ArrayObj;

  // Make an XML document for the SOAP request
  RequestXml = ServiceInfo.PrepareRequest(MethodName, RequestObj);

  // Modify the XML data and add a SOAP header with credentials

  Root = RequestXml.documentElement;

  // Create a Header element and insert it into the request
  HeaderElement = RequestXml.createElement("s:Header");
  HeaderNode = Root.insertBefore(HeaderElement, Root.childNodes.item(0));

  // Create a Credentials element and insert it into the header
  CredentialsElement = RequestXml.createNode(1, "Credentials", "http://tempuri.org/");
  CredentialsNode = HeaderNode.appendChild(CredentialsElement);

  // Create a UserID element within the Credentials element
  // and specify the user identifier
  UserIDElement = RequestXml.createNode(1, "UserID", "http://tempuri.org/");
  UserIDNode = CredentialsNode.appendChild(UserIDElement);
  UserIDValue = RequestXml.createTextNode("jsmith");
  UserIDNode.appendChild(UserIDValue);

  // Create a Password element within the Credentials element
  // and specify the password
  PasswordElement = RequestXml.createNode(1, "Password", "http://tempuri.org/");
  PasswordNode = CredentialsNode.appendChild(PasswordElement);
  PasswordValue = RequestXml.createTextNode("25jeL3n");
  PasswordNode.appendChild(PasswordValue);

  // Create an XMLHTTP object for sending the SOAP request
  XmlHttpRequest = new ActiveXObject("MSXML2.XMLHTTP.3.0");

  // Send the created SOAP request to the web service
  XmlHttpRequest.open("POST", "http://www.myserver.com/WebServices/MyService.asmx", false);
  XmlHttpRequest.send(RequestXml);
}

Python

def WebServiceMethodTest():
  
  # Specify the name of the web service method to be tested
  MethodName = "ProcessData";

  # Create a WebServiceInfo object
  ServiceInfo = WebServices.CreateWebServiceInfoFromItem("WebService1");

  # Create an object with the method's input parameters 
  RequestObj = ServiceInfo.PrepareRequestObject(MethodName);

  # Specify the values of the ItemCount and MaxVolume method parameters
  RequestObj.ItemCount = 5;
  RequestObj.MaxVolume = 30;

  # Create an array of 5 elements for the Items parameter
  ArrayObj = ServiceInfo.TypeFactory.ArrayOfInt;
  ArrayObj.int = BuiltIn.CreateVariantArray(0, 4);

  # Initialize the array
  ArrayObj.int[0] = 1;
  ArrayObj.int[1] = 3;
  ArrayObj.int[2] = 5;
  ArrayObj.int[3] = 7;
  ArrayObj.int[4] = 9;

  # Use the created array as the Items parameter
  RequestObj.Items = ArrayObj;

  # Make an XML document for the SOAP request
  RequestXml = ServiceInfo.PrepareRequest(MethodName, RequestObj);
    
  # Modify the XML data and add a SOAP header with credentials
  
  Root = RequestXml.documentElement;

  # Create a Header element and insert it into the request
  HeaderElement = RequestXml.createElement("s:Header");
  HeaderNode = Root.insertBefore(HeaderElement, Root.childNodes.item[0]);

  # Create a Credentials element and insert it into the header
  CredentialsElement = RequestXml.createNode(1, "Credentials", "http://tempuri.org/");
  CredentialsNode = HeaderNode.appendChild(CredentialsElement);

  # Create a UserID element within the Credentials element
  # and specify the user identifier
  UserIDElement = RequestXml.createNode(1, "UserID", "http://tempuri.org/");
  UserIDNode = CredentialsNode.appendChild(UserIDElement);
  UserIDValue = RequestXml.createTextNode("jsmith");
  UserIDNode.appendChild(UserIDValue);

  # Create a Password element within the Credentials element
  # and specify the password
  PasswordElement = RequestXml.createNode(1, "Password", "http://tempuri.org/");
  PasswordNode = CredentialsNode.appendChild(PasswordElement);
  PasswordValue = RequestXml.createTextNode("25jeL3n");
  PasswordNode.appendChild(PasswordValue);

  # Create an XMLHTTP object for sending the SOAP request
  XmlHttpRequest = Sys.OleObject["MSXML2.XMLHTTP.3.0"];

  # Send the created SOAP request to the web service
  XmlHttpRequest.open("POST", "http://www.myserver.com/WebServices/MyService.asmx", False);
  XmlHttpRequest.send(RequestXml);

VBScript

Sub WebServiceMethodTest
  Dim MethodName
  Dim ServiceInfo, RequestObj, RequestXml
  Dim ArrayObj
  Dim Root, HeaderNode, CredentialsNode, UserIDNode, PasswordNode
  Dim HeaderElement, CredentialsElement, UserIDElement, PasswordElement
  Dim UserIDValue, PasswordValue
  Dim XmlHttpRequest

  ' Specify the name of the web service method to be tested
  MethodName = "ProcessData"

  ' Create a WebServiceInfo object
  Set ServiceInfo = WebServices.CreateWebServiceInfoFromItem("WebService1")

  ' Create an object with the method's input parameters
  Set RequestObj = ServiceInfo.PrepareRequestObject(MethodName)

  ' Specify the values of the ItemCount and MaxVolume method parameters
  RequestObj.ItemCount = 5
  RequestObj.MaxVolume = 30

  ' Create an array of 5 elements for the Items parameter
  Set ArrayObj = ServiceInfo.TypeFactory.ArrayOfInt
  ArrayObj.int = BuiltIn.CreateVariantArray(0, 4)

  ' Initialize the array
  ArrayObj.int(0) = 1
  ArrayObj.int(1) = 3
  ArrayObj.int(2) = 5
  ArrayObj.int(3) = 7
  ArrayObj.int(4) = 9

  ' Use the created array as the Items parameter
  Set RequestObj.Items = ArrayObj

  ' Make an XML document for the SOAP request
  Set RequestXml = ServiceInfo.PrepareRequest(MethodName, RequestObj)

  ' Modify the XML data and add a SOAP header with credentials

  Set Root = RequestXml.documentElement

  ' Create a Header element and insert it into the request
  Set HeaderElement = RequestXml.createElement("s:Header")
  Set HeaderNode = Root.insertBefore(HeaderElement, Root.childNodes.item(0))

  ' Create a Credentials element and insert it into the header
  Set CredentialsElement = RequestXml.createNode(1, "Credentials", "http://tempuri.org/")
  Set CredentialsNode = HeaderNode.appendChild(CredentialsElement)

  ' Create a UserID element within the Credentials element
  ' and specify the user identifier
  Set UserIDElement = RequestXml.createNode(1, "UserID", "http://tempuri.org/")
  Set UserIDNode = CredentialsNode.appendChild(UserIDElement)
  Set UserIDValue = RequestXml.createTextNode("jsmith")
  Call UserIDNode.appendChild(UserIDValue)

  ' Create a Password element within the Credentials element
  ' and specify the password
  Set PasswordElement = RequestXml.createNode(1, "Password", "http://tempuri.org/")
  Set PasswordNode = CredentialsNode.appendChild(PasswordElement)
  Set PasswordValue = RequestXml.createTextNode("25jeL3n")
  Call PasswordNode.appendChild(PasswordValue)

  ' Create an XMLHTTP object for sending the SOAP request
  Set XmlHttpRequest = CreateObject("MSXML2.XMLHTTP.3.0")

  ' Send the created SOAP request to the web service
  Call XmlHttpRequest.open("POST", "http://www.myserver.com/WebServices/MyService.asmx", False)
  Call XmlHttpRequest.send(RequestXml)
End Sub

DelphiScript

procedure WebServiceMethodTest;
  var MethodName: OleVariant;
  var ServiceInfo, RequestObj, RequestXml: OleVariant;
  var ArrayObj: OleVariant;
  var Root, HeaderNode, CredentialsNode, UserIDNode, PasswordNode: OleVariant;
  var HeaderElement, CredentialsElement, UserIDElement, PasswordElement: OleVariant;
  var UserIDValue, PasswordValue: OleVariant;
  var XmlHttpRequest: OleVariant;
begin
  // Specify the name of the web service method to be tested
  MethodName := 'ProcessData';

  // Create a WebServiceInfo object
  ServiceInfo := WebServices.CreateWebServiceInfoFromItem('WebService1');

  // Create an object with the method's input parameters
  RequestObj := ServiceInfo.PrepareRequestObject(MethodName);

  // Specify the values of the ItemCount and MaxVolume method parameters
  RequestObj.ItemCount := 5;
  RequestObj.MaxVolume := 30;

  // Create an array of 5 elements for the Items parameter
  ArrayObj := ServiceInfo.TypeFactory.ArrayOfInt;
  ArrayObj.int := BuiltIn.CreateVariantArray(0, 4);

  // Initialize the array
  ArrayObj.int(0) := 1;
  ArrayObj.int(1) := 3;
  ArrayObj.int(2) := 5;
  ArrayObj.int(3) := 7;
  ArrayObj.int(4) := 9;

  // Use the created array as the Items parameter
  RequestObj.Items := ArrayObj;

  // Make an XML document for the SOAP request
  RequestXml := ServiceInfo.PrepareRequest(MethodName, RequestObj);

  // Modify the XML data and add a SOAP header with credentials

  Root := RequestXml.documentElement;

  // Create a Header element and insert it into the request
  HeaderElement := RequestXml.createElement('s:Header');
  HeaderNode := Root.insertBefore(HeaderElement, Root.childNodes.item(0));

  // Create a Credentials element and insert it into the header
  CredentialsElement := RequestXml.createNode(1, 'Credentials', 'http://tempuri.org/');
  CredentialsNode := HeaderNode.appendChild(CredentialsElement);

  // Create a UserID element within the Credentials element
  // and specify the user identifier
  UserIDElement := RequestXml.createNode(1, 'UserID', 'http://tempuri.org/');
  UserIDNode := CredentialsNode.appendChild(UserIDElement);
  UserIDValue := RequestXml.createTextNode('jsmith');
  UserIDNode.appendChild(UserIDValue);

  // Create a Password element within the Credentials element
  // and specify the password
  PasswordElement := RequestXml.createNode(1, 'Password', 'http://tempuri.org/');
  PasswordNode := CredentialsNode.appendChild(PasswordElement);
  PasswordValue := RequestXml.createTextNode('25jeL3n');
  PasswordNode.appendChild(PasswordValue);

  // Create an XMLHTTP object for sending the SOAP request
  XmlHttpRequest := Sys.OleObject('MSXML2.XMLHTTP.3.0');

  // Send the created SOAP request to the web service
  XmlHttpRequest.open('POST', 'http://www.myserver.com/WebServices/MyService.asmx', false);
  XmlHttpRequest.send(RequestXml);
end;

C++Script, C#Script

function WebServiceMethodTest()
{
  var MethodName;
  var ServiceInfo, RequestObj, RequestXml;
  var ArrayObj;
  var Root, HeaderNode, CredentialsNode, UserIDNode, PasswordNode;
  var HeaderElement, CredentialsElement, UserIDElement, PasswordElement;
  var UserIDValue, PasswordValue;
  var XmlHttpRequest;

  // Specify the name of the web service method to be tested
  MethodName = "ProcessData";

  // Create a WebServiceInfo object
  ServiceInfo = WebServices["CreateWebServiceInfoFromItem"]("WebService1");

  // Create an object with the method's input parameters
  RequestObj = ServiceInfo["PrepareRequestObject"](MethodName);

  // Specify the values of the ItemCount and MaxVolume method parameters
  RequestObj["ItemCount"] = 5;
  RequestObj["MaxVolume"] = 30;

  // Create an array of 5 elements for the Items parameter
  ArrayObj = ServiceInfo["TypeFactory"]["ArrayOfInt"];
  ArrayObj["int"] = BuiltIn["CreateVariantArray"](0, 4);

  // Initialize the array
  ArrayObj["int"](0) = 1;
  ArrayObj["int"](1) = 3;
  ArrayObj["int"](2) = 5;
  ArrayObj["int"](3) = 7;
  ArrayObj["int"](4) = 9;

  // Use the created array as the Items parameter
  RequestObj["Items"] = ArrayObj;

  // Make an XML document for the SOAP request
  RequestXml = ServiceInfo["PrepareRequest"](MethodName, RequestObj);

  // Modify the XML data and add a SOAP header with credentials

  Root = RequestXml["documentElement"];

  // Create a Header element and insert it into the request
  HeaderElement = RequestXml["createElement"]("s:Header");
  HeaderNode = Root["insertBefore"](HeaderElement, Root["childNodes"]["item"](0));

  // Create a Credentials element and insert it into the header
  CredentialsElement = RequestXml["createNode"](1, "Credentials", "http://tempuri.org/");
  CredentialsNode = HeaderNode["appendChild"](CredentialsElement);

  // Create a UserID element within the Credentials element
  // and specify the user identifier
  UserIDElement = RequestXml["createNode"](1, "UserID", "http://tempuri.org/");
  UserIDNode = CredentialsNode["appendChild"](UserIDElement);
  UserIDValue = RequestXml["createTextNode"]("jsmith");
  UserIDNode["appendChild"](UserIDValue);

  // Create a Password element within the Credentials element
  // and specify the password
  PasswordElement = RequestXml["createNode"](1, "Password", "http://tempuri.org/");
  PasswordNode = CredentialsNode["appendChild"](PasswordElement);
  PasswordValue = RequestXml["createTextNode"]("25jeL3n");
  PasswordNode["appendChild"](PasswordValue);

  // Create an XMLHTTP object for sending the SOAP request
  XmlHttpRequest = new ActiveXObject("MSXML2.XMLHTTP.3.0");

  // Send the created SOAP request to the web service
  XmlHttpRequest["open"]("POST", "http://www.myserver.com/WebServices/MyService.asmx", false);
  XmlHttpRequest["send"](RequestXml);
}

The contents of the SOAP request created by the script above and sent to the tested web service method look like the following XML document:

XML

<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <Credentials>
      <UserID>jsmith</UserID>
      <Password>25jeL3n</Password>
    </Credentials>
  </s:Header>
  <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://tempuri.org/">
    <ns1: ProcessData>
      <ns1: ItemCount>5</ns1: ItemCount>
      <ns1: MaxVolume>30</ns1: MaxVolume>
      <ns1: Items xsi:type="ArrayOfInt">
        <ns1: int>1</ns1: int>
        <ns1: int>3</ns1: int>
        <ns1: int>5</ns1: int>
        <ns1: int>7</ns1: int>
        <ns1: int>9</ns1: int>
      </ns1: Items>
    </ns1: ProcessData>
  </s:Body>
</s:Envelope>

See Also

Testing Web Services - Overview
Creating Web Service Tests
WebServiceInfo Object
Testing Web Services

Highlight search results