Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to use wsdl2java generated classes  RSS feed

 
sony kapoor
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am new to java, so please bear with me. I am an asp.net programmer though. I used axis2's wsdl2java program to generate the wsdl for my webservice. This generated a single file in the folder:

src/net/mycompany/www/services/SessionIntegrationStub.java

I compiled this class using javac and it produced several .class files in the same folder.

Then I created a new .java file again in the same folder to consume the webservice. My code looks like this:

package net.mycompany.www.services;
...
SessionIntegrationStub stub = new SessionIntegrationStub();
System.out.println(stub.getSessionIntegration("test"));

Now when I try to compile this class, then javac is not able to find the SessionIntegrationStub class, although I can see the SessionIntegrationStub.class file in the same folder. Is there anything I am missing?

Thanks,
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
If it is not an absolute requirement to use Axis, you can save yourself a lot of trouble by using the NetBeans IDE to develop a Java web service and/or a Java web service clients.
I can recommend the following tutorials:
Developing Java web services: http://netbeans.org/kb/docs/websvc/jax-ws.html
Developing Java web service clients: http://netbeans.org/kb/docs/websvc/client.html
There is even a tutorial showing how to do Java-first web service development for deployment on Axis with NetBeans: http://netbeans.org/kb/docs/websvc/gs-axis.html
Best wishes!
 
sony kapoor
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ivan Krizsan wrote:Hi!
If it is not an absolute requirement to use Axis, you can save yourself a lot of trouble by using the NetBeans IDE to develop a Java web service and/or a Java web service clients.


What about Groovy? Can I use that too? Is it easy to use?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can use Groovy - take a look at the following web page:
http://groovy.codehaus.org/GroovyWS
I leave it up to you to determine if it is easy or not.
Best wishes!
 
sony kapoor
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded netbeans and I am trying to use the webservices getCheckSoap function as described here: http://netbeans.org/kb/docs/websvc/client.html
However this function doesnt exist. Is this function deprecated?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
sony kapoor wrote:I downloaded netbeans and I am trying to use the webservices getCheckSoap function as described here: http://netbeans.org/kb/docs/websvc/client.html
However this function doesnt exist. Is this function deprecated?


That is a function in the web service that they are developing a client to. Your web service probably have other functions.
I recommend using drag-and-drop (drag a web service operation into the code window), as they also mention in the tutorial, to invoke operations of the web service.
Best wishes!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!