Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

404 when invoking web service

Status
Not open for further replies.

larsgrill

Programmer
Aug 6, 2003
9
DK
Hi,

I've generated a web service client using the internal tool in RAD6 based on a provided WSDL. I call a method on the generated proxy class and I can see that it has the correct end point with the correct IP address. But for some reason it fails anyhow. Below is the output. The fault actor is actually my local machine but why is it trying to locate the service there as it knows the correct end point URL. Even if I call setEndpoint on the proxy it's the same.

When I test the service in the web services explorer in RAD or with SoapUI everything is fine, so it's just my client that has a problem.

Please let me know if further information is needed. I've been struggling with this issue for some time, and I haven't been able to find any clues on the net.

Thanks in advance,
Lars

faultCode: HTTP
faultString: ( 404 ) Not Found
faultActor: faultDetail:
null: WSWS3192E: Error: return code: ( 404 ) Not Found
Error 404: SRVE0190E: File not found: /SRV008_CprLookupWeb/sca/SRV008_CprLookup_WS_Export
.

( 404 ) Not Found
at com.ibm.ws.webservices.engine.transport.http.HTTPSender.processStatusCode(HTTPSender.java:546)
at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:463)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:218)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:274)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:727)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:648)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:609)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:446)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:732)
at dk.rsd.ip.SRV008_CprLookup_WS_Export_SRV008_CprLookupHttpBindingStub.cprLookup(SRV008_CprLookup_WS_Export_SRV008_CprLookupHttpBindingStub.java:103)
at dk.rsd.ip.SRV008_CprLookupProxy.cprLookup(SRV008_CprLookupProxy.java:66)
at dk.fpas.cpr.actions.AjourCPRAction.actionPerformed(AjourCPRAction.java:62)
at dk.fpas.framework.Controller.executeAction(Controller.java:371)
at dk.fpas.framework.Controller.service(Controller.java:157)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
.
 
So the webservices is located in your local machine or in that .dk machine? Do you have direct access or you need a proxy to reach it?

Cheers,
Dian
 
Hi Dian,

The service is remote but on the same network and I have direct access to it. The location in the WSDL is a "private" IP address within the local network.

It puzzles me that there is no problem in invoking the service when I do it in SoapUI or by means of the Web Services Explorer in RAD. I simply can't figure out what's the difference between these and the generated code.

Which puzzles me even more is that I've actually seen the generated code work twice, ie. I got a result and not the not found exception. And I don't know what I did differently on these two occasions! It's probably something very simple and very stupid ;-)

Thanks,
Lars
 
Did you take a look at the generated code? Is the endpoint set correctly? How are you executing it, from RAD? Are you sure there is no proxy around?

Cheers,
Dian
 
There is no proxy. I've just had that confirmed.

The result is the same whether I execute the service invocation in the test client in RAD or in a web application running on Websphere.

I can call the setEndpoint method myself but this doesn't change anything.

The generated code has the endpoint stored in an HttpServiceLocator class. This class is instantiated when I instantiate the Proxy class and that the Proxy sets javax.xml.rpc.service.endpoint.address property correctly.

Hereafter I call the a method on the proxy class for invoking the service which then calls a HttpBindingStub. This class calls the invoke method on the internal class com.ibm.ws.webservices.engine.client.Stub.Invoke. At this point there is a cachedEndpoint which is also correct.

I tried using WireShark which shows a difference in protocols. When I invoke the service from my test client, it uses NBNS protocol, but if I simply go to the URL in a browser it uses TCP. A colleague of mine tried creating a test client in WID and it works for him - and WireShark says TCP here too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top