khris khris - 2 years ago 160
Java Question

How do you convert wsdl to java classes using Eclipse?

I have wsdl (it's url), I need to convert it to java classes. I need to provide tests for web service.
I'm new to web services so could someone tell me how to convert wsdl to java.

I use eclipse JEE Kepler, so maybe where are some plugins to do it automatically?


Answer Source

In Eclipse Kepler it is very easy to generate Web Service Client classes,You can achieve this by following steps .

RightClick on any Project->Create New Other ->Web Services->Web Service Client->Then paste the wsdl url(or location) in Service Definition->Next->Finish

You will see the generated classes are inside your src folder.

NOTE :Without eclipse also you can generate client classes from wsdl file by using wsimport command utility which ships with JDK.

refer this link Create Web service client using wsdl

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download