I recently had the pleasure of using Axis2 on a Web Application. For reasons I cannot go into here, we were unable to use my original choice SpringWS. We were using Spring so it would have been a piece of cake to expose a document style web service using SpringWS.
When I finally got my application modified to use Axis2 to expose the web service, the final result was not pretty. In Axis2 you have to create the following in your WEB-INF
1 2 3 4 5 6 7 8 9 10 11 |
WEB-INF - services\ services.list (list of aar file names ... one on each line) service1.aar service2.aar - modules\ modules.list (list of aar file names ... one on each line) module1.aar - conf\ axis2. xml |
Each aar file contains in my case
1 2 3 4 |
service1.aar - META-INF\ service.xml (this actually contains the service configuration for service1) |
service.xml (this actually contains the service configuration for service1)
service.aar is a jar that contains your service configuration and any libraries that you may choose to include. In my case all libraries were in web–inf/lib. If you need to implement custom handlers (as was my case) you have to create modules and the corresponding module.aar file. If you want your handler to take effect you need to then pull out the axis2.xml file from the axis jar file, modify it to include your handler then put it into web-inf/conf
All this to even expose a simple secure hello world. I always wondered why Spring documentation did not cover integrating Spring with Axis2. Now I know. This is way too complicated ! Those who read this and say deploy as .jws , that wont work for me. Maybe it does for you.