Meaningless Drivel is fun!*
The moose likes Web Services and the fly likes difference in services.xml between .aar and unpacked file in Axis2? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "difference in services.xml between .aar and unpacked file in Axis2?" Watch "difference in services.xml between .aar and unpacked file in Axis2?" New topic
Author

difference in services.xml between .aar and unpacked file in Axis2?

Jeff Boucher
Greenhorn

Joined: Aug 18, 2008
Posts: 14
Hi,

I'm a little confused by a difference I've run into between unpacked files and .aar archives deployed in Axis2 on Tomcat.

I went through a tutorial on database web services where you implement theServiceLifeCycle to establish and/or close a database connection at the time the service is loaded. (Here's the link to the tutorial if you're interested, though it's probably not necessary to follow this post...)

http://www.developer.com/db/article.php/10920_3735771_1

I wanted to use the service archiver wizard plugin for eclipse, so I used it to generate the .aar file. Then I unzipped it (by renaming the extension from .aar to .zip) and editied services.xml in the WEB-INF directory to make sure the class that implements servcelifecycle is referenced and loaded when the service launches.

So far, so good. The application worked. However, when I zipped the file and renamed it to .aar (which I think is legit - a .aar, as far as I understand, is just an archive of the .class files and some configuration files), the directory that worked when unpacked threw and exception - "services.xml" not found.

Is a different mechanism invoked when Axis2 encounters a .aar file instead of an unpacked file? It's exactly the same directory, just zipped with a .aar extension.

Oh, in case it helps - if I do this but *don't* alter the services.xml file, this error doesn't occur (however, in that case, I wouldn't be able to configure the ServiceLifCycle implementation class.

Any ideas about what's going on here?

Thanks!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: difference in services.xml between .aar and unpacked file in Axis2?
 
Similar Threads
Axis2-1.4 help
Need help using annotations with Axis2
Help Needed in java web services using axis2
webservice deployment folder structure
From where the WSDL come from?