Pierre-Yves,

I passed on this posting previously because I am not sure what you are
doing with RPCRouterServlet will work.  However, I might be able to
answer some of your questions.

Q1 : I found two class extending HttpServlet : RPCRouterServlet and
MessageRouterServlet : what is the difference between this two objects ?

The RPCRouterServlet should be invoked when you are exposing "normal"
methods on your service class.  The MessageRouterServlet should be
invoked when the service class implements methods with the "messaging
signature"

    public void methodName(Envelope env, SOAPContext reqCtx, SOAPContext
resCtx)

Q2 : Is myt method correct ?

This I do not know.  I've never seen someone explicitly create an
instance of a servlet class and delegate to it.  I guess if you have all
the config stuff for the instance to which you delegate included in the
config of the delegator, initialization should work.  Why do you
delegate to doPost in the service method?  Shouldn't you delegate to
service?

Q3 : on which parameter do I need to switch ?

Typically, there is no parameter on which to switch, as the URLs used
look like http://host:port/soap/servlet/rpcrouter and
http://host:port/soap/servlet/messagerouter.  However, you can encode
whatever you want in the URL to determine how to switch: none of the
SOAP code cares about the URL.

Q4 : is all the soap administration will work ?

The command line admin should work.  If you deploy the Apache SOAP
webapp, the JSP pages will work, too.

Scott Nichol

----- Original Message -----
From: "Pierre Yves Monnet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 29, 2002 3:59 AM
Subject: How to integrate SOAP in a Servlet ?



Hello,

I have a Servlet program build in Java. I want to extend this servlet to
be able :
- to run the normalservice, as know
- to integrate the SOAP mechanism.

So, I would like to integrate something like this in my service() method
:

public class MyEngine extends HttpServlet
{

RPCRouterServlet  mSoapRouter;


  public void init(ServletConfig config) throws ServletException {

    mSoapRouter = new RPCRouterServlet ;
    mSoapRouter.init( config );

  public void service( HttpServletRequest request, HttpServletResponse
response )
                   throws ServletException, IOException {
    if (request..getParameter( ??? )!=null)
    {
        // this is a SOAP command
        mSoapRouter.doPost( request, response );
        return
    }

Q1 : I found two class extending HttpServlet : RPCRouterServlet and
MessageRouterServlet : what is the difference between this two objects ?
Q2 : Is myt method correct ?
Q3 : on which parameter do I need to switch ?
Q4 : is all the soap administration will work ?

Thanks for your comments.


Pierre-Yves Monnet


------------------------------------------------------------------------
--------

Pierre-Yves Monnet - Project Manager

Cap Gemini Ernst & Young



Tél  :   33 (0) 4 76 52 64 23
GSM:  33 (0) 6 86 74 49 86

FAX : 33 (0)4 76 52 62 01

mail : [EMAIL PROTECTED]




--
To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@;xml.apache.org>
For additional commands, e-mail: <mailto:soap-dev-help@;xml.apache.org>

Reply via email to