• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deployment / Client Problem with "Simple Jax-ws" Web Service

 
Mike London
Ranch Hand
Posts: 1190
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm using the ImageWebService example from the book "Java Web Services, up and running", by Oreiley.

The author of the book doesn't focus on deployment until chapter 6, so I'm stuck trying to figure out how to successfully deploy this service he describes in chapter 3.

Below is the deployment code that I'm using for testing. It does seem to deploy "something" since if Tomcat isn't running I get a general connection error, and if Tomcat is running, I'm getting 404 errors (the web project files are deployed, but I think I have a path reference problem of some kind).




Here's my "Client" code that should be calling the Web Service:



The SOAPBINDING portion of the WSDL is here:




-------------

The application looks like it's deployed under Tomcat as you'd expect, but when I run the client code above, it can't find the getImage method.

Exception in thread "main" com.sun.xml.ws.client.ClientTransportException: HTTP Status-Code 404: Not Found - Not Found
at com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:216)
at com.sun.xml.ws.transport.http.client.HttpClientTransport.getHeaders(HttpClientTransport.java:148)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:134)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
at com.sun.xml.ws.client.Stub.process(Stub.java:228)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:226)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:206)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
at $Proxy29.getImage(Unknown Source)
-----------------------------------------------------------------------------------------------------------------

>>> at net.mycompany.imagewebservice.ImageClient.main(ImageClient.java:24) <<<<<

-----------------------------------------------------------------------------------------------------------------

Any ideas what path or setting I should look at?

(I used Itellij IDEA to generate the web deployment file.)

Thanks very much in advance.

-- Mike
 
Attie Tee
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,

I am hitting a very similar problem with some "client" code which is attempting to call my Web Service deployed under Tomcat using classes generated directly from my WSDL using JAX-WS (please see error below). Did you manage to resolve your problem?

com.sun.xml.ws.client.ClientTransportException: HTTP Status-Code 404: Not Found - Not Found
at com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:219)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:151)
at com.sun.xml.xwss.XWSSClientPipe.process(XWSSClientPipe.java:160)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.client.Stub.process(Stub.java:248)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
at $Proxy41.initiateConsultation(Unknown Source)
 
Mike London
Ranch Hand
Posts: 1190
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Part of my problem was that problem was that I was using the built-in Eclipse app server in MyEclipse, not to the Tomcat I installed specifically. Trying to get the paths to the built-in app server was next to impossible.

Once I used regular Tomcat and fiddled with the paths a bit, I was OK.

HTH

-- M
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic