Step 4: Test the Web Service
In this section, you will start the server and then use the server's built-in
test functionality to test the web service you created in the preceding sections..
To Start the Server
- In the Servers view, right-click BEA WebLogic
Server v10.0, then click Start.
To Test a Web Service
A web service does not do anything unless a request is received from a client. For testing your web service, Workshop provides a test client through which you can send messages to the service and review the response message. The test client runs in the IDE as an editor window.
To test the web service:
- In the Project Explorer view, expand
the services
package.
- Right-click MailingListService.java and
select Run As > Run On Server.
- In the Run On Server dialog, select the Set server as project
default check box. This will reduce the number of steps in the next part
of this tutorial, as the IDE will remember your server choice.
- Click Finish.
- After the server starts and the application is deployed (note the status bar in the lower right corner of the IDE), the IDE displays the test client as shown here:

This web service has only one operation (getCustomers).
If there were input values required by getCustomers,
there would be input fields that would allow you to specify values. Clicking
the getCustomers button sends a request message to
the web service.
- Click the getCustomers button now to invoke the getCustomers
method.
The test client displays the results of invoking the web service operation
(including the returned value) and also the detail of the SOAP-encoded request
that was sent to the web service and the response that was received, including
the string returned by the getCustomers operation/method:
"John Smith".

- You can test your web service operation again by clicking Show
Operations at the top left corner. You can also examine the automatically
generated WSDL (Web Service Description Language) file by clicking the
link at the top of the Test Client page.