Thank you all for the responses: I'll take a look tomorrow at the mentioned methods; looks like I didn't look well enough into the code :)
best regards, adrian. On Wednesday 06 November 2002 18:52, Dennis Sosnoski wrote: > Just to avoid potential confusion, "Constructor" is not the proper term > here. The service locator class has a pair of factory methods that > return instances of the actual service interface. One of these uses the > default URL hard-coded in the class definition, the other uses a > passed-in URL. You want to use the one that takes a passed-in URL rather > than the no-arguments method, Adrian. > > - Dennis > > [EMAIL PROTECTED] wrote: > >Hi! > > > >I'm using Axis beta 1 (or is it beta 2?), and my "MyServiceLocator" has > > TWO constructors, one that uses the "private final" field, but also one > > that takes a parameter "java.net.URL portAddress", which solves the > > problem of changing URL to the SOAP web service. > > > >Are you sure that there is no constructor that takes a parameter of type > > java.net.URL? > > > >If so, does anyone know if this extra constructor has been removed (by > > error I guess) in the latest Axis release(s)? > > > >Eirik Wahl > > > >>-----Original Message----- > >>From: [EMAIL PROTECTED] [mailto:adrian.dimulescu@;free.fr] > >>Sent: 6. november 2002 11:14 > >>To: [EMAIL PROTECTED] > >>Subject: "private final" attribute in generated stub java client > >> > >> > >>Hello, > >> > >>One little question concerning the Axis-generated Java stub client: > >> > >>The MyServiceLocator class (which actually contains an attribute like: > >> > >> private final java.lang.String kercash_address = > >> "http://172.20.140.221/axis/services/myservice"; > >> > >>declares it as "private final". > >> > >>Why is that a problem? Because one normally generates a set of client > >>stubs and packages them somehow, puts them in production etc. > >>What if the > >>address of the wsdl changes - which, by the way, kind of > >>happens all the time as > >>you deploy it on different test machines with different > >>locations of the WSDL > >>only to get it in production. > >> > >>So, what does one do? He does not regenerate everytime the > >>classes (on prod > >>machines often there aren't even compilers). So he seeks to > >>parameterize the > >>location of the wsdl, like, say: > >> > >>locator = new > >>MyServiceLocator("http://172.20.140.221/axis/services/myservice") > >> > >>But, wait! There is no such constructor, as the address of the WSDL is > >>hardwired. No problem, says the Java programmer, I will get it my way: > >> > >>class ParameterizableMyServiceLocator extends MyServiceLocator { > >> ParameterizableMyServiceLocator (String wsdlLocation) { > >> myservice_address = wsdlLocation; > >> } > >>} > >> > >>No go: myservice_address is "final private", not simply > >>"protected"; this > >>makes sense as long as the idea is hardwiring it. But the > >>question is: would > >>it be possible to only "protect" it so that runtime > >>parameterization can be done? > >> > >>Thank you, > >>Adrian Petru Dimulescu
