I tried the code.
Thanks.
However, I first tried it in a static block, and that failed, evidently
because the "Context" is an instance thing. However, any parm sent to a web
service from the wsdd file data would be at most a one time "application
scope" thing, so it seems less than ideal to look it up for each invocation.
Is there a way of grabbing the data once, short of:
Private static String paramValue=null;
...
If(paramValue == null) {
MessageContext msgContext = MessageContext.getContext();
SOAPService service = msgContext.getService();
paramValue = service.getOption("paramName");
}
...
jim
Jim Brain, [EMAIL PROTECTED]
"Researching tomorrow's decisions today."
(319) 369-2070 (work)
SYSTEMS ARCHITECT, ITS, AEGON FINANCIAL PARTNERS
-----Original Message-----
From: Milind Gadre [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 10:13 AM
To: [EMAIL PROTECTED]
Subject: Re: Sending parms to web service
Jim, you can pass params via the deploy.wsdd file. Add as many
<parameter> elements as you like to the <service> tag, and access the
values from your code using
MessageContext msgContext = MessageContext.getContext();
SOAPService service = msgContext.getService();
String paramValue = service.getOption("paramName");
Regards...
Milind Gadre
VP Product Development
ecPlatforms, Inc
901 Mariner's Island Blvd, Suite 565
San Mateo, CA 94404
C: 510.919.0596
E: [EMAIL PROTECTED]
----- Original Message -----
From: "Brain, Jim" <[EMAIL PROTECTED]>
To: "AXIS Mailing List (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, March 14, 2003 7:57 AM
Subject: Sending parms to web service
> I have a class that is an AXIS web service, but I want to run
multiple
> copies of the class under different names. The code is the same for
each
> service, but I want to pass a parm to the service telling it what to
do (I
> know, it sounds like a job for 2 classes, but it doesn't work out
that way)
>
> Is there a way to put parms in the deploy.xml file that will get
passed to
> the web service class at startup?
>
> Jim
>
>
> Jim Brain, [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> "Researching tomorrow's decisions today."
> (319) 369-2070 (work)
> Systems Architect, ITS, AEGON Financial Partners
>
>
>