axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milind Gadre" <mil...@ecplatforms.com>
Subject Re: Sending parms to web service
Date Mon, 17 Mar 2003 15:46:29 GMT

Jim, initialize paramValue in the Constructor. I believe (have not
looked at the code to verify) that the Service instances are most
likely created once and reused in a multi-threaded pooled manner -
similar to Servlet instances. So initializing the parameters once in a
CTOR would do the trick.

This also means that your code must be thread safe.

Regards...

Milind Gadre
VP Product Development
ecPlatforms, Inc
901 Mariner's Island Blvd, Suite 565
San Mateo, CA 94404
C: 510.919.0596
E: milind@ecplatforms.com

----- Original Message -----
From: "Brain, Jim" <JBrain@Aegonusa.com>
To: <axis-user@ws.apache.org>
Sent: Monday, March 17, 2003 7:09 AM
Subject: RE: Sending parms to web service


> 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, jbrain@aegonusa.com
> "Researching tomorrow's decisions today."
> (319) 369-2070 (work)
> SYSTEMS ARCHITECT, ITS, AEGON FINANCIAL PARTNERS
>
>  -----Original Message-----
> From: Milind Gadre [mailto:milind@ecplatforms.com]
> Sent: Friday, March 14, 2003 10:13 AM
> To: axis-user@ws.apache.org
> 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: milind@ecplatforms.com
>
> ----- Original Message -----
> From: "Brain, Jim" <JBrain@Aegonusa.com>
> To: "AXIS Mailing List (E-mail)" <axis-user@xml.apache.org>
> 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, jbrain@aegonusa.com <mailto:jbrain@aegonusa.com>
> > "Researching tomorrow's decisions today."
> > (319) 369-2070 (work)
> > Systems Architect, ITS, AEGON Financial Partners
> >
> >
> >
>
>
>



Mime
View raw message