This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Testing WSDLs

The TryIt tool is provided by WSO2 as a quick and easy way to test your service's WSDL file or any publicly-available WSDL of the document/literal format. TryIt provides you with a mechanism to test your WSDL by creating endpoints on the fly. It helps to test a WSDL before actually coding it, without the need of a third-party WSDL validator tool. This functionality is provided by the following feature of the WSO2 feature repository:

Name: WSO2 Carbon - Tryit Feature
Identifier: org.wso2.carbon.tryit.feature.group

If the above feature is not included in your product by default, you can install it using the instructions given in section Feature Management. 

Note

The TryIt tool does not support relative schema imports and WSDL imports at the moment. WSO2 will provide this feature in a future release.

Follow the instructions below to invoke the TryIt tool.

1. Log on to the product's management console and select "Tools -> TryIt."

2. In the "Enter URL" field, type or paste the location of the WSDL and click "Try It." It may be a local file system path or a web URL. For example,

Note

If your browser has "Pop up-Blocking" enabled, you will receive a message saying a pop up was blocked. Allow pop ups for the current domain and try again. The available operations in the given WSDL appears. For operations that take arguments you will see primitive argument-type fields. The values specified in these fields will be passed to the operations. For no-argument operations you will only see a button with the same name as the operation.

3. There are two text areas on the TryIt page, each for request and response. You can switch the layout using either "Horizontal" or "Vertical" buttons. 

Fill in the necessary parameters. If you need more typing space (for instance, the parameters take a blob of XML) you can expand the size of the input field by clicking on the small icon in the lower right corner of each field.

Invoke the operation by clicking the "Send" button. The return value immediately appears in the response text area.

Choosing Endpoints

You can change the endpoint for the service, if there are multiple endpoints. You can also specify a customized endpoint.

1. Click the "Using Enpoint - ...." link. Select a new endpoint from the list and specify the address of the new endpoint.

Viewing the Service Information

1. To view the information about the service click on the "Service Information" link.

Prioritizing Operations

1. Use the small yellow icon with the plus (+) sign to prioritize operation.

2. The chosen operation is added to the "Priority Operations" section.

This will be useful when you have a lot of operations in the "TryIt" page. Then you can add operations you want into this section and switch among them easily.

The TryIt page is a full Ajax client and interacts with the service just as any other client would, so it is a good way to verify that a service not only works, but is reachable by its clients. Note however that the TryIt page attempts to contact the Web service at the endpoint url provided. If the domain or url scheme of the service is different from the endpoint, the browser may impose security restrictions. In this case, the TryIt falls back to using a script-injection protocol to tunnel the Web service request. A wire trace of the communication with the browser will not show the actual Web service messages used to communicate with the service.

Also, since the TryIt page is fully asynchronous, it doesn't block while a Web service is being invoked. You can invoke several operations before one of them completes (though it doesn't have a way to display the results of the same operation invoked multiple times.)

Invoking 'TryIt' through a Service's Dashboard

The TryIt tool can also invoked from the dashboard of a selected service. Service dashboard is part of the service management functionality provided by the following feature:

Name: WSO2 Carbon - Service Management Feature
Identifier: org.wso2.carbon.service.mgt.feature.group

The above feature is bundled by default in all service-hosting WSO2 middleware products. If the product you are using doesn't have this feature installed, you can do so by following the instructions given in section Feature Management.

Follow the instructions below to try out the WSDL of a selected service.

1. Log on to the product's management console and select "List" under "Web Services."

2. The "Deployed Services" page appears which lists out all the currently active services. Select a service and click on it to view its dashboard.

For example,

3. The service's dashboard appears. In the "Client Operations" panel, you can see the link "Try This Service."

When you click "Try this service" link, you will be directed to the page where the operations available for your service will be displayed. When you give the parameters for the operation, a button corresponding to your service appears. You can check whether your service provides the desired output by using this option. For more information, refer to the steps from Step3 above.

The "TryIt" page of a service can also be invoked by appending the service's endpoint reference with the string "tryit?". For example, http://<your-machine-ip>:<server port>/services/<service name>?tryit