You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Alexander Schatten <al...@gmx.net> on 2001/05/03 16:46:47 UTC

Configuration of SOAP server objects...

My problem should be a common one, nevertheless I couldnt find anything
about it:

I have a server-side object, that is invoced using the SOAP RPC
mechanism. basically this works fine BUT: guess the server side
component needs to contact a database, retrieve data, ...

then the server side object needs to read some config file at startup
(constructor e.g.), to get the JDBC URL, password, loginname, and
probably some other properties too. at the moment I have hard-coded this
data into the class, but this is obviously a bad idea.

Apache SOAP interface seems to offer no possibility to set initial
parameters or something like that.

how does "the rest of the world" (at least of the SOAP world) solve this
problem?


ideas are appreciated!


thank you


Alex


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Configuration of SOAP server objects...

Posted by Alexander Schatten <al...@gmx.net>.
Magnus ?or Torfason wrote:

> Well, I believe I got most of it.
>

thank you.

>
> The problem is twofold.
>
> 1-state information
> 2-configuration information
>
> State information can be handled with a second class, or with static
> variables in the class that is used.  They are persistent between requests.
>

this is not the main problem at the moment.

>
> Configuration can be handled with a configuration file, or as someone else
> suggested, by using parameters in the web.xml file.
>

Ah this is very interesting. I guess, thats what i was searching for. however:
the problem stays: how can I access the web.xml file. I mean, off course I know
how to access a file, but the problem is: how can I address the file without
hard-coding pathes into the sources? it there a stable way to get the path of
the web.xml file?
`

thank you


Alex


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Configuration of SOAP server objects...

Posted by Alexander Schatten <al...@gmx.net>.
Magnus ?or Torfason wrote:

> Well, I believe I got most of it.
>

thank you.

>
> The problem is twofold.
>
> 1-state information
> 2-configuration information
>
> State information can be handled with a second class, or with static
> variables in the class that is used.  They are persistent between requests.
>

this is not the main problem at the moment.

>
> Configuration can be handled with a configuration file, or as someone else
> suggested, by using parameters in the web.xml file.
>

Ah this is very interesting. I guess, thats what i was searching for. however:
the problem stays: how can I access the web.xml file. I mean, off course I know
how to access a file, but the problem is: how can I address the file without
hard-coding pathes into the sources? it there a stable way to get the path of
the web.xml file?
`

thank you


Alex


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: Configuration of SOAP server objects...

Posted by Magnus ?or Torfason <ma...@handtolvur.is>.
Well, I believe I got most of it.

The problem is twofold.

1-state information
2-configuration information

State information can be handled with a second class, or with static
variables in the class that is used.  They are persistent between requests.

Configuration can be handled with a configuration file, or as someone else
suggested, by using parameters in the web.xml file.

Both problems should be delegated, not to a client, but to a persistent
class that possibly has an inititalization routine.

Magnus

> -----Original Message-----
> From: Alexander Schatten [mailto:alasan@gmx.net]
> Sent: 3. mai 2001 23:58
> To: soap-user@xml.apache.org
> Subject: Re: Configuration of SOAP server objects...
>
>
> obviously you didnt understand my question, hence I try to be
> more precise:
>
> SOAP makes an instance of the server class when an RPC call comes
> in. then the
> _standard_ constructor is called by Apache SOAP. off course, I
> could send the
> config options via client application, but it is obvious that you will not
> want to do this. by two reasons:
>
> (1) you move the problem to the client and more important
> (2) you will not want to have the data on the client (database
> passwords, ...)
>
> Alex
>
> Magnus ?or Torfason wrote:
>
> > I don't see the problem.  The only thing that soap does is call a method
> > that you have created in your class.
> >
> > Your method can do all the things you said, just as in any other java
> > programs.  The only thing that you must consider is that the startup
> > directory is the startup directory of the container.
> >
> > > -----Original Message-----
> > > From: Alexander Schatten [mailto:alasan@gmx.net]
> > > Sent: 3. mai 2001 14:47
> > > To: soap-user@xml.apache.org
> > > Subject: Configuration of SOAP server objects...
> > >
> > >
> > > My problem should be a common one, nevertheless I couldnt
> find anything
> > > about it:
> > >
> > > I have a server-side object, that is invoced using the SOAP RPC
> > > mechanism. basically this works fine BUT: guess the server side
> > > component needs to contact a database, retrieve data, ...
> > >
> > > then the server side object needs to read some config file at startup
> > > (constructor e.g.), to get the JDBC URL, password, loginname, and
> > > probably some other properties too. at the moment I have
> hard-coded this
> > > data into the class, but this is obviously a bad idea.
> > >
> > > Apache SOAP interface seems to offer no possibility to set initial
> > > parameters or something like that.
> > >
> > > how does "the rest of the world" (at least of the SOAP world)
> solve this
> > > problem?
> > >
> > >
> > > ideas are appreciated!
> > >
> > >
> > > thank you
> > >
> > >
> > > Alex
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > For additional commands, email: soap-user-help@xml.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: Configuration of SOAP server objects...

