Hello Michael,
I've checked out the wiki also, but again it only seems to deal with the Web
service is all in one package deployment.
As I see it you can deploy multiple web services in two ways:
1. deploy them into the same Axis servlet
2. deploy the Axis servlet twice, deploy each web service into one of them.
With the former, they share the same classloader so you cannot have two
versions of classes with the same name/package.
With the latter they can.
If you are wondering how to set up the latter, it is the same as with
the former, just do it twice (just give them a different context-root).
Yes, the folders correspond to the package names. I am able to reference the
business logic statically, but can't do it dynamically. For example if in my
Web service *Impl class I write:
businesslogic bl = new businesslogic();
bl.doSomething();
it works. However if I try to do the following:
class c =
Thread.currentThread().getContextClassLoader().loadClass(className);
businesslogic bl = (businesslogic) c.getInstance();
I get an exception. Any ideas why? Also any ideas why the exception refuses
to be caught even though I wrap it in a try/catch(Exception e) block? The
error on the client side is java.lang.reflect.InvocationTargetException
The InvocationTargetException at the client could have a range of
causes. Probably, either your method with the try/catch block did not
even get executed (Axis had a problem invoking your method), or it did,
successfully or not, and after that an error occurred. You might want to
add a bunch of println statements to your impl's method to see how much
of your method is actually called.
Also, if you use Class.forName(className) instead of the context
classloader to load your business logic classes, does it not work?
Also when using a resource bundle with a properties file, the properties
file needs to be in \Tomcat\webapps\axis\WEB-INF\classes\ to be found.
Does
this mean that all services on the server need to have differently named
Yes. It is usual to put your property files in packages like your
classes, so this should not be a problem?
Sorry, I'm not 100% sure what you mean here, are you saying that it is usual
to store the properties files in a jar (in which case can you alter them?)
or just that you should have separate names for them? I am slightly confused
at the way that you would have a common package that needs a different
configuration for each service it is used in. It seems to me that this is
not possible unless you pass the properties to the common package when you
instantiate it?
Maybe I misunderstood what you said. You were talking about a resource
bundle with a properties file. I'd expect it to contain locale-specific
resources (like messages, image filenames). Each component has its own
locale-specific objects and therefore its own property file (usually in
the same package in the jar).
Now I (think that I) understand that you have several web services that
share some common jar with business logic, and you need to pass
properties to this jar that differ for each invoking service?
Forget web services, what if you had two clients that you'd have to
start with the same classpath setting, how would you do this?
Regards,
Dies
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]