facebook

How to debug SOAP Web Service

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #303143 Reply

    Mork
    Participant

    Hello,

    I am having a “FileNotFound” problem in a web service I’m working on.

    I’ve deployed the web service per the MyEclipse Web Service demo (debug As…).

    However, when trying to retrieve a file using the SOAP web services explorer, using one of the web services methods, I get a file not found exception. I have the jpegs directory in the same location as it is on the other installation where I’m using Intellij IDEA.

    So, my question is, how to I “debug” the web service code itself (not just the SOAP Envelope, which looks fine.)?

    There are properties being set in the web service code for “user.dir” and others that seem to be wrong given that the web service can’t find the jpeg to return.

    Is it possible the JPEGs directory, at the root of the project, need to be put elsewhere in the project to be deployed successfully?

    Look forward to your reply.

    Thanks.

    M

    #303199 Reply

    Brian Fernandes
    Moderator

    Mork,

    I would suspect that your JPEG folder is simply not being deployed since you have it at the root of your project. You could check by going to the deployed location using the server view and examining that folder.

    I would recommend moving the JPEG folder to your project’s WebRoot folder to easily fix the problem. Assuming your JPEG folder is named “jpeg” and your context root is myapp – if you put the jpeg folder directly under WebRoot, the absolute path to an image would be
    http://localhost:<port>/myapp/jpeg/image1.jpg

    Hope this helps, let me know if you require further assistance.

    #303212 Reply

    Mork
    Participant

    I put the jpeg directory underneath webapps in the project and it *is* deployed.

    However….

    The actual problem appears to be that the deployment directory doesn’t match anything I can currently get in the web services code.

    Here is the error that MyEclipse gives me when it can’t find the JPEG:

    java.io.FileNotFoundException: C:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.5.0.zmyeclipse75020090612\tomcat\bin\jpegs\nordic.jpg.jpg (The system cannot find the path specified)

    This path above is System.getProperty(‘user.dir”);

    ————-

    However, using MyEclilpse’s server view for the exploded Debug As…. web service code, it says the actual path is …

    C:\dev\MyEclipse Projects\.metadata\.me_tcat\webapps\ImageWebService\jpegs

    ————–

    So, I the obvious question is how the heck to I get this Server path from my Web Services code since it’s neither the current directory or the user.dir?

    I look forward to hearing back from you soon.

    Thanks.

    – M

    #303262 Reply

    Mork
    Participant

    I figured it out.

    #304084 Reply

    This message has not been recovered.

    #304663 Reply

    Chris.d
    Member

    This message has not been recovered.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: How to debug SOAP Web Service

You must be logged in to post in the forum log in