Hi,

I had posted this message a few days back but got no response. I would
appreciate if I could get some pointer on what I might be doing wrong.
All I want to do is to have all my SOAP requests delivered to a servlet
and then use the RequestDispatcher in that servlet to forward the
requests to rpcrouter. Could someone point me to a working example of
this? I am including below the problem I am experiencing:

----- Original Message ------

I have created a simple servlet called LoginServlet where I want to
extract some data from the incoming SOAP request and then forward the
request to the rpcrouter servlet. On the server side I don't seem to get
any errors but on the client side, I get the following exception:

[SOAPException: faultCode=SOAP-ENV:Client; msg=Connection aborted by
peer: JVM_recv in socket input stream read;
targetException=java.net.SocketException: Connection aborted by peer:
JVM_recv in socket input stream read]
        at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnectio
n.java:328)
        at org.apache.soap.rpc.Call.invoke(Call.java:205)
        ...

When I remove my LoginServlet and the request goes directly to
rpcrouter, everything works fine. I did not change anything on my client
side except for the URL that is invoked by the Call object. I changed
that from rpcrouter to that of my servlet. The only thing that I am
doing in LoginServlet is the following:

public void doPost (HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    ServletConfig config = getServletConfig();
    ServletContext context = config.getServletContext ();
    RequestDispatcher dispatcher =
context.getRequestDispatcher("/rpcrouter");
    if (dispatcher != null) {
     try {
         dispatcher.forward (req, res);
         } catch (Exception e) {
             e.printStackTrace ();
         }
      }
  }

I tried both dispatcher.forward() as well as dispatcher.include() and
got the same problem.

I searched the archives and found some others having reported a similar
problem. However, I could not find any solution posted. Is there
something that I am doing wrong or missing?

Thanks,

- Prashant



Reply via email to