Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

WSDL Validator

Revision as of 13:44, 2 November 2006 by Lmandel.ca.ibm.com (Talk | contribs) (WSDL Validation Example 3)

Overview

The WSDL validator provides, as you should expect, the ability to validate WSDL documents (as of WTP 1.5.2, WSDL 1.1 documents). This validator differs from most other WTP validators in that at its core it does not depend on Eclipse or OSGI. The WSDL validator can be run outside of Eclipse (see Using the WSDL Validator Outside of Eclipse) and is also integrated with the WTP validation and URI resolution frameworks when used within Eclipse.

WSDL validation can be thought of as a three step process: 1. Check the WSDL document for XML well formedness. (That is, ensure all tags are properly nested and closed.) 2. Validate the WSDL document against its XML schema. 3. Validate the WSDL document using semantic rules defined in the WSDL specification. An optional fourth step is: 4. Validate the WSDL document against custom validation rules, such as those defined by the Web Services Interoperability (WS-I) organization.

The WSDL validator handles validation according to the 4 step process defined above. Steps 1 and 2 are both delegated to Apache Xerces (and XML parser). Step 3 is handled by the WSDL validator and any extension namespace validators (more on extensions below). Step 4 is handled by any declared custom validators (more on this below as well). Each step must pass in order for the next step to run. Here are a few examples:

WSDL Validation Example 1

The following WSDL document is validated:

 <definitions wsdl="http://schemas.xmlsoap.org/wsdl/"
            targetNamespace="http://www.eclipse.org/service/"
            xmlns:tns="http://www.example.org/service/">
   <message>
 </definitions>

In this case the WSDL validator will fail at step 1 because the document is not well formed. (The message element is not closed properly.) Xerces will produce an error, which the WSDL validator will output.

WSDL Validation Example 2

The following WSDL document is validated:

 <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
            targetNamespace="http://www.eclipse.org/service/"
            xmlns:tns="http://www.example.org/service/">
   <message>
   </message>
 </definitions>

In this case the WSDL validator will fail at step 2 because the document is not valid according to the WSDL schema. (The message element must have a name.) Xerces will produce an error, which the WSDL validator will output.

WSDL Validation Example 3

The following WSDL document is validated:

 <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
            targetNamespace="http://www.eclipse.org/service/"
            xmlns:tns="http://www.example.org/service/">
   <message name="message">
   </message>
   <portType name="portType">
     <operation name="operation">
       <input message="invalidmessage"/>
     </operation>
   </portType>
 </definitions>

In this case the WSDL validator will fail at step 3 because the document is not valid according to the WSDL semantic rules defined by the WSDL 1.1 specification. (The input refers to an invalid message.) Here the WSDL validator will produce and output an error from its internal logic.

Architecture

Extensions

Back to the top