• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trying to deploy JAX WS webservice on Tomcat 7.0.32

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I wrote a simple JaxWS webservice.



I created the sun-jaxws.xml:



And my web.xml file is:




I have also put all the jar files of JAX WS RI on the lib folders of the web service.

I've build the war and it has the expected structure:

META-INF/
WEB-INF/
WEB-INF/classes/...
WEB-INF/sun-jaxws.xml
WEB-INF/web.xml

Now, I've put the war file on the webapps tomcat folder. Finally, I started tomcat. No errors happened.

However, when I try to access the application using the URL : http://localhost:8080/Generate/report, I get the following error on the browser:

HTTP Status 404 - /HelloWorld/hello
type Status report
message /Generate/report
description The requested resource (/Generate/report) is not available.

Anyone knows the cause of the problem?


Thank you
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paulo Carvalho wrote: URL : http://localhost:8080/Generate/report



What is Generate in the above URL? That should be the name of the war file(in other words, the context root of the webapp) that you've deployed in tomcat.

Thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the servlet listens to "/report", so any URL needs to start with that. If the endpoint also listens to "/report", the URL would be something like "/report/report". And then you need to prepend the name of the web app, unless this is part of the ROOT web app.
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic