Accessing Webservice from a Java Class


I have wsdl address and I need to access the webservice methods of that wsdl. So I guess I need to create the client to access those methods.

I need the minimum of configuration and coding to access the methods. Can someone help in this regard.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Have a look at Apache Axis, the Apache open source web services project at  Also, will show you a simple client and how to get started.
Also, have a look on that same page at the section on WSDL2Java.  This will generate classes and interfaces for you from the WSDL that you can then just invoke from your java client.  It handles all of the web services protocol under the covers so that you don't need to be concerned about it.

Your client just has to call a service locator to get a web service and then call a get method on that locator to get a port which points to a stub that you can call directly from your java client.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PraveenKumarGautamAuthor Commented:
For this we are using JaxWs and wsimport to generate and compile the code. So after compilation when we try to run it it gives this error.
What error?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.