[prev in list] [next in list] [prev in thread] [next in thread]
List: soap-user
Subject: Re: Passing initliasation parameters to SOAP services
From: Scott Nichol <snicholnews () scottnichol ! com>
Date: 2003-01-22 14:13:20
[Download RAW message or body]
On 22 Jan 2003 at 10:22, Jesus M. Salvo Jr. wrote:
>
> Scott Nichol wrote:
>
> >If you are using Apache SOAP 2.3.1 or 2.2, you can use the method
> >described in http://xml.apache.org/soap/docs/guide/migration.html.
> >Specifically, you add a parameter of type SOAPContext as the first
> >parameter in your method. You then use SOAPContext's "bag" to get
> >the servlet associated with the call. From there, you can get
> >servlet initialization information.
> >
> >
> >
> 1) OK .. .Read that part ... but what I do not understand is, what is
> the difference between the SOAPContext that is passed as the first
> argument, versus the other SOAPContexts ( requestCtx and responseCtx ),
> as mentioned in "Writing a Messaging Services":
>
> void */name/*(SOAPEnvelope */request-envelope/*, SOAPContext
> */request-context/*, SOAPContext */response-context/*)
>
> Meaning .... Why can't I get the property via
> requestContext.getProperty() or responseContext.getProperty()?
The SOAPContext that is the first parameter for an RPC is the same as
the SOAPContext that is requestCtx for a messaging service. It is
the context of the request. Therefore, if you are writing a
messaging service, you can get parameters through requestCtx.
>
>
> 2) Even if you do get the servlet initialisation from the "bag" ...
> there are other issues with this approach:
>
> 2a) Although the parameters can be localised to either SOAP RPC or SOAP
> messaging servlets ( since there are two servlets deployed with soap.war
> ), any initialisation parameters to the SOAP messaging servlet are
> "global" for all SOAP messaging services ... likewise true for SOAP rpc
> servlet and SOAP rpc services. Would have been good if there is a way to
> specify initialisation parameters at the SOAP service level ... not the
> servlet level.
If you use Apache SOAP 2.3 or later, there is a way: the deployment
descriptor for the service. That can be accessed from the
SOAPContext bag using Constants.BAG_DEPLOYMENTDESCRIPTOR.
>
> 2b) This mean that you have to change the web.xml that comes with
> apache-soap. ( e.g.: Explode soap.war int $TOMCAT_HOME/web-apps/, remove
> soap.war, .... etc. .. There is a slight possibility someone may
> accidentally alter the configuration in such a way that the Apache-SOAP
> itself no longer works.
>
True. The same goes for the "global" web.xml that some servlet
containers, such as Tomcat, use.
>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:soap-user-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>
>
>
Scott Nichol
--
To unsubscribe, e-mail: <mailto:soap-user-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-user-help@xml.apache.org>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic