Doug,
I tried the example u sent below and it fails because Hashtable props =
dd.getProps(); returns null. I think my "option"(I used isd:option as shown
below) xml element name is either incorrect or misplaced. My deployement
descriptor is below, please let me know how if the init parms should be
placed and/or named.
------------------------------------------- DD
----------------------------------------------------
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:my-test- service" type="message">
<isd:provider type="java"
scope="Request"
methods="testMethod">
<isd:option key="jdbc-driver-name" value="com.oracle .. "/>
<isd:option key="tnsname" value="mydb"/>
<isd:option key="db-port-no" value="1521"/>
<isd:java class="simplexis.bulk.process.BulkUploadManager"
static="false"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListene
r>
</isd:service>
---------------------------------------------- DD
----------------------------------------------------
Regards,
> > > >
Uzay Takaoglu
Sr. Software Engineer
Simplexis
> > eCommerce for the Business of Education
www.simplexis.com
640 2nd Street
San Francisco, CA 94107
Direct: 415.354.2061
Cell: 415.845.7831
Fax: 415.354.2099
-----Original Message-----
From: Doug Davis [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 4:29 PM
To: [EMAIL PROTECTED]
Subject: Re: setting init parms for non-EJB java service
I just checked in a change that will add the DeploymentDescriptor object
to the "bag" in the SOAPContext:
dd = cntxt.getProperty(Constants.BAG_DEPLOYMENTDESCRIPTOR);
Once you have the DD you can query its options:
Hashtable props = dd.getProps();
String value = (String) props.get( "myoption" );
Grab either the latest code or tonight's build.
-Dug
Uzay Takaoglu <[EMAIL PROTECTED]> on 07/09/2001 01:51:14 PM
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: setting init parms for non-EJB java service
Hi All,
I'm using SOAP 2.2 on Linux. Is it possible to pass set of init paramters
to
a non-EJB SOAP java component? E.g. Just like servlets passing a config
instance to init() method.
The sample for the EJB service deployment descriptor contains
<isd:option key="" value=""/>, can we use the same thing for non-EJB java
components? If yes, how do we retrieve the values of the keys?
Using SOAPContext.getProperty(String key) for request or response?
P.S: I used the messagerouter so my service has a method receiving
org.apache.soap.Envelope envelope,
org.apache.soap.rpc.SOAPContext request,
org.apache.soap.rpc.SOAPContext response
parameters
Regards,