I have been trying to make a webservices with Apache Axis but I can`t manipulate another classes inside of my .jws file.
Steps: 1) Made my services and the class LabServices.java 2) Changed the extension of my file to .jws (LabServices.jws) 3) Put the .jws file into the axis`s root directory that is into Tomcat`s webapps folder. 4) Generated a jar with the files ComputerDAO and Computer that are inside the package labservices.dao and labservices.model respectively. 5) Put the jar file in the windows classpath.
JWS file:
1. import labservices.dao.ComputerDAO; 2. import labservices.model.Computer; 3. 4. 5. public class LabServices 6. { 7. 8. public Computer getComputerSpecs(Computer computer) 9. { 10. ComputerDAO cDao = new ComputerDAO(); 11. 12. return cDao.retrievePCSpecs(computer); 13. } 14. 15. 16. }
After I had built the clss I build a JAR file and put it into the classpath, when I run the JWS file as a JAVA file (changing its name to LabServices.java and running with the command java in the cmd) it is ok, the class is generated without any error, but when I try to get the WSDL of my service it can`t find the imports.
Error:
AXIS error
Sorry, something seems to have gone wrong... here are the details:
Fault - Error while compiling: D:\JavaTools\tomcat\webapps\axis\WEB-INF\jwsClasses\LabServices.java
AxisFault faultCode: {http://xml.apache.org/axis/}Server.compileError faultSubcode: faultString: Error while compiling: D:\JavaTools\tomcat\webapps\axis\WEB-INF\jwsClasses\LabServices.java faultActor : faultNode: faultDetail: {}Errors:Error compiling D:\JavaTools\tomcat\webapps\axis\WEB-INF\jwsClasses\LabServices.java: Line 1, column 22: package labservices.dao does not exist Line 2, column 24: package labservices.model does not exist Line 8, column -1: cannot find symbol Line 8, column -1: cannot find symbol Line 10, column -1: cannot find symbol Line 10, column -1: cannot find symbol Line 0, column 0: 6 errors
How can I manipulate the packages and sub-packages to work with Apache Axis?