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
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.
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.