This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Services and the fly likes Problem with Axis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem with Axis" Watch "Problem with Axis" New topic
Author

Problem with Axis

Mnau Lubi
Ranch Hand

Joined: Mar 17, 2010
Posts: 32
Hey!

When I try to execute the web service method the console comes up with this message:



Anyone know what is happening?

Thanks
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
What exactly you are tying to do. Are you trying to connect to remote service using axis as client.


SCJP 1.5(97%) My Blog
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
Either you're using a wrong URL (/gruppos/services/GroupManager), or the server is not running. Check the http://localhost:8080/axis/services/listServices page for the correct URL.


Ping & DNS - my free Android networking tools app
Mnau Lubi
Ranch Hand

Joined: Mar 17, 2010
Posts: 32
I tried http://localhost:8080/axis/services/listServices and it says description The requested resource (/axis/services/listServices) is not available.

To be more detailed the method I try to access is one which writes in a database. I must say this because I found something strange: I have a class which writes into the database and using that class I created the webservice and after that the webclient. The strange thing is that when I try to call that method using the client I get a: Exception: com.mysql.jdbc.Driver which I don't get when I execute the previous class, only using web service & client. The MySQL jar is already in the path of the webserver so I don't know why is this happening . Could it be related to the error I first posted?

Thnks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
The URL I posted for just an example - go to the home page of your Axis web app installation and follow the links.

Make sure the JDBC driver jar file is in the WEB-INF/lib directory of the web app that uses it, or in a directory that you're certain is used for jar files that should be in the classpath of the server. Restart the server afterwards.
Mnau Lubi
Ranch Hand

Joined: Mar 17, 2010
Posts: 32
The thing is that I created the webservice and the webclient in Eclipse using this link http://wiki.eclipse.org/Creating_a_Bottom-Up_Java_Web_Service which explains easily how to create a webservice and client but without any thoretical stuff, just as a cook recipe. So I guess I should study some stuff about axis which is something I'll do right away. Anyway, I tried the webpage localhost:8081/axis/ which should show anything (my server port is 8081) but again does not find anything. Where I found something is in the URL; http://localhost:8081/GrupposClient/sampleGroupManagerProxy/TestClient.jsp?endpoint=http://localhost:13237/Gruppos/services/GroupManager where all the methods of the class GroupManager can be accessed and there is where I get that Exception: com.mysql.jdbc.Driver. Do you know if the webservices must be created in other way if you are using databases?

Thanks
Mnau Lubi
Ranch Hand

Joined: Mar 17, 2010
Posts: 32
Great! One problem is solved! I placed the JDBC driver jar file in the WEB-INF/lib folder as you said instead of somewhere else and now there is no JDBC exception. I'll try now the other error.

No, the axis error is still there. Looks like they were not related
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41621
    
  55
Looks like they were not related

Of course they weren't. A wrong URL has nothing to do with a JDBC driver not being found. The former is a client problem while the latter is a server problem.
 
Don't get me started about those stupid light bulbs.
 
subject: Problem with Axis