Share this page

# Add Web Service script content

Web Services scripts let you test your environment by emulating Web Service clients.

After creating an empty Web Services script, as described in Create a New Script dialog box, you add content through one of the following methods: recording, manually inserting Web Service calls, importing SOAP, or by analyzing server traffic.

In this topic:

## Record a Web Services script

By recording a Web Services session, you capture the events of a typical business process. If you have already built a client that interacts with the Web Service, you can record all of the actions that the client performs. The resulting script emulates the operations of your Web Service client. After recording, you can add more Web Service calls and make other enhancements to the script.

When you record an application, you can record it with or without a Web Service WSDL file. If you include a WSDL file, you can create a script by selecting the required methods and entering values for their arguments. VuGen creates a descriptive script that can be updated when there are changes in the WSDL.

If you record a script without previously importing a service (not recommended), VuGen creates SOAP requests instead of Web Service call steps. SOAP request arguments are less intuitive and harder to maintain.

For more information, see Add content.

## Add new Web Service calls

You can create a Web Services script by manually adding Web Service calls. You design the call based on operation, transport, arguments, and other properties.

For more information, see Add content.

## Import SOAP requests

VuGen lets you create Web Service calls from SOAP files. If you have a SOAP request file, you can load it directly into your script. VuGen imports the entire SOAP request (excluding the security headers) with the argument values as they were defined in the XML elements. By importing the SOAP, you do not need to set argument values manually as in standard Web Service calls.

For example, suppose you have a SOAP request with the following elements:

    - <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      - <q1:AddAddr xmlns:q1="http://tempuri.org/AddrBook/message/">
                <Addr href="#id1" />
        </q1:AddAddr>
       - <q2:Addr id="id1" xsi:type="q2:Addr" xmlns:q2="http://tempuri.org/AddrBook/type/">
            <name xsi:type="xsd:string">Tom Smith</name>
                 <street xsi:type="xsd:string">15 Elm Street</street>
                 <city xsi:type="xsd:string">Phoenix</city>
                <state xsi:type="xsd:string">AZ</state>
                <zip-code xsi:type="xsd:string">97432</zip-code>
                <phone-numbers href="#id2" />
                <birthday xsi:type="xsd:date">1983-04-22</birthday>
         </q2:Addr>
    ...

When you import the SOAP request, VuGen imports all of the values to the Web Service call. To view the values, in the Step Navigator, right-click the step and then click Show Arguments.

To create a new Web Service call based on a SOAP request, you must first import a WSDL file. If a WSDL is not available, or if you want to send the SOAP traffic directly, you can create a SOAP Request step. You specify the URL of the server, the SOAP action, and the response parameter.

In the Editor, the SOAP Request step appears as a soap_request function, described in the Function Reference.

For more information, see Add content.

## Analyze server traffic

The main focus when testing enterprises and complex systems, is to measure the performance from the client end. Ordinarily, VuGen records the actions you perform in the application or browser, and generates a script emulating the client actions and requests to the server.

In certain test environments, you may be unable to record the client application to retrieve the requests to the server. This may be a result of the server acting as a client, or because you do not have access to the client application. In these cases, you can create a script using VuGen's Analyze Traffic feature.

The Analyze Traffic feature examines a capture file containing the server network traffic, and creates a script that emulates requests sent to or from the server.

For more information, see Create a script by analyzing traffic (Web Services).

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: