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)
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.
No comments:
Post a Comment
Thank you for your feedback