• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem deploying ws with axis

 
carl kjell
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no problem with deploying a web service in axis if it is just one class that is used, from this class I make the stubs etc. with java2wsdl and wsdl2java, compiling it and making a *.jar file out of it and puting it in axis lib catalog. This works fine, but now I have a web service that has to classs, (getdataclass, and a databaseclass).
When I am using a method that don't uses the databaseclass everyting works fin but if i have a method in getdataclass that calls databaseclass it doesn't work (I only have one test method now that returns a simple string).
Do I have to tell axis that there are a databasclass as well in the wsdd? or some other place? The databaseclass is only accessed through getdataclass!!
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post what error you are getting ?
Can you also post your code snippet.
BYW If i understood your context correctly, you don't have to tell all of your methods or classes to your webservices. You can have one public method(exposed as webservice operation) and that method can call other private/public methods/classes available to it.
 
carl kjell
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This is the class which is deployed with axis...
when i call getTestString(), everything works fine.
But when i call getDbTestString(), i get "java.lang.NullPointerException"
dbclass:

testclient:

the nullpointer is at the two places where a whant to print my variables.. they are null
Tnx in advance!
[ April 26, 2004: Message edited by: carl kjell ]
Edited code for better view: Balaji
[ April 26, 2004: Message edited by: Balaji Loganathan ]
 
carl kjell
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code works fine as standalon (not as a web services), and they are in the same package.
[ April 26, 2004: Message edited by: carl kjell ]
 
carl kjell
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, now i got the getDbTestString() to work, i just did put the ipadress directly in the constructor...
but when i try to get to my databas (mysql) i get a String[] that is null.
If i use the same code but not as a web services i got hte right result
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by carl kjell:

but when i try to get to my databas (mysql) i get a String[] that is null.

Good.
Can you tell us in what class/method ?
 
carl kjell
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

in LakersImpl.getTitles();
it now returns "test2" so some kind of exception is happening, but not if i run this code as a normal program (not as web services).
 
carl kjell
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is this line who makes the fault, in the above LakersImpl:
result = db.getResultSet();

here is the whole dbclass, it is strange when it works when it's not a web services!
[ April 26, 2004: Message edited by: carl kjell ]
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by carl kjell:


Can you print the System.out.println(sqlException) and tell us what error you are getting!..
 
carl kjell
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.NullPointerException
It couldn't be any sql .jar file that isnt in the classpath? or something like that, if so, where do i find tit?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!