How to Debug a Web Service

By eHow Internet Editor

Rate: (2 Ratings)

Writing a web service can be a pain. Many times when you think that things are going to go easily you run across faults. It can be difficult because often the web service is deployed inside Tomcat making the bugs hard to track down. If you have written your web service in Axis2, then you can use Eclipse to debug your web service.

Instructions

Difficulty: Easy
Step1
Choose an IDE with an web service debugger. A highly recommended IDE is Eclipse. It is free and works with several languages, making it an excellent choice.
Step2
Pick a tool that will monitor messages. A highly recommended messaging tool is TCPMon from Apache WS Commons.
Step3
Program Tomcat VM to work in the debugging mode. Do this by programming the Catalina_Opts environment. Enter the following code: -Xdebug -Xnoagent -DJava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000.
Step4
Start Tomcat. This must be done before you configure Eclipse.
Step5
Make an Eclipse debug configuration. Do this by clicking on the little arrow next to the icon of a bug. A drop-down menu will appear in which you will select "Debug."
Step6
Click on "Remote Java Application." This will be positioned on the left pane. Click on "New" to add a configuration. Leave the default setting the same.
Step7
Select "Debug." This will run the debugging program.

Tips & Warnings

  • Another quality debugger program is IntelliJ IDEA which has several extra configurations. Unlike Eclipse this program isn't free, but it is well worth the cost. You can download IntelliJ IDEA at jetbrains.com.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article: How to Debug a Web Service

eHow Internet Editor

eHow Internet Editor

Category: Internet

Articles: See my other articles

Related Ads

Internet

Veesites
Meet Virginia DeBolt eHow’s Internet Expert.