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 try try <tr...@yahoo.com> on 2002/10/16 10:01:45 UTC

How to configure SOAP Service? (how to pass a properties file to my application)

Hi, there

I have newbie question. After writing a RPC Service, I
realized that it needs to load a properties file. My
question is how can I let the RPC Service code know
where to locate the properties file. 

In normal Servlet codes, it can access initial
parameters, which are defined in Servlet configuration
files. However, the Java RPC Service Code does not
have any knowledge about its calling code, the SOAP
RPCRouter Servlet :-(

Would you guys point me a way on this problem?

Thanks,

Ted

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

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


Re: How to configure SOAP Service? (how to pass a properties file to my application)

Posted by Scott Nichol <sn...@scottnichol.com>.
There are two ways for a service class to access context and servlet
initialization parameters.  First, the service can implement the
ConfigurableService interface (see the configure sample).  When the
service class is loaded, the configure method on this interface is
called.  It gets parameters that are context initialization, servlet
initialization, and deployment descriptor values.  This is an excellent
option for you, assuming you can use a nightly drop, rather than an
official release, since the feature was added after the 2.3.1 release.

The second option is to add an initial parameter of type SOAPContext to
any method that you want to access the initialization parameters.  The
SOAPContext gives access to the following:

  // Well-defined names for the 'bag' in SOAPContext
  public static String BAG_HTTPSERVLET = "HttpServlet" ;
  public static String BAG_HTTPSESSION = "HttpSession" ;
  public static String BAG_HTTPSERVLETREQUEST = "HttpServletRequest" ;
  public static String BAG_HTTPSERVLETRESPONSE = "HttpServletResponse" ;
  public static String BAG_DEPLOYMENTDESCRIPTOR = "DeploymentDescriptor"
;

Scott Nichol
----- Original Message -----
From: "try try" <tr...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Wednesday, October 16, 2002 4:01 AM
Subject: How to configure SOAP Service? (how to pass a properties file
to my application)


> Hi, there
>
> I have newbie question. After writing a RPC Service, I
> realized that it needs to load a properties file. My
> question is how can I let the RPC Service code know
> where to locate the properties file.
>
> In normal Servlet codes, it can access initial
> parameters, which are defined in Servlet configuration
> files. However, the Java RPC Service Code does not
> have any knowledge about its calling code, the SOAP
> RPCRouter Servlet :-(
>
> Would you guys point me a way on this problem?
>
> Thanks,
>
> Ted
>
> __________________________________________________
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: How to configure SOAP Service? (how to pass a properties file to my application)

Posted by Scott Nichol <sn...@scottnichol.com>.
There are two ways for a service class to access context and servlet
initialization parameters.  First, the service can implement the
ConfigurableService interface (see the configure sample).  When the
service class is loaded, the configure method on this interface is
called.  It gets parameters that are context initialization, servlet
initialization, and deployment descriptor values.  This is an excellent
option for you, assuming you can use a nightly drop, rather than an
official release, since the feature was added after the 2.3.1 release.

The second option is to add an initial parameter of type SOAPContext to
any method that you want to access the initialization parameters.  The
SOAPContext gives access to the following:

  // Well-defined names for the 'bag' in SOAPContext
  public static String BAG_HTTPSERVLET = "HttpServlet" ;
  public static String BAG_HTTPSESSION = "HttpSession" ;
  public static String BAG_HTTPSERVLETREQUEST = "HttpServletRequest" ;
  public static String BAG_HTTPSERVLETRESPONSE = "HttpServletResponse" ;
  public static String BAG_DEPLOYMENTDESCRIPTOR = "DeploymentDescriptor"
;

Scott Nichol
----- Original Message -----
From: "try try" <tr...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Wednesday, October 16, 2002 4:01 AM
Subject: How to configure SOAP Service? (how to pass a properties file
to my application)


> Hi, there
>
> I have newbie question. After writing a RPC Service, I
> realized that it needs to load a properties file. My
> question is how can I let the RPC Service code know
> where to locate the properties file.
>
> In normal Servlet codes, it can access initial
> parameters, which are defined in Servlet configuration
> files. However, the Java RPC Service Code does not
> have any knowledge about its calling code, the SOAP
> RPCRouter Servlet :-(
>
> Would you guys point me a way on this problem?
>
> Thanks,
>
> Ted
>
> __________________________________________________
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


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