My summary: you want to access a text file from the constructor for your service 
class, and you are wondering how you can put the name of the file in configuration 
data the can be accessed from the constructor.  Is that right?

Nothing is provided in the Apache SOAP framework to help you do exactly what I have 
stated above.  In all versions, you would have the alternative of having an 
initialization method called from each of your methods, i.e. lazy initialization.  
Your methods would each have the SOAPContext parameter for you to access the 
deployment descriptor or servlet initialization information.

Added to the current code after the 2.3.1 release, your service class can also 
implement the ConfigurableService interface.  The configure method on this interface 
is called once per instance of the service, immediately after the constructor.  This 
method receives webapp, servlet and deployment descriptor initialization values in 
Hashtables.  With post-2.3.1 code, this is the preferred method for initializing 
services.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 14, 2004 6:41 PM
Subject: accesing data


Hi,

I am implementing a service with SOAP RPC (with application scope), and
I would like to know how can I access a text file from it. I have read from
the list, that there is a way to do that putting the data in the deploymenent
descriptor, and then accessing it with SOAPContext, but I need the data
in the constructor of the service. How could I do that? I had though in
an environment variable too, but it's not portable, and Java don't allow
to read them.

Thanks very much,

Tizo


Reply via email to