Creating and Analyzing Web Service Logs

You can use JDeveloper's TCP Packet Monitor to produce a log from running a web service stub. Then you can use a WS-I compliant analyzer that you have downloaded and registered with JDeveloper to check whether the web service complies with WS-I standards. Because you are running the analyzer against a stub to the web service, discovery, description and messages of the service are reported on.

First you have to run a stub or proxy to the web service with the TCP Packet Monitor running. When the packet monitor is stopped, the log file is created. The next step is to analyze the log file against a set of standard assertions.

Note: If you are working within a firewall, make sure that JDeveloper's proxy server exceptions do not include the IP address of the machine the web service is running on. For more information, see Proxy Settings and JDeveloper.

To create and analyze a log of a web service:

  1. Create a stub or client to the web service you want to analyze:
  2. Start the TCP Packet Monitor. Choose View | TCP Packet Monitor, and in the monitor click the Start button (Start TCP Packet Monitor button ).
  3. Run the stub or sample Java client. Either:
  4. Once you have received the response you expect from the web service, stop the TCP Packet Monitor by clicking the Stop button (Stop button ). The wsi-log.xml and wsi-log.html files are created and listed in the navigator, and wsi-log.html is opened in JDeveloper.

    Note: The log file is not created and does not appear in the navigator until the TCP Packet Monitor has stopped running.
  5. In the navigator, select wsi-log.xml and choose Analyze WS-I Log File from the context menu. The WS-I Analyze Web Service wizard opens.
  6. If the Welcome page is displayed, click N ext.
  7. In the Validate WSDL page the defaults have been retrieved from the log file. If necessary, select a different service name or port, and click Finish. The analysis starts, and progress is reported in the Web Services log window.
  8. A report of the analysis called wsi-report.html is displayed in JDeveloper.

Having Problems?

There are a number of reasons why you may find you have problems when performing an analysis of a web service. Some of these are outside the scope of the JDeveloper documentation, but there are two issues you might come across.

When the WS-I analysis reports a number of errors for a web service generated in JDeveloper

If you are haven't made any changes to the generated web service, or when you are certain that any changes you have made should not have affected the working of your web service you may still find that errors are reported. This is because because web services developed for deployment on SOAP servers or as Oracle J2EE 1.3 compliant web services are generated to conform to earlier standards. Only JAX-RPC web services are fully compliant with WS-I standards.

When the Message section of the wsi-report.html is missing all inputs

This can happen when the WSDL for an external web service has an endpoint that contains the machine name in upper or mixed case, and the stub generated by JDeveloper has the _endPoint variable with the machine name in lower case. This is similar to the case discussed in Analyzing Web Services Running in the Embedded Server. The workaround is to import the WSDL into JDeveloper so that it is listed in the navigator, then edit the WSDL so that the machine name is lower case. Then you can generate the stub and run it with the TCP packet monitor running.

To import the WSDL into the navigator:

  1. Create a new WSDL document, accepting the defaults.
  2. Open the WSDL document in a browser. View the source of the document, and copy the XML source of the WSDL.
  3. Replace the contents of the WSDL document you have just created with the source from the WSDL document of the web service you want to use.

When the Discovery section of the wsi-report.html is missing all inputs

The Discovery section of wsi-report.html reports on the REGDATA artifacts that are used by web services you locate in a UDDI registry. If you have created a report of a web service that you have not located using a UDDI registry, then it all the Inputs in this section of the report will be missing.

Analyzing Web Services
Using the TCP Packet Monitor


Copyright © 1997, 2004, Oracle. All rights reserved.