Send messages over HTTP/S

This task describes how to send messages using the HTTP transport method.

  1. Open the step properties.

    In the Step Navigator, select the step whose transport you want to set, and then select Show Arguments from the shortcut menu.

  2. Select the HTTP/S transport method.

    Select the Transport Layer Configuration node and choose HTTP/S Transport.

  3. Send a HTTP synchronous message. (Optional)

    To send messages in synchronous mode over HTTP, create a standard Web Service call, and do not enable the Async Support option.

  4. Send asynchronous HTTP messages. (Optional)

    1. Choose HTTP/S Transport and select the Async Support option.

    2. Type an event name in the Async Event box.

    3. Click OK to generate the Web Service call.

    4. Add a Wait for Event step. Select Insert > New Step from the right-click menu and choose web_service_wait_for_event from the SOAP functions in the Steps Toolbox.

    5. Specify a step name, a quantifier, and a timeout. Click Add and insert the name of the event that you defined in the previous step.

      In Script view, VuGen indicates asynchronous messaging with the added parameter, AsyncEvent.

      web_service_call("StepName=EchoString_101",
              "SOAPMethod=EchoRpcEncoded.EchoSoap.EchoString",
              "ResponseParam=response1",
              "Service=ExtendedECHO_rpc_encoded",
              "AsyncEvent=Event_1",
              "Snapshot=t1157371707.inf",
              BEGIN_ARGUMENTS,
              "sec=7",
              "strString=mytext",
              END_ARGUMENTS,
              BEGIN_RESULT,
              "EchoStringResult=first_call",
              END_RESULT,
              LAST);
      

      The AsyncEvent flag instructs the Vuser to wait for the response of previous asynchronous service requests.

  5. Send an asynchronous message using WS-Addressing. (Optional)

    1. Select the Async Support option and provide an event name in the Async Event box. This can be an arbitrary name.

    2. Select WSA Support. In the WS-A Reply to box, enter an IP address or autodetect to use the current host. Autodetect is useful when running the same script on several different machines. The server replies to the specified location when the event occurs.

    3. Click OK to save the settings.

    4. Instruct the Vuser to wait for an event. Select Insert > New Step from the right-click menu and choose web_service_wait_for_event from the SOAP functions in the Steps Toolbox.

    5. Specify a step name, quantifier, and timeout. To add an event name, click Add. The Web Service waits for the specified event before responding.

    6. Use the Edit, Move Up, and Move Down buttons to manipulate the events.

Back to top