You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Johannes Fiala <so...@fwd.at> on 2003/01/12 21:04:07 UTC

Initializing server.xml-parameters of a class invoked by SOAP

Hi there,

Is it possible to use SOAPContext in the empty constructor of a class 
invoked by SOAP?
I'd like to initialize parameters only upon first instantiation of the 
class, so they don't have to get reloaded every time I call the method.

sample:
class MyClass
method: getMyData(SOAPContext ctx)
==> results in the instantiation of the class MyClass and execution of the 
method getMyData.
Any further calls to getMyData should have the parameters already set.

Any ideas?
Johannes

Re: Initializing server.xml-parameters of a class invoked by SOAP

Posted by Scott Nichol <sn...@scottnichol.com>.
If you are using a nightly build, you can access many configuration
parameters by implementing the ConfigurableService interface in your
service class.  An excerpt from the current docs:

>>>
Java services can also use an Apache SOAP-provided interface
ConfigurableService to receive
initialization parameters.  Upon instantiation, a service implementing
this interface
will have the configure method called.  The parameters for this method
are hashtables
of initialization parameters for the service (from the deployment
descriptor options tags),
the servlet and the servlet context (web application).
<<<

Scott Nichol

----- Original Message -----
From: "Johannes Fiala" <so...@fwd.at>
To: <so...@xml.apache.org>
Sent: Sunday, January 12, 2003 3:04 PM
Subject: Initializing server.xml-parameters of a class invoked by SOAP


> Hi there,
>
> Is it possible to use SOAPContext in the empty constructor of a class
> invoked by SOAP?
> I'd like to initialize parameters only upon first instantiation of the
> class, so they don't have to get reloaded every time I call the
method.
>
> sample:
> class MyClass
> method: getMyData(SOAPContext ctx)
> ==> results in the instantiation of the class MyClass and execution of
the
> method getMyData.
> Any further calls to getMyData should have the parameters already set.
>
> Any ideas?
> Johannes


Re: Initializing server.xml-parameters of a class invoked by SOAP

Posted by Scott Nichol <sn...@scottnichol.com>.
If you are using a nightly build, you can access many configuration
parameters by implementing the ConfigurableService interface in your
service class.  An excerpt from the current docs:

>>>
Java services can also use an Apache SOAP-provided interface
ConfigurableService to receive
initialization parameters.  Upon instantiation, a service implementing
this interface
will have the configure method called.  The parameters for this method
are hashtables
of initialization parameters for the service (from the deployment
descriptor options tags),
the servlet and the servlet context (web application).
<<<

Scott Nichol

----- Original Message -----
From: "Johannes Fiala" <so...@fwd.at>
To: <so...@xml.apache.org>
Sent: Sunday, January 12, 2003 3:04 PM
Subject: Initializing server.xml-parameters of a class invoked by SOAP


> Hi there,
>
> Is it possible to use SOAPContext in the empty constructor of a class
> invoked by SOAP?
> I'd like to initialize parameters only upon first instantiation of the
> class, so they don't have to get reloaded every time I call the
method.
>
> sample:
> class MyClass
> method: getMyData(SOAPContext ctx)
> ==> results in the instantiation of the class MyClass and execution of
the
> method getMyData.
> Any further calls to getMyData should have the parameters already set.
>
> Any ideas?
> Johannes


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>