You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Steve Loughran <st...@apache.org> on 2005/02/24 13:10:47 UTC

pointer to ant

A little feature I've added to ant (CVS_HEAD) this week may be of use to 
others: .<schemavalidate> It turns on XSD support in Xerces or JAXP 
parsers and so can be used to validate XSD files or docs described in it.

examples:


     <presetdef name="validate-wsdl">
       <schemavalidate >
         <schema 
namespace="http://schemas.xmlsoap.org/ws/2003/03/addressing"
           file="${ws-addressing.xsd}" />
         <schema namespace="http://www.w3.org/2003/05/soap-envelope"
           file="${soap12.xsd}" />
         <schema namespace="http://schemas.xmlsoap.org/wsdl/"
           file="${soap.dir}/wsdl.xsd" />
         <schema namespace="http://www.w3.org/2001/XMLSchema"
           file="${soap.dir}/XMLSchema.xsd" />
         <schema namespace="http://www.w3.org/XML/1998/namespace"
           file="${soap.dir}/xml.xsd" />
         <dtd publicId="http://www.w3.org/2001/datatypes.dtd"
           location="${soap.dir}/datatypes.dtd" />
         </schemavalidate>
     </presetdef>

using this in place

   <validate-wsdl file="myproject.wsdl" />

This of course only validates syntatic correctness, not semantics. But 
as it finds schema problems early on, you can track down problems more 
easily.

Have a play with you can, file defects now, before things get frozen in 
shipping code.

-steve