• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Trying to use wsdl2java generated classes

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic