• 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

WebServiceException: HTTP Status-Code 404

 
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys! I have no idea what this error means. I tried to create a webservice client with Netbeans, created a wrapper classe and drag/dropped the methods there.

I am connecting(consuming) to a .Net webservice. When I use the browser, everything seems fine... But when I access it through my Java code, I get this error...



javax.xml.ws.WebServiceException: HTTP Status-Code 404: Not Found - Not Found
at com.sun.xml.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:81)
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.toSOAPMessage(SOAPXMLDecoder.java:100)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:438)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:258)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:137)
at com.sun.xml.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:84)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:172)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:106)
at $Proxy17.validateAccessToken(Unknown Source)



I'm trying to access the service like this and just to note, it's on another machine on the same LAN.



and also these lines of code inside MyWebserviceWrapper



Do you guys have any idea? Thanks!
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this error


Indicates that you are not getting through to the service due to some error in addressing. You got through to a server but the server is telling you it cant find a service to match the URL - either it isn't running or it doesn't exist the way you called it.

Bill
 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William!

However. I seem to be getting a different error this time. I hope this isn't too off-topic now.


Cannot create Service instance, service {http://www.mycompany.com/test/integration}TestWebService not found in the WSDL http://testserver/webservices/TestWebService.asmx?wsdl=wsdl1

 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

TestWebService not found in the WSDL



If I got that message I would be taking a close look at the text of the WSDL returned by that url.

Bill
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error that you see because of invalidation might be because jax-ws tries to validate the wsdlLocation and the service name that you at service creation in client code with the values specified in WSDL.

So, I would suggest give the service name in WSDL at service creation time and overrite it after the port creation using the following code :

((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "<correct service location>");

The reason why you see http error 404 might be because the service is not up and running at the address specified.
 
reply
    Bookmark Topic Watch Topic
  • New Topic