This section describes how to define a SOAP request based on some XML rather than starting on a WSDL definition.
This will be illustrated by continuing the previous example and by invoking the ValidateImageWord method. This method expects two parameters, an image identifier, the CaptchaImageGuid, returned by the GetNewWord method and the text entered by a user. The ValidateImageWord method will return true if the text entered by the user and the captcha image are consistent. The XML you will be building your SOAP request on follows:
Select the Design section: Click on the Design button.
Add a new SOAP request: Right-click the Virtual User just created and select Insert into, then SOAP request.
Specify a manually-generated request: Check the Generate request manually option. Click Next.
Enter a name for the request: Enter a name for the manually-defined request. In the example you will name the request ValidateImageWord. Click Next.
Define the end-point of the request: This is the URL where the service is located. You can also change this later on. In the example the service end point is http://ws.strikeiron.com:80/textdisguise/CaptchaService. Click Finish.
Check main configuration elements: At this stage the SOAP request is added to the Virtual User. You can rename this node to your convenience. In the example a ValidateImageWord node has been added at the end of the existing SOAP requests. NeoLoad right panel displays the main configuration elements of the SOAP request. This includes the end point URL which is defined by both the Server and Path elements. These elements can be changed to custom values. As with HTTP requests, the Path element can been defined using NeoLoad variables.
Check the HTTP headers: Most SOAP requests require at least two HTTP header elements when SOAP is tunneled through HTTP. Always make sure that these elements are correctly set. They are available in the Advanced parameters dialog box and are accessed by selecting the Advanced button. In the example these elements are ContentType and SOAPAction.
Configure the XML content:
To configure the XML content, select the Edit XML Content button.
At this stage you must define the XML request either by copying and pasting a request you have tested or by manually defining each element and attribute of the request. You will be using the first method in the example.
Copying and pasting an existing XML request using the Flat XML panel is the easiest way to define the XML content of the request. In the example you have copied and pasted the XML containing the call to the ValidateImageWord method.
You could also use the XML Tree panel to manually define or to edit the XML using elements and attributes. NeoLoad automatically constructs one view from the other (the XML tree view from the flat view and vice versa).
At this stage the request is completely defined and configured, you can immediately start testing it.
Test the SOAP request:
By creating a temporary Virtual User, NeoLoad provides an easy and quick method to check your SOAP request. Select the Check button to open the Check Virtual User dialog box.
Start checking: If you have already tested Virtual Users using NeoLoad you will be familiar with the following dialog box. By selecting the Start checking button, NeoLoad will send the SOAP request to the specified end point. NeoLoad displays the associated response code and the number of failed assertions for the sent request. When the line associated to the request is selected the dialog box displays further details in the lower part of the dialog box. You can choose to display the SOAP request that was sent or the XML response. You can search the SOAP request or the XML response for a particular expression by right clicking on the XML and selecting the Search item (or using the CTRL+F shortcut keys). You can neatly format SOAP request or the XML response by right clicking on the XML and selecting the Format as pretty XML item.