The Artima Developer Community
Sponsored Link

Web Services Forum
How to manipulate packages and sub-packages in the Axis Web Services folder

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Welysson Soares

Posts: 1
Nickname: welysson
Registered: Nov, 2008

How to manipulate packages and sub-packages in the Axis Web Services folder Posted: Nov 10, 2008 4:59 AM
Reply to this message Reply
Advertisement
Hi friends

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?

Topic: Venkat Subramaniam to Speak on Debugging Ajax, Agile Development, Previous Topic   Next Topic Topic: Tabula framework : REST Server & REST Editor alpha version 0.50

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use