Creating an asynchronous request structure
You can create an asynchronous request based on the WS-Notification specification, which contains an callback structure.
Procedure
- In the test editor, select the test, and click Add,
and then click Specification-based Structure.
The New Web Service Test wizard opens.
- On the Web Services Specification Selection page, Select WS-Notification, and click Next.
- 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.
- 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.
- In the Topic area, replace the default Name and Namespace values with those of topic of your service.
- Specify the Subscription duration.
Because this is a test environment, the subscription expires after the specified delay to save server resources.
- 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.
- Click Next.
- 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.
- 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.