2002/ws/desc/test-suite ant-tips-steve-loughran.txt,NONE,1.1 project.dtd,NONE,1.1 catalog.xml,1.2,1.3 build.xml,1.14,1.15

Update of /sources/public/2002/ws/desc/test-suite
In directory hutz:/tmp/cvs-serv2189/test-suite

Modified Files:
	catalog.xml build.xml 
Added Files:
	ant-tips-steve-loughran.txt project.dtd 
Log Message:
Updated Test Suite to use Ant 1.7 alpha <schemavalidate> task which allows us to remove schemaLocation information from the documents.

--- NEW FILE: ant-tips-steve-loughran.txt ---
Steve,

Thx for the tips. I'll try Ant 1.7.

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca


Steve Loughran <steve.loughran.soapbuilders@gmail.com> 
01/15/2006 04:19 PM	
To
Arthur Ryman/Toronto/IBM@IBMCA
cc

Subject
WSDL test suite build files
	

	


Hello,

I've just been looking at the build file for the WSDL2.0 test suite,
the one with your name at the top

(a) hard coding a path on an e: drive to the location of Xerces is
probably a bad thing. Ant always ships with Xerces anyway.

(b) if you build up Ant1.7 from CVS head (or grab a snapshot from
november at http://people.apache.org/~stevel/dist/ ) you will find a
task called <schemavalidate> that does XSD validation with location
setup that works properly with Xerces, even for bulk validations of
**/*.xsd, which ant1.6 can't do (because xerces forgets the settings
every parse). That is: you cannot rely on a bulk <xmlvalidate> with
Xerces on Ant1.6.

(c) even if you stick with ant1.6, you can use <presetdef> to define
the template you want, instead of repeating the same xmlvalidate call
so often,.

There is an example here
http://cvs.sourceforge.net/viewcvs.py/deployment/deployment/build.xml?rev=1.73&view=markup

including some declarations of validation templates

    <presetdef name="validate-xsd">
      <schemavalidate>
        <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>

    <presetdef name="validate-soap">
      <validate-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://schemas.xmlsoap.org/wsdl/soap/"
                file="${soap.dir}/wsdlsoap.xsd"/>
      </validate-xsd>
    </presetdef>


-steve

(ant and axis development team)


Index: catalog.xml
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/catalog.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** catalog.xml	3 Feb 2005 18:46:32 -0000	1.2
--- catalog.xml	19 Feb 2006 23:27:42 -0000	1.3
***************
*** 8,16 ****
  		uri="xmlcatalog/xsd/XMLSchema.dtd" />
  	<dtd publicId="datatypes" uri="xmlcatalog/xsd/datatypes.dtd" />
! 	<uri name="http://www.w3.org/2004/08/wsdl"
  		uri="xmlcatalog/wsdl/wsdl20.xsd" />
! 	<uri name="http://www.w3.org/2004/08/wsdl/rpc"
  		uri="xmlcatalog/wsdl/wsdl20-rpc.xsd" />
! 	<uri name="http://www.w3.org/2004/08/wsdl"
  		uri="xmlcatalog/wsdl/wsdl20-soap.xsd/soap" />
  	<uri name="http://www.w3.org/2001/XMLSchema"
--- 8,16 ----
  		uri="xmlcatalog/xsd/XMLSchema.dtd" />
  	<dtd publicId="datatypes" uri="xmlcatalog/xsd/datatypes.dtd" />
! 	<uri name="http://www.w3.org/2006/01/wsdl"
  		uri="xmlcatalog/wsdl/wsdl20.xsd" />
! 	<uri name="http://www.w3.org/2006/01/wsdl/rpc"
  		uri="xmlcatalog/wsdl/wsdl20-rpc.xsd" />
! 	<uri name="http://www.w3.org/2006/01/wsdl"
  		uri="xmlcatalog/wsdl/wsdl20-soap.xsd/soap" />
  	<uri name="http://www.w3.org/2001/XMLSchema"

Index: build.xml
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/build.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** build.xml	25 Jan 2006 18:32:47 -0000	1.14
--- build.xml	19 Feb 2006 23:27:42 -0000	1.15
***************
*** 7,15 ****
  	ChangeLog:
  	
  	2005-11-11 Arthur Ryman ryman@ca.ibm.com
  	- Added test coverage summary reports.
  
  	2005-11-09 Arthur Ryman ryman@ca.ibm.com
! 	- Upgrades to use 2005/08 versions of WSDL 2.0 schemas.
  
  	2005-04-30 Arthur Ryman ryman@ca.ibm.com
--- 7,21 ----
  	ChangeLog:
  	
+ 	2006-02-19 Arthur Ryman ryman@ca.ibm.com
+ 	- Upgraded to use 2006/01 versions of WSDL 2.0 schemas.
+ 	- Upgraded to use Ant 1.7 alpha as suggested by Steve Loughran <steve.loughran.soapbuilders@gmail.com> 
+ 	using code from http://people.apache.org/~stevel/dist/ which contains the new <schemavalidate> task.
+ 	Refer to ant-tips-steve-loughran.txt for details
+ 
  	2005-11-11 Arthur Ryman ryman@ca.ibm.com
  	- Added test coverage summary reports.
  
  	2005-11-09 Arthur Ryman ryman@ca.ibm.com
! 	- Upgraded to use 2005/08 versions of WSDL 2.0 schemas.
  
  	2005-04-30 Arthur Ryman ryman@ca.ibm.com
***************
*** 23,109 ****
  -->
  
! <project name="WSDL20" default="main" basedir=".">
! 
! 	<property name="xercesImpl.jar" location="E:\xerces-2_6_2\xercesImpl.jar" />
! 	<property name="schemaLocation" value="http://www.w3.org/2004/08/wsdl xmlcatalog/wsdl/wsdl20.xsd http://www.w3.org/2001/XMLSchema xmlcatalog/xsd/XMLSchema.xsd" />
! 
! 	<!--
! 		The above schemaLocation property is intended to be used with the Xerces parser so that XML files do not
! 		have to include an schemaLocation attribute. Unfortunately, there is a bug in the Xerces 2.6.2 that prevents
! 		the use of this property. I hope a future version of Xerces will fix this bug so that we can have simpler
! 		XML documents.
! 		
! 		<attribute name="http://apache.org/xml/properties/schema/external-schemaLocation" value="${schemaLocation}"/>
! 	
! 	-->
! 
! 	<xmlcatalog id="schemas">
! 		<dtd publicId="-//W3C//DTD XMLSCHEMA 200102//EN" location="xmlcatalog/xsd/XMLSchema.dtd" />
! 		<dtd publicId="datatypes" location="xmlcatalog/xsd/datatypes.dtd" />
! 		<entity publicId="http://www.w3.org/2004/08/wsdl" location="xmlcatalog/wsdl/wsdl20.xsd" />
! 		<entity publicId="http://www.w3.org/2001/XMLSchema" location="xmlcatalog/xsd/XMLSchema.xsd" />
! 	</xmlcatalog>
! 
! 	<xmlcatalog id="external">
! 		<catalogpath>
! 			<fileset file="catalog.xml" />
! 		</catalogpath>
! 	</xmlcatalog>
  
! 	<target name="main" depends="xsd-schema, wsdl-schema, good, bad" description="Validates all documents." />
  
! 	<target name="good" description="Validates good WSDL and XSD documents.">
! 		<xmlvalidate failonerror="yes" lenient="no" warn="yes" classname="org.apache.xerces.parsers.SAXParser" classpath="${xercesImpl.jar}">
! 			<fileset dir="documents/good" includes="**/*.wsdl, **/*.xsd, **/*.xml" />
! 			<xmlcatalog refid="schemas" />
! 			<attribute name="http://xml.org/sax/features/namespaces" value="true" />
! 			<attribute name="http://xml.org/sax/features/validation" value="true" />
! 			<attribute name="http://apache.org/xml/features/validation/schema" value="true" />
! 			<attribute name="http://apache.org/xml/features/validation/schema-full-checking" value="true" />
! 		</xmlvalidate>
! 	</target>
  
! 	<target name="goodxsd" description="Validates good XSD documents.">
! 		<xmlvalidate failonerror="yes" lenient="no" warn="yes" classname="org.apache.xerces.parsers.SAXParser" classpath="${xercesImpl.jar}">
! 			<fileset dir="documents/good" includes="**/*.xsd" />
! 			<xmlcatalog refid="schemas" />
! 			<attribute name="http://xml.org/sax/features/namespaces" value="true" />
! 			<attribute name="http://xml.org/sax/features/validation" value="true" />
! 			<attribute name="http://apache.org/xml/features/validation/schema" value="true" />
! 			<attribute name="http://apache.org/xml/features/validation/schema-full-checking" value="true" />
! 		</xmlvalidate>
  	</target>
  
! 	<target name="bad" description="Validates bad WSDL and XSD documents.">
! 		<xmlvalidate failonerror="yes" lenient="no" warn="yes" classname="org.apache.xerces.parsers.SAXParser" classpath="${xercesImpl.jar}">
! 			<fileset dir="documents/bad" includes="**/*.wsdl, **/*.xsd, **/*.xml" />
! 			<xmlcatalog refid="schemas" />
! 			<attribute name="http://xml.org/sax/features/namespaces" value="true" />
! 			<attribute name="http://xml.org/sax/features/validation" value="true" />
! 			<attribute name="http://apache.org/xml/features/validation/schema" value="true" />
! 			<attribute name="http://apache.org/xml/features/validation/schema-full-checking" value="true" />
! 		</xmlvalidate>
  	</target>
  
! 	<target name="wsdl-schema" description="Validates WSDL schemas.">
! 		<xmlvalidate failonerror="yes" lenient="no" warn="yes" classname="org.apache.xerces.parsers.SAXParser" classpath="${xercesImpl.jar}">
! 			<fileset dir="." includes="xmlcatalog/wsdl/*.xsd" />
! 			<xmlcatalog refid="schemas" />
! 			<attribute name="http://xml.org/sax/features/namespaces" value="true" />
! 			<attribute name="http://xml.org/sax/features/validation" value="true" />
! 			<attribute name="http://apache.org/xml/features/validation/schema" value="true" />
! 			<attribute name="http://apache.org/xml/features/validation/schema-full-checking" value="true" />
! 		</xmlvalidate>
! 	</target>
  
- 	<target name="xsd-schema" description="Validates XSD schema.">
- 		<xmlvalidate failonerror="yes" lenient="no" warn="yes" classname="org.apache.xerces.parsers.SAXParser" classpath="${xercesImpl.jar}">
- 			<fileset dir="." includes="xmlcatalog/xsd/*.xsd" />
- 			<xmlcatalog refid="schemas" />
- 			<attribute name="http://xml.org/sax/features/namespaces" value="true" />
- 			<attribute name="http://xml.org/sax/features/validation" value="true" />
- 			<attribute name="http://apache.org/xml/features/validation/schema" value="true" />
- 			<attribute name="http://apache.org/xml/features/validation/schema-full-checking" value="true" />
- 		</xmlvalidate>
  	</target>
  
--- 29,81 ----
  -->
  
! <project name="WSDL 2.0 Test Suite" default="main" basedir=".">
  
! 	<target name="main" depends="schemavalidate-wsdl, schemavalidate-xml, schemavalidate-xsd" description="Schema validates all documents." />
  
! 	<property name="xsd.dir" location="xmlcatalog/xsd" />
! 	<property name="wsdl.dir" location="xmlcatalog/wsdl" />
! 	<property name="catalog.dir" location="xmlcatalog/catalog" />
  
! 	<target name="schemavalidate-xml" description="Schema validates all *.xml files.">
! 		<schemavalidate>
! 			<schema namespace="http://www.w3.org/2006/02/wsdl/TestMetadata" file="${wsdl.dir}/TestMetadata.xsd" />
! 			<schema namespace="http://www.w3.org/2006/01/wsdl-instance" file="${wsdl.dir}/wsdl20-instance.xsd" />
! 			<schema namespace="urn:oasis:names:tc:entity:xmlns:xml:catalog" file="${catalog.dir}/catalog.xsd" />
! 			<fileset dir=".">
! 				<include name="documents/**/*.xml" />
! 				<include name="exchanges/**/*.xml" />
! 				<include name="messages/**/*.xml" />
! 			</fileset>
! 		</schemavalidate>
  	</target>
  
! 	<target name="schemavalidate-xsd" description="Schema validates all catalog, WSDL and test case *.xsd files.">
! 		<schemavalidate>
! 			<schema namespace="http://www.w3.org/2001/XMLSchema" file="${xsd.dir}/XMLSchema.xsd" />
! 			<schema namespace="http://www.w3.org/2006/01/wsdl-instance" file="${wsdl.dir}/wsdl20-instance.xsd" />
! 			<dtd publicId="-//W3C//DTD XMLSCHEMA 200102//EN" location="${xsd.dir}/XMLSchema.dtd" />
! 			<dtd publicId="http://www.w3.org/2001/datatypes.dtd" location="${xsd.dir}/datatypes.dtd" />
! 			<fileset dir=".">
! 				<include name="${catalog.dir}}/**/*.xsd" />
! 				<include name="${wsdl.dir}/**/*.xsd" />
! 				<include name="documents/**/*.xsd" />
! 				<include name="exchanges/**/*.xsd" />
! 				<include name="messages/**/*.xsd" />
! 			</fileset>
! 		</schemavalidate>
  	</target>
  
! 	<target name="schemavalidate-wsdl" description="Schema validates all test case *.wsdl files">
! 		<schemavalidate>
! 			<schema namespace="http://www.w3.org/2001/XMLSchema" file="${xsd.dir}/XMLSchema.xsd" />
! 			<schema namespace="http://www.w3.org/2006/01/wsdl" file="${wsdl.dir}/wsdl20.xsd" />
! 			<schema namespace="http://www.w3.org/2006/01/wsdl-instance" file="${wsdl.dir}/wsdl20-instance.xsd" />
! 			<fileset dir=".">
! 				<include name="documents/**/*.wsdl" />
! 				<include name="exchanges/**/*.wsdl" />
! 				<include name="messages/**/*.wsdl" />
! 			</fileset>
! 		</schemavalidate>
  
  	</target>
  
***************
*** 116,123 ****
  		<replace dir="documents" includes="**/*.*" token="tempuri.org" value="example.org" />
  	</target>
! 	
  	<target name="update-soap-ns" description="Updates the SOAP namespace.">
  		<replace dir="documents" includes="**/*.*" token="http://www.w3.org/2005/08/wsdl/soap12" value="http://www.w3.org/2005/08/wsdl/soap" />
! 	</target>	
  
  	<target name="coverage-test" description="Test case for generating coverage report for a WSDL document">
--- 88,95 ----
  		<replace dir="documents" includes="**/*.*" token="tempuri.org" value="example.org" />
  	</target>
! 
  	<target name="update-soap-ns" description="Updates the SOAP namespace.">
  		<replace dir="documents" includes="**/*.*" token="http://www.w3.org/2005/08/wsdl/soap12" value="http://www.w3.org/2005/08/wsdl/soap" />
! 	</target>
  
  	<target name="coverage-test" description="Test case for generating coverage report for a WSDL document">
***************
*** 148,150 ****
--- 120,126 ----
  	</target>
  
+ 	<target name="dtd" description="Generates a DTD for the defined Ant tasks.">
+ 		<antstructure output="project.dtd" />
+ 	</target>
+ 
  </project>
\ No newline at end of file

--- NEW FILE: project.dtd ---
<?xml version="1.0" encoding="UTF-8" ?>
<!ENTITY % boolean "(true|false|on|off|yes|no)">
<!ENTITY % tasks "propertyfile | ccmkdir | importtypelib | vsscheckin | sql | cvspass | p4reopen | csc | sshexec | dirname | p4label | p4revert | replaceregexp | get | jjtree | sleep | jarlib-display | length | dependset | zip | patch | jspc | style | nice | test | tstamp | unwar | vsshistory | cvschangelog | p4submit | ccmcheckin | scp | p4change | bzip2 | sync | p4delete | vssadd | javadoc | makeurl | p4integrate | translate | signjar | cclock | classloader | chown | jarlib-available | rexec | WsdlToDotnet | buildnumber | jpcovmerge | resourcecount | cvsversion | apt | ejbjar | war | copypath | rename | sequential | serverdeploy | property | subant | move | ildasm | copydir | schemavalidate | cccheckin | ccunlock | wljspc | fixcrlf | telnet | sosget | pathconvert | record | p4sync | exec | ccmklabel | p4edit | manifest | maudit | antlr | ftp | jpcovreport | execon | ccmcheckout | ant | xmlvalidate | xslt | p4resolve | iplanet-ejbc | ccmcheckintask | gzip | native2ascii | ccrmtype | ear | input | presetdef| rmic | checksum | mail | loadfile | vsscheckout | soscheckin | mimemail | gunzip | concat | cab | touch | parallel | splash | antcall | ccmkbl | cccheckout | typedef | p4have | filter | xmlproperty | import | jdepend | copy | jsharpc | symlink | antstructure | script | ccmcreatetask | rpm | delete | replace | mmetrics | attrib | verifyjar | waitfor | untar | loadproperties | available | echoproperties | junit | chgrp | bunzip2 | whichresource | copyfile | p4labelsync | vsscreate | macrodef | unjar | echoxml | vbc | wsdltodotnet | mkdir | cvs | condition | tempfile | junitreport | ccmkattr | taskdef | echo | ccupdate | java | renameext | vsslabel | basename | javadoc2 | tar | vsscp | p4fstat | setproxy | p4counter | diagnostics | ilasm | soscheckout | apply | jarlib-resolve | ccuncheckout | cvstagdiff | jlink | javacc | chmod | jarlib-manifest | pvcs | jar | ccmklbtype | sound | scriptdef | defaultexcludes | mparse | blgenclient | uptodate | jjdoc | genkey | javah | ccmkelem | ccmreconfigure | fail | unzip| javac | p4add | jpcoverage | soslabel | depend | vssget | deltree">
<!ENTITY % types "difference | isfileselected | mergemapper | extensionSet | url | scriptcondition | filterreader | selector | propertyset | dirset | chainedmapper | tarfileset | regexpmapper | zipentry | resources | scriptmapper | unpackagemapper | compositemapper | first | isreachable | string | propertyresource | flattenmapper | description | scriptfilter | concatfilter | scriptselector | xmlcatalog | extension | file | filtermapper | packagemapper | regexp | bzip2resource | filterchain | filterset | classfileset | files | patternset | intersect | mapper | union | resource | assertions | parsersupports | issigned | substitution | libfileset | zipfileset | xor | signedselector | tarentry | redirector | filelist | path | isfailure | fileset | restrict | globmapper | identitymapper | gzipresource | sort">

<!ELEMENT project (target | %tasks; | %types;)*>
<!ATTLIST project
          name    CDATA #IMPLIED
          default CDATA #IMPLIED
          basedir CDATA #IMPLIED>

<!ELEMENT target (%tasks; | %types;)*>

<!ATTLIST target
          id          ID    #IMPLIED
          name        CDATA #REQUIRED
          if          CDATA #IMPLIED
          unless      CDATA #IMPLIED
          depends     CDATA #IMPLIED
[...5630 lines suppressed...]
          vsspath CDATA #IMPLIED
          version CDATA #IMPLIED
          serverpath CDATA #IMPLIED
          login CDATA #IMPLIED
          filetimestamp (current | modified | updated) #IMPLIED
          writable %boolean; #IMPLIED
          taskname CDATA #IMPLIED
          label CDATA #IMPLIED
          description CDATA #IMPLIED
          failonerror %boolean; #IMPLIED
          localpath CDATA #IMPLIED
          writablefiles (replace | skip | fail) #IMPLIED>

<!ELEMENT deltree EMPTY>
<!ATTLIST deltree
          id ID #IMPLIED
          taskname CDATA #IMPLIED
          dir CDATA #IMPLIED
          description CDATA #IMPLIED>

Received on Sunday, 19 February 2006 23:28:21 UTC