Manually adding a response element
You can add service response elements to specify the received content of a service request. You can use the test editor to create or edit response elements in an existing service test.
Service response elements are children of service request elements. Service tests use response elements to measure the response time between a call and the corresponding response. Response elements can also contain verification points. IBM WebSphere MQ and JMS requests can contain multiple response elements.
Depending on the type of request, you can manually create several types of response elements:
- Response from WSDL: For web services, this response type uses the WSDL file to create the specified XML structure of the response.
- XML response: This response type creates an empty response element in which you must manually create the expected XML structure. You can use an XSD document from the XSD catalog to assist you.
- Text response: This response type creates an empty response element, which can contain freely formatted text.
Alternatively, you can automatically create and update response content by recording the actual response content that the service returns. See Updating a service response from the service for more information.
To add a response element to a service test:
- Open the test in the test editor, and select a service request element.
- Create one of these elements:
- For web service requests, click Add > Response from WSDL.
- If the expected response contains XML content, click Add > XML Response.
- If the expected response contains plain text, click Add > Text Response.
This action creates the corresponding response element in the test. If the request uses the WebSphere MQ or JMS format, then you can create multiple responses.
- Edit the message content of the response element to reflect to actual content that the service returns.
- Click the Message tab to view the contents of the response in the Form, Tree or Source view.
- Click the Attachment tab to view any resource files that were attached to the response.
- Click the Response Properties tab to view the properties of the response.
What to do next
After creating a message return, you can create verification points on the contents to test the behavior of the service.
Updating a service response from the service
Verify application behavior
Error 404 - Not Found Error 404 - Not Found
The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.