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 "LeVan,Ralph" <le...@oclc.org> on 2001/09/25 21:47:04 UTC

Web Service Configuration Information?

How do I get access to application configuration information in a SOAP
service?  There doesn't seem to be an init() method nor are there any
parameters for the service's constructor.  I'm considering dropping back to
using a java servlet and processing the SOAP envelope myself, just to get
access to an init() method.

Thanks!

Ralph

Ralph LeVan
Sr. Research Scientist
OCLC Online Computer Library Center, Inc.
http://purl.org/net/levan



Re: Web Service Configuration Information?

Posted by Mike Williams <mi...@mikesbox.com>.
----- Original Message -----
From: "LeVan,Ralph" <le...@oclc.org>
To: "Soap-User (E-mail)" <so...@xml.apache.org>
Sent: Tuesday, September 25, 2001 3:47 PM
Subject: Web Service Configuration Information?


> How do I get access to application configuration information in a SOAP
> service?  There doesn't seem to be an init() method nor are there any
> parameters for the service's constructor.  I'm considering dropping back
to
> using a java servlet and processing the SOAP envelope myself, just to get
> access to an init() method.
>
> Thanks!
>
> Ralph
>
> Ralph LeVan
> Sr. Research Scientist
> OCLC Online Computer Library Center, Inc.
> http://purl.org/net/levan
>
>

Ralph,

You might want to consider creating a custom provider for your service.  The
provider is called before the service's methods are invoked and you have
access to the SOAPContext which has references to all the normal Servlet
stuff we know and love :)

Below is a code snippet from the locate method of a provider I use.

public void locate( DeploymentDescriptor dd,
                        Envelope envelope,
                        Call call,
                        String methodName,
                        String targetObjectURI,
                        SOAPContext reqContext )
        throws SOAPException
    {
        super.locate( dd, envelope, call, methodName, targetObjectURI,
reqContext );
        validateUser( envelope );

        ( ( StrobeServiceBase ) this.targetObject ).setContext(
reqContext );
        ( ( StrobeServiceBase ) this.targetObject ).setIsSecured( true );
    }

Hope this helps!

Mike


Re: Web Service Configuration Information?

Posted by Mike Williams <mi...@mikesbox.com>.
----- Original Message -----
From: "LeVan,Ralph" <le...@oclc.org>
To: "Soap-User (E-mail)" <so...@xml.apache.org>
Sent: Tuesday, September 25, 2001 3:47 PM
Subject: Web Service Configuration Information?


> How do I get access to application configuration information in a SOAP
> service?  There doesn't seem to be an init() method nor are there any
> parameters for the service's constructor.  I'm considering dropping back
to
> using a java servlet and processing the SOAP envelope myself, just to get
> access to an init() method.
>
> Thanks!
>
> Ralph
>
> Ralph LeVan
> Sr. Research Scientist
> OCLC Online Computer Library Center, Inc.
> http://purl.org/net/levan
>
>

Ralph,

You might want to consider creating a custom provider for your service.  The
provider is called before the service's methods are invoked and you have
access to the SOAPContext which has references to all the normal Servlet
stuff we know and love :)

Below is a code snippet from the locate method of a provider I use.

public void locate( DeploymentDescriptor dd,
                        Envelope envelope,
                        Call call,
                        String methodName,
                        String targetObjectURI,
                        SOAPContext reqContext )
        throws SOAPException
    {
        super.locate( dd, envelope, call, methodName, targetObjectURI,
reqContext );
        validateUser( envelope );

        ( ( StrobeServiceBase ) this.targetObject ).setContext(
reqContext );
        ( ( StrobeServiceBase ) this.targetObject ).setIsSecured( true );
    }

Hope this helps!

Mike