axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vy Ho" <vy...@asacorp.com>
Subject RE: MessageContext not conform to standard
Date Thu, 09 Oct 2003 21:24:35 GMT

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:vy.ho@asacorp.com]
Sent:	Thursday, October 09, 2003 5:19 PM
To:	'axis-user@ws.apache.org'
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?


Mime
View raw message