Olivier Lefevre wrote:
> Re. the earlier problem, here is what I found:
> 1) custom classes in their own package and in their own jar 
>    under WEB-INF/lib: ClassNotFoundException 
> 2) custom classes in their own package and in their own jar or
>    aar under WEB-INF/services: ClassNotFoundException; note that
>    in this case you must include a services.xml files (I used
>    an empty one, i.e., just <serviceGroup/>) in the jar or aar 
>    file, otherwise Axis will complain about that as well
> 3) custom classes in their own package and in core.aar: works!
> 4) custom classes in net/sf/basedb/ws/server and therefore in
>    core.aar: works but it is a last-resort option
> So I am reasonably happy with 4): the worst scenario is that
> you have to unpack and then repack third-party jars.

I made some quick investigations as well and it seems like each .aar
file has it's own class loader (created by Axis). The parent class 
loader is the regular Tomcat class loader which means that classes in an 
.aar file can only use classes that are in the same .aar file or classes 
in the WEB-INF/lib/ directory. Classes in the WEB-INF/lib/ directory 
can't use classes from any .aar file because those files are not known 
by the Tomcat class loader.

This is described as a feature since it means that an .aar file can be 
replaced with a new version and deployed without having to restart the 
web application. So, since the ServicesUtil class is found in the 
core.aar file it means that it can only be used by other classes in 

>> I don't see how it would be possible to return any
>> structured information as simple strings. 
> One could use JSON or even XML.

I have heard the name JSON but didn't know that it had to do with web 
services. Regarding XML, everything is already sent as XML which is 
unwrapped and converted to Java objects by Axis. I have seen code 
examples (from the Axis tutorial) were the response is accessed as XML 
instead so I think that option is already available. Just because it is 
Java objects on the server side doesn't mean that it has to be the same 
objects on the client side (but it is convenient).


Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
basedb-devel mailing list

Reply via email to