| Author |
WebServiceException: HTTP Status-Code 404
|
Timothy Sam
Ranch Hand
Joined: Sep 18, 2005
Posts: 746
|
|
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!
|
SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12265
|
|
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
|
Java Resources at www.wbrogden.com
|
 |
Timothy Sam
Ranch Hand
Joined: Sep 18, 2005
Posts: 746
|
|
Thanks William! However. I seem to be getting a different error this time. I hope this isn't too off-topic now.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12265
|
|
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
|
 |
sriram machiraju
Greenhorn
Joined: Jan 21, 2009
Posts: 1
|
|
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.
|
 |
 |
|
|
subject: WebServiceException: HTTP Status-Code 404
|
|
|