This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to debug JAX-WS Web Service  RSS feed

 
Mike London
Ranch Hand
Posts: 1336
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having an issue where the web service I wrote can't find a file in the application directory.

My question is how do I debug the actual web service code?

I'm using MyEclipse which, for debugging, uses its own local application server. However, putting a break point on the code in the java class doesn't actually bring up the debugger so I'm clearly missing something.

Normally, putting a break point in a JSP or Servlet will bring up the debugging perspective.

Thanks in advance for any help or suggestions.

Mike
 
Murali Sridhar
Ranch Hand
Posts: 44
Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,

I'm providing the instructions for the Webservice running in Weblogic Server.(As per my assumption!!!)
-----------------------------------------------------------------------------------------------------------------------
1 Select (in Eclipse)Run >> Open Debug Dialog from the main menu
2 Choose Remote Java Application and Enter the following
Project: you can choose the project here.
Host:localhost
Port: 8XXX
3.
C:\bea\user_projects\domains\<your domain name>\bin\setDomainEnv.cmd (Check the Path for the weblogic domain directory)
4 Find the following lines and the set the DEBUG_PORT to 8XXX
if "%DEBUG_PORT%"=="" (
set DEBUG_PORT=8XXX
)
5 Set the following after the set PRE_CLASSPATH line
set debugFlag=true

6 Make sure the following line exists
set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE
7 Save and close the File.
8 Restart the Weblogic Application Server
9 Make sure the following line shows on the weblogic console log
Starting WLS with line:
C:\bea\JROCKI~2\bin\java -jrockit -Xdebug -Xnoagent
. configuration=system.properties -Dweblogic.ext.dir
Listening for transport dt_socket at address: 8XXX
10 On Eclipse Choose the following from the main menu
Run >> Debug History >> ApplicationName Remote Debugging
-------------------------------------------------------------------------------------------------------------------------------------------------
I hope this will help you.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having an issue where the web service I wrote can't find a file in the application directory.

How is the code trying to access the file?
 
Mike London
Ranch Hand
Posts: 1336
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

The issue seems to be that MyEclipse's "Debug As" option for a Web Service seems like it's creating a directory that doesn't match the web service code's System.getProperty("user.dir").

I'm working to figure this out, but that seems to be the issue.

Thanks.

Mike
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using user.dir in a server application doesn't seem like such a good idea. I'd read the directory name from an init value somewhere (maybe web.xml if this is part of a web app).
 
Mike London
Ranch Hand
Posts: 1336
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!