I am writing a web service to be deployed on Tomcat using Axis2. I am using Hibernate3 to persist data between the web service and a MySQL database.
When running the application through by IDE, the method I am exposing through Axis2 works as intended, however when I deploy the .aar to Tomcat, I receive a SOAP Error claiming that hibernate.cfg.xml cannot be found.
However, inside the .aar, I clearly see that all the configuration file and all the mapping files are included.
I have determined a workaround: If I place the resulting files from the Netbeans build/class folder into the axis2/WEB-INF/class folder, then the application works as expected.
My question, then, is is there a better way to deploy my application so that Axis2 will pick up the configuration and mapping files through the deployed .aar without my manually having to copy the contents of the build/class folder into the axis2/WEB-INF/class folder?