Creating an asynchronous request structure

You can create an asynchronous request based on the WS-Notification specification, which contains an callback structure.

Procedure

  1. In the test editor, select the test, and click Add, and then click Specification-based Structure.
    The New Web Service Test wizard opens.
  2. On the Web Services Specification Selection page, Select WS-Notification, and click Next.
  3. On the WS-Notification Details page, if the service has a Web Services Description Language (WSDL) file, click Add to associate it with the call.
  4. Specify the Subscription identifier.
    You can select default identifiers for Websphere Application Server or Apache Muse; or if your service does not use a standard identifier, you can select Custom, and type the Name and Namespace of the identifier.
  5. In the Topic area, replace the default Name and Namespace values with those of topic of your service.
  6. Specify the Subscription duration.
    Because this is a test environment, the subscription expires after the specified delay to save server resources.
  7. If this is a WS-BrokeredNotification service, which implements a notify call when the subscription is received, you can select Add notify call, and type the message to be sent.
  8. Click Next.
  9. On the Configure Protocol page, select a Protocol configuration, and specify the options of the configuration.
    Select Generate SOAP 1.2 envelope if you are testing a SOAP 1.2 web service.
  10. Click Finish.
    This action generates in the test editor a web service call or an XML request with a callback structure that contains a parallel, a receive, and a timeout element.

What to do next

In the callback structure, add test elements to the parallel, receive, and timeout elements to specify the behavior of the test:
  • Parallel contains test elements that are run after the asynchronous call has been sent.
  • Receive specifies the message return of the callback and contains test elements that are run after the callback is received.
  • Timeout contains test elements that are run if the callback is not received after a specified delay.