Debugging Your WebLogic Web Services


After you have deployed your WebLogic Web service, there are a number of ways you can ensure that it is working properly.

Checking Out the Web Service Home Page

If you are able to bring up the Web service home page, chances are the Web service has been successfully deployed. On the home page, make sure that all the operations you intended are listed. Try invoking the service by clicking each operation name link. It is also important to click the WSDL file link and examine the WSDL file that is displayed. Make sure the service endpoint is correct. See Chapter 29 for more information on Web service home pages.

Examining the Web Service Through the WebLogic Administration Console

You can see the Web services components listed as deployed in the WebLogic Administration Console. After you invoke this console (for example, http://localhost:7001/console for the Examples server), go to examples, Servers, Deployments, Web Service Components. Figure 30.23 shows the console with these nodes expanded (refer to arrow D).

Figure 30.23. WebLogic Administration Console showing Web service components.

graphics/30fig23.jpg

Recall that a WebLogic Web service is composed of the following J2EE components:

  • Web application (WAR file)

  • EJB back-end components (JAR file)

Now look for the Web services that are deployed and their WAR and JAR files. In Figure 30.23, you can see that two Web service applications are deployed, in the Application column of the right pane (arrow B). These are mangled application names derived from the actual Web service EAR file or folder name. The Name column (arrow A) of the same table shows their WAR files. You can see their JAR files, if any, by clicking (in this example) examples, Servers, Deployments, Applications, _appsdir_jms_send_queue_dir, where you will find both the Web service's WAR and JAR files (arrow C).

Looking at the Generated web-services .xml File

If you are familiar with the format of the web-services.xml file, you can look at this generated file to ascertain that you have correctly defined your Web service characteristics to the ServiceGen task. You can see the serializer and deserializer classes that are being used during service invocation, as well as any user -defined type definitions.

Runtime Diagnostics

You can cause the SOAP requests and responses to be displayed on either the client or server command prompts. To do so, specify the following system property when invoking your Java client:

 
 java -Dweblogic.webservice.verbose=true yourPackage.YourJavaClient 

To see the SOAP messages on the server side, specify the same system property when starting WebLogic Server, as follows :

 
 java -Dweblogic.webservice.verbose=true ... weblogic.Server 

Again, doing this shows the output of the server-side handlers, if any.

WebLogic Log Files

Sometimes stack traces and exception messages may not show up on the command console where WebLogic Server was started. This is the time to check the log files that WebLogic Server keeps on every client request and component execution. For the Examples server, you can check out the following log files:

 
 <BEA-HOME>\weblogic700\samples\config\examples\examplesServer\examplesServer.log <BEA-HOME>\weblogic700\samples\server\config\examples\logs\wl-domain.log 

Note

These log files are appended to continually, even after a server is restarted. You should always scroll to the bottom for the latest information and page up from there. You can also see logs using the WebLogic Administration Console, which is the preferred method. After invoking the Administration Console (for example, http://localhost:7001/console for the Examples server), go to examples, Servers, examplesServer. Right-click examplesServer and select View Server Log. Note that the right pane's log view defaults to show only 500 lines. You can customize the view to show more lines to see the entire log.




BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net