wood burning stoves*
The moose likes Web Services and the fly likes Accessing web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Accessing web service" Watch "Accessing web service" New topic
Author

Accessing web service

Anbarasu Selvaraj
Greenhorn

Joined: Mar 07, 2006
Posts: 21
Guy's please tell me how to invoke(or access) webservices
vikram Kesav
Ranch Hand

Joined: Jul 11, 2008
Posts: 69
You can access any web service using WSDL file.

approach is like-

1) First identify WSDL file.
2) Create stubs of WS using WSDLToJava command.
3) Identify authentication if required, and call same in your call from client.
Anbarasu Selvaraj
Greenhorn

Joined: Mar 07, 2006
Posts: 21
Thank You Vikram.

But, the Stub Creation is giving error. (For WSDL File i am Giving URL)
vikram Kesav
Ranch Hand

Joined: Jul 11, 2008
Posts: 69
Can you paste error message and let me know the WSDL link if it is not password protected.
Anbarasu Selvaraj
Greenhorn

Joined: Mar 07, 2006
Posts: 21
The Error Message is,
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/wsdl/WSDL2Java

all jar files are included in classpath
vikram Kesav
Ranch Hand

Joined: Jul 11, 2008
Posts: 69
Just make sure....Do you have any of the below jar file in your classpath.

What IDE you are using? try to set axis jars classpath on command prompt and run WSDL2Java command from there.


Information on class org.apache.axis.wsdl.WSDL2Java:

Containing JAR files:
axis.jar
axis-1.0.jar
axis-1.1.jar
axis-1.2.1.jar
axis-1.2.jar
axis-1.3.jar
axis-1.4.jar
axis-1.4.jar
axis-1.1-beta.jar
axis-1.2-RC1.jar
axis-1.2-RC2.jar
axis-1.2-RC3.jar
axis-1.2-alpha-1.jar
axis-1.2-beta-2.jar
axis-1.2-beta-3.jar

Anbarasu Selvaraj
Greenhorn

Joined: Mar 07, 2006
Posts: 21
Thank You Vikram. Eclipse it's working.( still, command line it's not working.)
 
 
subject: Accessing web service
 
Similar Threads
Access denied Error in the Ant
access specifier and access modifier
Constructors
Summary of book
database in netbeans