Test View

The Test View page is loaded in your web browser when you build and start your service. You can use Test View to test the public methods of your service.

Test View has four tabs that provide information about your service:

- Overview

- Console

- Test Form

- Test XML

- Warnings

By default, the Test Form tab is selected when the page loads.

In addition, each page lists the address of the service being tested. Each part of this address is a link to the JwsConsole, a page that lists the files in each level of the project directory.

- JwsConsole

# Overview Tab

The Overview tab displays public information about your service, including:

- The WSDL that describes the complete public contract for your web service. Clients of your web service use the WSDL file to determine how to call your web service and what data will be returned. The WSDL exposes both methods and callbacks on the service.

- The callback WSDL for clients that cannot handle the callbacks described in the complete WSDL. Clients wishing to receive callbacks by implementing a callback listening service can communicate with your service using this WSDL.

- The Java source code for a WebLogic Workshop service control for the service. A developer using WebLogic Workshop who wishes to call your service from theirs can use this source to construct a service control.

- The Java proxy for calling your service from Java code. For example, a Java client can call your web service by creating a class from the Java proxy and importing it.

- The service description for your service, which lists the service's available methods and callbacks.

- Links to useful information such as specifications for WSDL and SOAP.

Note: To learn how the comments associated with each method are obtained, and how you can document your web service's methods, see Documenting Web Services.

# Console Tab

The Console tab displays private information about your service, including:

- How the service is implemented on the back end, and with what version of WebLogic Workshop it was created. For example, services built using WebLogic Workshop are implemented using Enterprise JavaBeans; they may also use other J2EE components.

- Links to the WebLogic Server console application.

- Settings for the message log on the Test Form tab.

- Persistence settings, for clearing the conversational state and logs for the service, and for redeploying the Enterprise JavaBeans underlying the service.

# Test Form Tab

The Test Form tab provides a simple test environment for the public methods of your service. You can provide parameters for a method and examine its return value. You can also track and test the different parts of a conversation.

The following image shows how the Test Form tab appears for a service called HelloWorldAsync, which demonstrates a simple conversation:

To test the service, click the HelloAsync button. If this method took parameters, you would enter values for them here.

The Test Form page displays information about the service request and response, including the XML message that was returned, as shown in the following image:

If your service implements conversations, as the HelloWorldAynch service does, you can use Test View to test the methods that start, continue, or finish a conversation and the callbacks that continue or finish a conversation. You can also test multiple conversations at once.

The conversation ID that appears in the message log uniquely identifies each conversation that is underway. Click on this value to select and work with this conversation. You can view the results for each method or callback that has participated in this conversation by clicking on its name in the list. Click the Refresh link to refresh the message log.

The following image shows Test View with multiple conversations underway:

Note: To learn how the comments associated with each method are obtained, and how you can document your web service's methods, see Documenting Web Services.

# Test XML Tab

The Test XML tab shows the XML data that is being sent to your service when you test its methods. You can use this page to examine and modify the XML data that is passed to a method of your service.

If your method takes parameters of a data type other than String, you must modify the parameter placeholders in the SOAP body before you click the button to call the method. For example, if your method expects an integer, you must supply a valid integer in the SOAP body.

The following image shows the Test XML tab for a service called SimpleCalc, which performs simple arithmetic calculations:

# Warnings Tab

The Warnings tab displays warnings that are generated by the compiler when you compile and run your web service. The warnings are not errors, but information about problems your service may encounter as it is currently designed, and suggestions to remedy those problems.

# WebLogic Workshop Directory

The WebLogic Workshop Directory contains a sortable list of the files that comprise the different levels of the Project directory. You can use this page to select another service to test, test a control file, and clean up the service.

There are two ways to navigate to the service directory:

- Click on any of the links that make up the service address listed on the upper right-hand corner of the Test View pages. Each part of the path is a link to the directory listing of the files stored in this part of the project directory.

- Click on the See other services in your project link in the upper right-hand corner of the Overview page.

You can use the WebLogic Workshop Directory to:

- See the complete list of files and folders stored at this level.

- Use filters to show files of a particular type such as JWS, Control, XML, ECMASript, and WSDL files.

- Click on a JWS file name and test it.

- Click on a CTRL file, see information about this file, and choose to generate a Test JWS for testing the CTRL.

- Use the Clean All command to delete all generated .java, .class, and directories; erase cached dependency graph information, get rid of all conversation instances, undeploy all beans, and clear logs while leaving your application sources intact.

Related Topics

Web Service Development Cycle