Posted by Magnus ?or Torfason <ma...@handtolvur.is>.
Well, I believe I got most of it.

The problem is twofold.

1-state information
2-configuration information

State information can be handled with a second class, or with static
variables in the class that is used.  They are persistent between requests.

Configuration can be handled with a configuration file, or as someone else
suggested, by using parameters in the web.xml file.

Both problems should be delegated, not to a client, but to a persistent
class that possibly has an inititalization routine.

Magnus

> -----Original Message-----
> From: Alexander Schatten [mailto:alasan@gmx.net]
> Sent: 3. mai 2001 23:58
> To: soap-user@xml.apache.org
> Subject: Re: Configuration of SOAP server objects...
>
>
> obviously you didnt understand my question, hence I try to be
> more precise:
>
> SOAP makes an instance of the server class when an RPC call comes
> in. then the
> _standard_ constructor is called by Apache SOAP. off course, I
> could send the
> config options via client application, but it is obvious that you will not
> want to do this. by two reasons:
>
> (1) you move the problem to the client and more important
> (2) you will not want to have the data on the client (database
> passwords, ...)
>
> Alex
>
> Magnus ?or Torfason wrote:
>
> > I don't see the problem.  The only thing that soap does is call a method
> > that you have created in your class.
> >
> > Your method can do all the things you said, just as in any other java
> > programs.  The only thing that you must consider is that the startup
> > directory is the startup directory of the container.
> >
> > > -----Original Message-----
> > > From: Alexander Schatten [mailto:alasan@gmx.net]
> > > Sent: 3. mai 2001 14:47
> > > To: soap-user@xml.apache.org
> > > Subject: Configuration of SOAP server objects...
> > >
> > >
> > > My problem should be a common one, nevertheless I couldnt
> find anything
> > > about it:
> > >
> > > I have a server-side object, that is invoced using the SOAP RPC
> > > mechanism. basically this works fine BUT: guess the server side
> > > component needs to contact a database, retrieve data, ...
> > >
> > > then the server side object needs to read some config file at startup
> > > (constructor e.g.), to get the JDBC URL, password, loginname, and
> > > probably some other properties too. at the moment I have
> hard-coded this
> > > data into the class, but this is obviously a bad idea.
> > >
> > > Apache SOAP interface seems to offer no possibility to set initial
> > > parameters or something like that.
> > >
> > > how does "the rest of the world" (at least of the SOAP world)
> solve this
> > > problem?
> > >
> > >
> > > ideas are appreciated!
> > >
> > >
> > > thank you
> > >
> > >
> > > Alex
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > For additional commands, email: soap-user-help@xml.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Configuration of SOAP server objects...

Posted by Alexander Schatten <al...@gmx.net>.
obviously you didnt understand my question, hence I try to be more precise:

SOAP makes an instance of the server class when an RPC call comes in. then the
_standard_ constructor is called by Apache SOAP. off course, I could send the
config options via client application, but it is obvious that you will not
want to do this. by two reasons:

(1) you move the problem to the client and more important
(2) you will not want to have the data on the client (database passwords, ...)

Alex

Magnus ?or Torfason wrote:

> I don't see the problem.  The only thing that soap does is call a method
> that you have created in your class.
>
> Your method can do all the things you said, just as in any other java
> programs.  The only thing that you must consider is that the startup
> directory is the startup directory of the container.
>
> > -----Original Message-----
> > From: Alexander Schatten [mailto:alasan@gmx.net]
> > Sent: 3. mai 2001 14:47
> > To: soap-user@xml.apache.org
> > Subject: Configuration of SOAP server objects...
> >
> >
> > My problem should be a common one, nevertheless I couldnt find anything
> > about it:
> >
> > I have a server-side object, that is invoced using the SOAP RPC
> > mechanism. basically this works fine BUT: guess the server side
> > component needs to contact a database, retrieve data, ...
> >
> > then the server side object needs to read some config file at startup
> > (constructor e.g.), to get the JDBC URL, password, loginname, and
> > probably some other properties too. at the moment I have hard-coded this
> > data into the class, but this is obviously a bad idea.
> >
> > Apache SOAP interface seems to offer no possibility to set initial
> > parameters or something like that.
> >
> > how does "the rest of the world" (at least of the SOAP world) solve this
> > problem?
> >
> >
> > ideas are appreciated!
> >
> >
> > thank you
> >
> >
> > Alex
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Configuration of SOAP server objects...

