How to validate a WSDL using Eclipse

When you create a wsdl file from scratch or use an already designed one, you must make sure it is valid. In other words it should;
  • consist of well-formed XML (All tags should be closed and nested properly)
  • conform to XML Schema
  • comply with the rules and standards defined in WSDL specification
  • valid with the rules defined by WS-I (Web services interoperability organization)
Eclipse Web tools project (WTP) provides a very useful tool which validates a wsdl against above rules/standards.
Lets see how we can validate an existing wsdl using Eclipse wtp.

1. Download and install Eclipse wtp

2. Open eclipse IDE

3. Start to create a new wsdl (File --> New --> other --> Web Services --> WSDL)

4. Give a name to the wsdl (you can provide the name of wsdl which needs to be validated) and click on next. Accept the default options and click on Finish.

5. You will see a design view of a new wsdl file. Move to source view by selecting "Source" tab.

6. You will see an skeleton source of the new wsdl. Just remove it. (remove all elements in the wsdl)

7. Copy the contents of your existing wsdl (Suppose it is Myservice.wsdl) and paste in the source tab.

8. Save it by selecting save button in eclipse tool bar.

9. Right click on the wsdl file and select Validate

If your wsdl has errors, those will be shown in problems pane.

You may notice that we create a new wsdl, remove its content and copy the existing (already created) wsdl in to source view of wsdl validator. I suggest that as a work around because I could not find a way to import an existing wsdl directly into wsdl validator.


Articulator said…
Hi Charitha,
when we generate WSDL using eclipse service archive plugin, where is WSDL file located.

I can see my wsdl file when I type

How can I search the wsdl file in the OS directory.
Charitha said…
It should be available at the META-INF directory of the generated service archive
Anonymous said…
God bless you!I really agree with your opinions.Also,there are some new fashion things here,gillette razor blades.gillette mach3 razor bladesfor men.As for ladies,gillette venus razor blades must the best gift for you in summer,gillette fusion blades are all the best choice for you.
Puma sport
polo shirts
polo shirts
gillette razor blades
Queen--ugg boots
original polo clothing
Anonymous said…
Come here to have a look of our Wholesale Jeans
Many fashionMens Jeans ,eye-catching
Womens Jeans ,and special out standing
Blue Jeans ,you can spend less money on our
Discount Jeans but gain really fine jeans, absolutely a great bargain.
China Wholesale
wholesale from china
buy products wholesale
China Wholesalers

No need to do all that create, copy, paste steps. I could import a wsdl as a file into my project and then validate

viji said…
I have two wsdl operations with same WSDL ouput message. I get an error message in eclipse :"The name 'adminModifyUserResponse' specified for this output element is not unique. The name of an output element must be unique from the
names of all other inputs and output elements defined in the 'PassportService' port type." How do I avoid or get rid of this message

Popular posts from this blog

Common mistakes to avoid in WSO2 ESB - 1 - "org.apache.axis2.AxisFault: The system cannot infer the transport information from the URL"

Working with HTTP multipart requests in soapUI

WS-Reliable messaging with WSO2 WSAS -1