File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes why the web-service client not works with servlet but with normal java.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "why the web-service client not works with servlet but with normal java...." Watch "why the web-service client not works with servlet but with normal java...." New topic
Author

why the web-service client not works with servlet but with normal java....

Guru dhaasan
Ranch Hand

Joined: Sep 13, 2006
Posts: 126

I have created my first web-service,EASYnFASTPay today But when I tested with the client (a servlet) it is not working.. It is giving error as
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (404)Not Found

{http://xml.apache.org/axis/}HttpErrorCode:404

(404)Not Found
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at EASYnFASTPay_pkg.EASYnFASTPaySoapBindingStub.EASYnFASTPayment(EASYnFASTPaySoapBindingStub.java:109)
at EASYnFASTPay_pkg.wsT.doGet(wsT.java:19)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
~



But the same is running fine with a normal Java file.
Where exactly am I making mistake.....

This is how I am calling the web-service
public class wsT
{
public static void main(String args[]) throws Exception
{
EASYnFASTPayService service=new EASYnFASTPayServiceLocator();
EASYnFASTPay efp=service.getEASYnFASTPay();
String res = efp.EASYnFASTPayment("999");
System.out.println("aa"+res);
}
}

The same code inside a servlet is not working
Any explanations.....

Thanks in advance
Shiv

Thanks, Shiv
SCJP, OCE - JSP & Servlets Developer
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Use Apache TCPMon (Tutorial) or java.net tcpmon to capture/view the HTTP request/response pairs.

Compare the HTTP/SOAP requests issued from the servlet and the command-line program - that may give you some clue as to what the problem is.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why the web-service client not works with servlet but with normal java....