I take it back.  I got it to work now.  I did not set the parameter
correctly.  That's why I did not get my stuff correctly.  However, the
standard question still lingering in my mind though.

 -----Original Message-----
From:   Vy Ho [mailto:[EMAIL PROTECTED]
Sent:   Thursday, October 09, 2003 5:19 PM
To:     '[EMAIL PROTECTED]'
Subject:         MessageContext not conform to standard

Hi,

I try to do some simple param init things.  So I see this  example:

MessageContext msgContext = MessageContext.getContext();
SOAPService    service    = msgContext.getService();
paramValue         = service.getOption("paramName");


However, this MessageContext is from: import org.apache.axis.MessageContext;
which clearly not a standard part of Jax rpc and I will be in trouble if I
don't use axis anymore.

Use:
        public void init(Object acontext) {

                javax.xml.rpc.server.ServletEndpointContext context =
(javax.xml.rpc.server.ServletEndpointContext) acontext;
                if(context != null){
                        ServletContext scontext = context.getServletContext();
                        String param = scontext.getInitParameter("MyParameter");
                        System.out.println("The param : " + param );
                }
        }

I set MyParameter in both the web.xml file and in the config.xml file.
However, both of them return null.  What is going on?

Reply via email to