WSDLValidate - Ant Task

Description

This task checks that WSDL files are valid.

This task supports the use of nested xmlcatalog elements and nested fileset elements.

Parameters

Attribute Description Required
file the file(s) you want to check. (optionally can use an embedded fileset) No
failonerror fails on a error if set to true (defaults to true). No
schemadir set the directory with the default required schemas - the xsd directory in org.eclipse.wsdl.validate (optionally can use an xmlcatalog to specify the schema locations) No

Nested Elements

dtd

<dtd> is used to specify different locations for DTD resolution.
Attribute Description Required
publicId Public ID of the DTD to resolve Yes
location Location of the DTD to use, which can be a file, a resource, or a URL Yes

entity

<entity> is used to specify different locations for entity resolution.

Attribute Description Required
publicId Public ID of the entity to resolve Yes
location Location of the entity to use, which can be a file, a resource, or a URL Yes

xmlcatalog

The xmlcatalog element is used to perform Entity resolution.

fileset

The fileset element is used to locate files to validate.

Examples

<wsdlvalidate file="sample1.wsdl" schemadir="xsd"/>

<wsdlvalidate failonerror="no" schemadir=".">
  <fileset dir="src" includes="*.wsdl"/>  
</wsdlvalidate>
    
<wsdlvalidate file="sample2.wsdl" schemadir="./xsd">
  <entity publicId="http://www.w3.org/2001/12/soap-encoding"
       location="soapencoding.xsd"/>
</wsdlvalidate>

<wsdlvalidate failonerror="no">
  <fileset dir="${project.dir}" includes="**/*.wsdl"/>
  <xmlcatalog refid="mycatalog"/>
</wsdlvalidate>

<wsdlvalidate failonerror="no">
  <fileset dir="${project.dir}" includes="**/*.wsdl"/>
  <xmlcatalog>
       <entity 
         publicId="http://schemas.xmlsoap.org/wsdl/"
         location="xsd/wsdl.xsd"/>
       <entity 
         publicId="http://schemas.xmlsoap.org/wsdl/http/"
         location="xsd/http.xsd"/>
       <entity 
         publicId="http://schemas.xmlsoap.org/wsdl/soap/"
         location="xsd/soap.xsd"/>
       <entity 
         publicId="http://schemas.xmlsoap.org/wsdl/mime/"
         location="xsd/wsdl-mime.xsd"/>
       <entity 
         publicId="http://www.w3.org/2001/12/soap-encoding"
         location="xsd/soapenc.xsd"/>
  </xmlcatalog>
</wsdlvalidate>

Copyright © 2003 eclipse. All rights Reserved.