Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How to debug JAX-WS Web Service

 
Bartender
Posts: 1832
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 44
Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 1832
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 1832
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic