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