Add content
This topic describes how to add content, such as Web Service calls, to a Web Services Vuser script.
Create an empty Web Services Vuser script. Click File > New Script and Solution and choose the Web Services protocol. You can create either a single-protocol or multi-protocol Vuser script.
-
Click the Start Recording button on the VuGen toolbar or press Ctrl+R to open the Recording Wizard > Specify Services screen.
For user interface details, see Specify Services dialog box.
-
Add services to the list. Click Import to load a WSDL for the test. Indicate the location of the WSDL file.
For user interface details, see Import Service dialog box.
-
Click Next. Specify the location of the application and any other relevant arguments. See the Specify Application to Record dialog box.
-
Import a service. Click Manage Services to access the Import dialog box.
For user interface details, see Import Service dialog box.
-
Click the cursor at the relevant location in your script (Editor) or in the test steps (Step Navigator).
-
Click the Add Service Call button. The New Web Service Call dialog box opens.
-
In the Select Web Service Call section, select a Service, Port Name, and Operation.
-
To specify an endpoint other than the default Target Address, select Override Address and insert the new endpoint to which you want to submit the requests.
-
Expand the nodes and specify argument values. To create sample values for all Input arguments, select the Input Arguments node and click Generate.
Tip: To instruct VuGen to interpret a string as text, and not markup data, you can use a CDATA section. For example, suppose you want to specify an input string “<3558>&abc”. Instead of using escape characters such as <3558>&abc, add a CDATA section in the following format: <![CDATA[<3558>&abc]]>.
To edit, import, or export the element's XML structure, see Assign values to XML elements.
-
To parameterize an input argument, click the node and select the Value option. Click the ABC icon and proceed with parameterization. For more information, see Parameterization.
-
Select the Transport Layer Configuration node to specify advanced options, such as JMS transport for SOAP messages (Axis toolkit only), asynchronous messaging, or WS Addressing. For more information, see Send messages over JMS.
-
To add an attachment to an input argument, choose an operation in the left pane. Select Add to request (Input). VuGen prompts you to enter information about the attachment and adds it to the method's tree structure. For details, see the Add Input Attachment dialog box.
-
To specify an output attachment through which to store output arguments, choose an operation in the left pane. Select Save received (Output). Select the relevant option: Save All Attachments or Save Attachment by Index based on their index number—beginning with 1. For details, see Web Service call attachments.
-
To edit the properties of either an Input or Output attachment, click the attachment in the left pane, and enter the required information in the right pane.
Select the CustomSOAP Header node in the left pane and enable the Use SOAP header option. You must individually specify SOAP headers for each element. To compose your own, click Edit and edit the XML. To import an XML file for the SOAP header, click Import.
-
Import a service if one is available. Click Manage Services to access the Import dialog box. For more information, see the Import Service dialog box.
-
Click the Import SOAP button to open the Import SOAP dialog box.
-
Browse for the XML file that represents your SOAP request.
-
Select the type of step you would like to generate: Create Web Service Call or Create SOAP Request. In order to create a Web Service Call, you must first import at least one WSDL that describes the operation in the SOAP request file. To view the SOAP before loading it, click View SOAP.
-
Click Load to import the XML element values.
For a Web Service Call, set the properties for the Service call as described in the New Web Service Call dialog box.
For a SOAP Request, provide the URL and the other relevant parameters.
-
For a Web Service Call, if there are multiple services with same operation (method) names, select the service whose SOAP traffic you want to import.
-
Click OK to generate the new step within your script.
To create a script by analyzing a file containing a dump of the server traffic, click Analyze Traffic.
For details, see Server traffic scripts overview.