Finally I found the answer. On the server side, no matter what problem happened, org.apache.soap.server.http.RPCRouterServlet will catch all the Throwable and then set the status of HttpServletResponse to SC_INTERNAL_SERVER_ERROR, that is, 500 server side error. This would not cause problem if you use Apache SOAP to send and receive SOAP call because Apache SOAP use socket communication. In my case, I use HttpURLConnection to get the response. Java would ingore the output stream and throw a FileNotFoundException, when the response status is a 500 error.
So I comment out the following line in RPCRouterServlet.java and then it works very well: status = res.SC_INTERNAL_SERVER_ERROR; But according to the specification of SOAP, an HTTP 500 "Internal Server Error" MUST be issued. So we should be careful of using HttpURLConnection. We can work around it by using socket or using Apache SOAP's HTTPUtils and TransportMessage. Bo On Thu, 4 Oct 2001 01:12, you wrote: > Hi guys, > > While I send a soap call to the server, it works very well if there is no > problem with the soap call. But if I have made some mistake with it, I will > get a FileNotFoundException. I traced into the SOAP code and found that > RPCRouterServlet has caught those problems and a right SOAP response with > fault information has also been produced which I can print out on the > server. But I still failed on the client side while using > "URLConnection.getInputStream()" to get the response. I am very confused > about this. > > Thanks! > > Bo