Sushil,
I've only used JNDI once, with Tomcat, so am not too sure about the details. I also don't have Tomcat on my machine at the moment. However, you can define resources in the Tomcat configuration files, in terms of a JNDI name and a class name. Tomcat will instantiate the class and bind it to the name in its JNDI implementation. You can then get to the JNDI initial context just by creating an initial context instance, and then you can lookup the resource you want. You need to check out the Tomcat documentation for more information. I think resources can be defined globally or for a particular Web application.
Sorry, I can't say anything about your second question, unless it's already covered in what I've said above, if the "deployment descriptor" refers to the Web application's configuration. The Web application, in this case, would be Axis.
Tony
| "Sushil Sureka"
<[EMAIL PROTECTED]>
07-Sep-2004 00:53
|
|
Thanks Tony. I am concerned with client running in J2EE environment only. When you say that I should be able to specify a JNDI resource that defines a stub class, can you please explain this in more detail on how to go about it.
Also the book says that JNDI name of the web service should be defined (somewhere in deployment descriptor) and after that a client code that is running in a J2EE application without any extra work. Any ideas on how to do that?
Sushil
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, September 06, 2004 9:26 AM
To: [EMAIL PROTECTED]
Subject: Re: JNDI Lookup does not work with Tomcat/Axis
I'm not too sure about using JNDI on the client side. If you are using client code in a J2EE application, running on Tomcat, then you should be able to specify a JNDI resource, in the Tomcat configuration, that defines a stub class (or factory class) for your web service stub. But if your client is not a J2EE application, I don't know how you'd locate a JNDI service that has a binding for a stub or factory class. In this case, stick with creating a locator instance yourself.
Tony
