Testing a web service

This recipe explains one of the most important aspects of the web service lifecycle; that is, testing. We will show you how web service testing can be performed through the Oracle Enterprise Manager Console and Oracle Weblogic Server Administration Console. We can also efficiently test web services using other professional tools, such as SoapUi, TestMaker, and WebInject.

These tools can be downloaded at the following URLs:

Getting ready

For this recipe, we will use the web service that was defined at the start of the chapter and amended throughout the recipes in this book; that is, the book library web service.

How to do it…

The following are the steps involved into testing of web service in the Oracle Enterprise Manager Console:

  1. First, we will describe how to test a web service through the Oracle Enterprise Manager Console. Thus, we first log in to the console. Remember, we mentioned that web services can be found below the Application Deployment node.
  2. Then, expand the Application Deployment node and select our web service.
  3. On the right side, the web service management window opens as shown in the following screenshot:
    How to do it…
  4. Under the Summary section, we have the option to manage the deployment and testing of a web service through the Oracle Weblogic Server Administration Console with a link. Under the Web Services section, we have a Test option to test a web service in the Oracle Enterprise Manager Console. We click on the icon and the familiar window for the tests opens as shown in the following screenshot:
    How to do it…
  5. Select the operation, enter the input parameters, and click on the Test Web Service button. Under the Request tab, we see the input data, and after the web service operation is performed, we will see the results under the Response tab.

There's more…

In step 3, we see that under the Summary section, we have the option to manage the deployment and testing through the Oracle Weblogic Server Administration Console with a link. By clicking on the link, we are transferred to the Oracle Weblogic Server Administration Console.

Under the Domain Structure, select the Deployments option.

There's more…

Under the Summary of Deployments, we select our web service and expand the Web Service node. Click on the web service link as shown in the following screenshot:

There's more…

The Settings window for our web service opens. Select the Testing tab and again expand the web service node. We will get two links. One link leads to the WSDL document and the second link brings up the test client as shown in the following screenshot:

There's more…
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset