| Author |
newbie: passing configuration param to WS
|
Mark Donaghue
Greenhorn
Joined: Mar 27, 2007
Posts: 1
|
|
Hi, I'm trying to figure out the simplest way to communicate a configuration parameter to a web service. In this case, it's a directory location. I've done a lot of searching, but I'm not clear on how to achieve this. I'm using Tomcat 5.028, Axis 1.4. I'm thinking about adding something to web.xml, either this: <web-app> <context-param> <param-name> dir_name </param-name> <param-value> /usr/local/abcd </param-value> </context-param> or perhaps this: <init-param> <param-name>dir_name</param-name> <param-value>f/usr/local/abcd</param-value </init-param> But, I'm not clear on the difference between the two, nor how to access them from a wsdl-generated web service (...SoapBindingImpl). Any ideas appreciated!
|
 |
Karthik Rajendiran
Ranch Hand
Joined: Aug 13, 2004
Posts: 209
|
|
Access to the context param is possible through servletcontext. In JAX RPC service endpoint, (i.e which implements the servicelifecycle), init method has the context object,which can be typcasted to servletcontext. The parameter can be obtained from that One More question 1. You have web.xml entries, you have code for accessing webservices 2. Does your webservice run in the same app server as client?
|
SCJP 1.4 SCWCD 1.4 SCDJWS 1.4
|
 |
Karthik Rajendiran
Ranch Hand
Joined: Aug 13, 2004
Posts: 209
|
|
http://java.sun.com/developer/technicalArticles/WebServices/getstartjaxrpc/ just got this. if you see the implementation,class, a similar to one should be written
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: newbie: passing configuration param to WS
|
|
|