To test a proprietary asynchronous service that does not
implement the WS-Notification specification, you can
add an asynchronous callback to a service request or XML request.
Before you begin
Manually create a Web service call or XML call that invokes
the asynchronous service. The call must contain an endpoint that specifies
the URL of the callback receiver. This endpoint is used to redirect
the callback to the tester.
If the service implements the WS-Notification
specification, create the asynchronous call structure with the Create
New WS-Notification Request and Callback wizard
instead. See Creating an asynchronous request structure.
About this task
To add an asynchronous callback to a service request:
Procedure
- In the test editor, select a Web service or XML request,
click Add, and then click Asynchronous
Callback. The Create New Asynchronous
Callback wizard opens.
- On the Select Callback Endpoint page,
select the XML element of the request where the endpoint URL of the
callback is located.
- If you have a Web Services Description Language (WSDL)
file for the Web service, click Next. Otherwise,
skip to step 5.
- On the Bind Message to WSDL Port page,
select a port from the WSDL file. If the WSDL file for the service
is not listed, click Add to add a WSDL file
from the workspace or to import a WSDL file.
- Click Finish. This
generates a callback structure that contains a parallel, a receive,
and a timeout element, in the test editor.
What to do next
In the callback structure, you can 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 request 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.