Posted by Alexander Schatten <al...@gmx.net>.
obviously you didnt understand my question, hence I try to be more precise:

SOAP makes an instance of the server class when an RPC call comes in. then the
_standard_ constructor is called by Apache SOAP. off course, I could send the
config options via client application, but it is obvious that you will not
want to do this. by two reasons:

(1) you move the problem to the client and more important
(2) you will not want to have the data on the client (database passwords, ...)

Alex

Magnus ?or Torfason wrote:

> I don't see the problem.  The only thing that soap does is call a method
> that you have created in your class.
>
> Your method can do all the things you said, just as in any other java
> programs.  The only thing that you must consider is that the startup
> directory is the startup directory of the container.
>
> > -----Original Message-----
> > From: Alexander Schatten [mailto:alasan@gmx.net]
> > Sent: 3. mai 2001 14:47
> > To: soap-user@xml.apache.org
> > Subject: Configuration of SOAP server objects...
> >
> >
> > My problem should be a common one, nevertheless I couldnt find anything
> > about it:
> >
> > I have a server-side object, that is invoced using the SOAP RPC
> > mechanism. basically this works fine BUT: guess the server side
> > component needs to contact a database, retrieve data, ...
> >
> > then the server side object needs to read some config file at startup
> > (constructor e.g.), to get the JDBC URL, password, loginname, and
> > probably some other properties too. at the moment I have hard-coded this
> > data into the class, but this is obviously a bad idea.
> >
> > Apache SOAP interface seems to offer no possibility to set initial
> > parameters or something like that.
> >
> > how does "the rest of the world" (at least of the SOAP world) solve this
> > problem?
> >
> >
> > ideas are appreciated!
> >
> >
> > thank you
> >
> >
> > Alex
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: Configuration of SOAP server objects...

Posted by Magnus ?or Torfason <ma...@handtolvur.is>.
I don't see the problem.  The only thing that soap does is call a method
that you have created in your class.

Your method can do all the things you said, just as in any other java
programs.  The only thing that you must consider is that the startup
directory is the startup directory of the container.

> -----Original Message-----
> From: Alexander Schatten [mailto:alasan@gmx.net]
> Sent: 3. mai 2001 14:47
> To: soap-user@xml.apache.org
> Subject: Configuration of SOAP server objects...
>
>
> My problem should be a common one, nevertheless I couldnt find anything
> about it:
>
> I have a server-side object, that is invoced using the SOAP RPC
> mechanism. basically this works fine BUT: guess the server side
> component needs to contact a database, retrieve data, ...
>
> then the server side object needs to read some config file at startup
> (constructor e.g.), to get the JDBC URL, password, loginname, and
> probably some other properties too. at the moment I have hard-coded this
> data into the class, but this is obviously a bad idea.
>
> Apache SOAP interface seems to offer no possibility to set initial
> parameters or something like that.
>
> how does "the rest of the world" (at least of the SOAP world) solve this
> problem?
>
>
> ideas are appreciated!
>
>
> thank you
>
>
> Alex
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: Configuration of SOAP server objects...

Posted by Magnus ?or Torfason <ma...@handtolvur.is>.
I don't see the problem.  The only thing that soap does is call a method
that you have created in your class.

Your method can do all the things you said, just as in any other java
programs.  The only thing that you must consider is that the startup
directory is the startup directory of the container.

> -----Original Message-----
> From: Alexander Schatten [mailto:alasan@gmx.net]
> Sent: 3. mai 2001 14:47
> To: soap-user@xml.apache.org
> Subject: Configuration of SOAP server objects...
>
>
> My problem should be a common one, nevertheless I couldnt find anything
> about it:
>
> I have a server-side object, that is invoced using the SOAP RPC
> mechanism. basically this works fine BUT: guess the server side
> component needs to contact a database, retrieve data, ...
>
> then the server side object needs to read some config file at startup
> (constructor e.g.), to get the JDBC URL, password, loginname, and
> probably some other properties too. at the moment I have hard-coded this
> data into the class, but this is obviously a bad idea.
>
> Apache SOAP interface seems to offer no possibility to set initial
> parameters or something like that.
>
> how does "the rest of the world" (at least of the SOAP world) solve this
> problem?
>
>
> ideas are appreciated!
>
>
> thank you
>
>
> Alex
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org