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 Walid Rjaibi/Zurich/IBM <rj...@zurich.ibm.com> on 2001/08/27 16:40:51 UTC

RPC-based SOAP service

Hi,

Suppose I create a standard Java class that has a method called "add()",
which I would like to expose as a SOAP service. I am assuming that it is
the SOAP engine that creates an instance of this class (please correct me
if I am wrong). My question is at what time this instance is created? Is it
at startup time or is it when the first RPC SOAP request is made to the
method "add()"? I am assuming that an instance is not created for each
request, is that correct?

Thank you very much!

Cheers,
Walid





Re: RPC-based SOAP service

Posted by William Brogden <wb...@bga.com>.

Walid Rjaibi/Zurich/IBM wrote:
> 
> Hi,
> 
> Suppose I create a standard Java class that has a method called "add()",
> which I would like to expose as a SOAP service. I am assuming that it is
> the SOAP engine that creates an instance of this class (please correct me
> if I am wrong). My question is at what time this instance is created? Is it
> at startup time or is it when the first RPC SOAP request is made to the
> method "add()"? I am assuming that an instance is not created for each
> request, is that correct?
> 
> Thank you very much!
> 
> Cheers,
> Walid

That is going to depend on how the scope of the service is declared.

 <isd:provider type="java"
   scope="Application"

I think that would cause the object to be created at the first usage
and it would then remain in memory.


-- 
WBB - wbrogden@lanw.com
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

Re: RPC-based SOAP service

Posted by William Brogden <wb...@bga.com>.

Walid Rjaibi/Zurich/IBM wrote:
> 
> Hi,
> 
> Suppose I create a standard Java class that has a method called "add()",
> which I would like to expose as a SOAP service. I am assuming that it is
> the SOAP engine that creates an instance of this class (please correct me
> if I am wrong). My question is at what time this instance is created? Is it
> at startup time or is it when the first RPC SOAP request is made to the
> method "add()"? I am assuming that an instance is not created for each
> request, is that correct?
> 
> Thank you very much!
> 
> Cheers,
> Walid

That is going to depend on how the scope of the service is declared.

 <isd:provider type="java"
   scope="Application"

I think that would cause the object to be created at the first usage
and it would then remain in memory.


-- 
WBB - wbrogden@lanw.com
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2