You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by sa...@apache.org on 2009/09/01 07:54:21 UTC
svn commit: r809835 [11/11] - in /webservices/woden/trunk/java/woden-api: ./
src/ src/main/ src/main/java/ src/main/java/javax/ src/main/java/javax/xml/
src/main/java/javax/xml/namespace/ src/main/java/org/
src/main/java/org/apache/ src/main/java/org/a...
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/datatypes.dtd
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/datatypes.dtd?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/datatypes.dtd (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/datatypes.dtd Tue Sep 1 05:54:15 2009
@@ -0,0 +1,203 @@
+<!--
+ DTD for XML Schemas: Part 2: Datatypes
+ $Id: datatypes.dtd,v 1.23 2001/03/16 17:36:30 ht Exp $
+ Note this DTD is NOT normative, or even definitive. - - the
+ prose copy in the datatypes REC is the definitive version
+ (which shouldn't differ from this one except for this comment
+ and entity expansions, but just in case)
+ -->
+
+<!--
+ This DTD cannot be used on its own, it is intended
+ only for incorporation in XMLSchema.dtd, q.v.
+ -->
+
+<!-- Define all the element names, with optional prefix -->
+<!ENTITY % simpleType "%p;simpleType">
+<!ENTITY % restriction "%p;restriction">
+<!ENTITY % list "%p;list">
+<!ENTITY % union "%p;union">
+<!ENTITY % maxExclusive "%p;maxExclusive">
+<!ENTITY % minExclusive "%p;minExclusive">
+<!ENTITY % maxInclusive "%p;maxInclusive">
+<!ENTITY % minInclusive "%p;minInclusive">
+<!ENTITY % totalDigits "%p;totalDigits">
+<!ENTITY % fractionDigits "%p;fractionDigits">
+<!ENTITY % length "%p;length">
+<!ENTITY % minLength "%p;minLength">
+<!ENTITY % maxLength "%p;maxLength">
+<!ENTITY % enumeration "%p;enumeration">
+<!ENTITY % whiteSpace "%p;whiteSpace">
+<!ENTITY % pattern "%p;pattern">
+
+<!--
+ Customisation entities for the ATTLIST of each element
+ type. Define one of these if your schema takes advantage
+ of the anyAttribute='##other' in the schema for schemas
+ -->
+
+<!ENTITY % simpleTypeAttrs "">
+<!ENTITY % restrictionAttrs "">
+<!ENTITY % listAttrs "">
+<!ENTITY % unionAttrs "">
+<!ENTITY % maxExclusiveAttrs "">
+<!ENTITY % minExclusiveAttrs "">
+<!ENTITY % maxInclusiveAttrs "">
+<!ENTITY % minInclusiveAttrs "">
+<!ENTITY % totalDigitsAttrs "">
+<!ENTITY % fractionDigitsAttrs "">
+<!ENTITY % lengthAttrs "">
+<!ENTITY % minLengthAttrs "">
+<!ENTITY % maxLengthAttrs "">
+<!ENTITY % enumerationAttrs "">
+<!ENTITY % whiteSpaceAttrs "">
+<!ENTITY % patternAttrs "">
+
+<!-- Define some entities for informative use as attribute
+ types -->
+<!ENTITY % URIref "CDATA">
+<!ENTITY % XPathExpr "CDATA">
+<!ENTITY % QName "NMTOKEN">
+<!ENTITY % QNames "NMTOKENS">
+<!ENTITY % NCName "NMTOKEN">
+<!ENTITY % nonNegativeInteger "NMTOKEN">
+<!ENTITY % boolean "(true|false)">
+<!ENTITY % simpleDerivationSet "CDATA">
+<!--
+ #all or space-separated list drawn from derivationChoice
+ -->
+
+<!--
+ Note that the use of 'facet' below is less restrictive
+ than is really intended: There should in fact be no
+ more than one of each of minInclusive, minExclusive,
+ maxInclusive, maxExclusive, totalDigits, fractionDigits,
+ length, maxLength, minLength within datatype,
+ and the min- and max- variants of Inclusive and Exclusive
+ are mutually exclusive. On the other hand, pattern and
+ enumeration may repeat.
+ -->
+<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
+<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
+<!ENTITY % bounds "%minBound; | %maxBound;">
+<!ENTITY % numeric "%totalDigits; | %fractionDigits;">
+<!ENTITY % ordered "%bounds; | %numeric;">
+<!ENTITY % unordered
+ "%pattern; | %enumeration; | %whiteSpace; | %length; |
+ %maxLength; | %minLength;">
+<!ENTITY % facet "%ordered; | %unordered;">
+<!ENTITY % facetAttr
+ "value CDATA #REQUIRED
+ id ID #IMPLIED">
+<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
+<!ENTITY % facetModel "(%annotation;)?">
+<!ELEMENT %simpleType;
+ ((%annotation;)?, (%restriction; | %list; | %union;))>
+<!ATTLIST %simpleType;
+ name %NCName; #IMPLIED
+ final %simpleDerivationSet; #IMPLIED
+ id ID #IMPLIED
+ %simpleTypeAttrs;>
+<!-- name is required at top level -->
+<!ELEMENT %restriction; ((%annotation;)?,
+ (%restriction1; |
+ ((%simpleType;)?,(%facet;)*)),
+ (%attrDecls;))>
+<!ATTLIST %restriction;
+ base %QName; #IMPLIED
+ id ID #IMPLIED
+ %restrictionAttrs;>
+<!--
+ base and simpleType child are mutually exclusive,
+ one is required.
+
+ restriction is shared between simpleType and
+ simpleContent and complexContent (in XMLSchema.xsd).
+ restriction1 is for the latter cases, when this
+ is restricting a complex type, as is attrDecls.
+ -->
+<!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)>
+<!ATTLIST %list;
+ itemType %QName; #IMPLIED
+ id ID #IMPLIED
+ %listAttrs;>
+<!--
+ itemType and simpleType child are mutually exclusive,
+ one is required
+ -->
+<!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)>
+<!ATTLIST %union;
+ id ID #IMPLIED
+ memberTypes %QNames; #IMPLIED
+ %unionAttrs;>
+<!--
+ At least one item in memberTypes or one simpleType
+ child is required
+ -->
+
+<!ELEMENT %maxExclusive; %facetModel;>
+<!ATTLIST %maxExclusive;
+ %facetAttr;
+ %fixedAttr;
+ %maxExclusiveAttrs;>
+<!ELEMENT %minExclusive; %facetModel;>
+<!ATTLIST %minExclusive;
+ %facetAttr;
+ %fixedAttr;
+ %minExclusiveAttrs;>
+
+<!ELEMENT %maxInclusive; %facetModel;>
+<!ATTLIST %maxInclusive;
+ %facetAttr;
+ %fixedAttr;
+ %maxInclusiveAttrs;>
+<!ELEMENT %minInclusive; %facetModel;>
+<!ATTLIST %minInclusive;
+ %facetAttr;
+ %fixedAttr;
+ %minInclusiveAttrs;>
+
+<!ELEMENT %totalDigits; %facetModel;>
+<!ATTLIST %totalDigits;
+ %facetAttr;
+ %fixedAttr;
+ %totalDigitsAttrs;>
+<!ELEMENT %fractionDigits; %facetModel;>
+<!ATTLIST %fractionDigits;
+ %facetAttr;
+ %fixedAttr;
+ %fractionDigitsAttrs;>
+
+<!ELEMENT %length; %facetModel;>
+<!ATTLIST %length;
+ %facetAttr;
+ %fixedAttr;
+ %lengthAttrs;>
+<!ELEMENT %minLength; %facetModel;>
+<!ATTLIST %minLength;
+ %facetAttr;
+ %fixedAttr;
+ %minLengthAttrs;>
+<!ELEMENT %maxLength; %facetModel;>
+<!ATTLIST %maxLength;
+ %facetAttr;
+ %fixedAttr;
+ %maxLengthAttrs;>
+
+<!-- This one can be repeated -->
+<!ELEMENT %enumeration; %facetModel;>
+<!ATTLIST %enumeration;
+ %facetAttr;
+ %enumerationAttrs;>
+
+<!ELEMENT %whiteSpace; %facetModel;>
+<!ATTLIST %whiteSpace;
+ %facetAttr;
+ %fixedAttr;
+ %whiteSpaceAttrs;>
+
+<!-- This one can be repeated -->
+<!ELEMENT %pattern; %facetModel;>
+<!ATTLIST %pattern;
+ %facetAttr;
+ %patternAttrs;>
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-extensions.xsd
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-extensions.xsd?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-extensions.xsd (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-extensions.xsd Tue Sep 1 05:54:15 2009
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--
+ W3C XML Schema defined in the Web Services Description (WSDL)
+ Version 2.0 specifications
+ http://www.w3.org/TR/wsdl20
+ http://www.w3.org/TR/wsdl20-adjuncts
+
+ Copyright © 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C® Software License [1] in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: wsdl20-extensions.xsd,v 1.1 2007/03/14 19:45:33 plehegar Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions" targetNamespace="http://www.w3.org/ns/wsdl-extensions" attributeFormDefault="qualified" elementFormDefault="qualified" finalDefault="" blockDefault="">
+
+ <xs:attribute name="safe" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ This attribute may be used to annotate an
+ interface operation to indicate that it
+ provides a safe interaction.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="interface" type="xs:QName">
+ <xs:annotation>
+ <xs:documentation>
+ This attribute may be used to annotate element or
+ attribute definitions to indicate that the content refers
+ to Web service that implements the specified interface.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="binding" type="xs:QName">
+ <xs:annotation>
+ <xs:documentation>
+ This attribute may be used to annotate element or
+ attribute definitions to indicate that the content refers
+ to Web service that implements the specified binding.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+</xs:schema>
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-http.xsd
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-http.xsd?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-http.xsd (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-http.xsd Tue Sep 1 05:54:15 2009
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--
+ W3C XML Schema defined in the Web Services Description (WSDL)
+ Version 2.0 Part 2: Adjuncts specification
+ http://www.w3.org/TR/wsdl20-adjuncts
+
+ Copyright © 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C® Software License [1] in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: http.xsd,v 1.1 2007/03/14 19:59:24 plehegar Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://www.w3.org/ns/wsdl" xmlns:whttp="http://www.w3.org/ns/wsdl/http" targetNamespace="http://www.w3.org/ns/wsdl/http" elementFormDefault="qualified" attributeFormDefault="unqualified" finalDefault="" blockDefault="">
+
+ <xs:import namespace="http://www.w3.org/ns/wsdl" schemaLocation="wsdl20.xsd"/>
+
+ <xs:attribute name="methodDefault" type="xs:string"/>
+ <xs:attribute name="method" type="xs:string"/>
+
+ <xs:attribute name="version" type="whttp:versionType"/>
+
+ <xs:attribute name="location" type="xs:anyURI"/>
+
+ <xs:attribute name="code">
+ <xs:simpleType>
+ <xs:union memberTypes="xs:int">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#any"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="inputSerialization" type="xs:string"/>
+ <xs:attribute name="outputSerialization" type="xs:string"/>
+ <xs:attribute name="faultSerialization" type="xs:string"/>
+
+ <xs:attribute name="ignoreUncited" type="xs:boolean"/>
+
+ <xs:simpleType name="queryParameterType">
+ <xs:restriction base="xs:string">
+ <xs:length value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:attribute name="queryParameterSeparatorDefault" type="whttp:queryParameterType"/>
+ <xs:attribute name="queryParameterSeparator" type="whttp:queryParameterType"/>
+
+ <xs:attribute name="defaultTransferCoding" type="xs:string"/>
+ <xs:attribute name="transferCoding" type="xs:string"/>
+
+ <xs:attribute name="cookies" type="xs:boolean"/>
+
+ <xs:attribute name="authenticationScheme">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="basic"/>
+ <xs:enumeration value="digest"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="authenticationRealm" type="xs:string"/>
+
+ <xs:simpleType name="versionType">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[0-9]+\.[0-9]+"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="httpTokenType">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[!#-'*+\-.0-9A-Z^-z|~]+"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="header">
+ <xs:complexType mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:attribute name="name" type="whttp:httpTokenType" use="required"/>
+ <xs:attribute name="type" type="xs:QName" use="required"/>
+ <xs:attribute name="required" type="xs:boolean"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-instance.xsd
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-instance.xsd?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-instance.xsd (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-instance.xsd Tue Sep 1 05:54:15 2009
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--
+ W3C XML Schema defined in the Web Services Description (WSDL)
+ Version 2.0 specification
+ http://www.w3.org/TR/wsdl20
+
+ Copyright © 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C® Software License [1] in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: wsdl20-instance.xsd,v 1.1 2007/03/14 19:45:33 plehegar Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdli="http://www.w3.org/ns/wsdl-instance" targetNamespace="http://www.w3.org/ns/wsdl-instance" elementFormDefault="qualified" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
+
+ <xs:attribute name="wsdlLocation">
+ <xs:annotation>
+ <xs:documentation>
+ This attribute can be used to provide some hints on where
+ additional WSDL information for a given namespace can be
+ found in order to help with QName resolution
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:list itemType="xs:anyURI"/>
+ </xs:simpleType>
+ </xs:attribute>
+
+</xs:schema>
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-rpc.xsd
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-rpc.xsd?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-rpc.xsd (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-rpc.xsd Tue Sep 1 05:54:15 2009
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--
+ W3C XML Schema defined in the Web Services Description (WSDL)
+ Version 2.0 Adjuncts specification
+ http://www.w3.org/TR/wsdl20-adjuncts
+
+ Copyright © 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C® Software License [1] in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: rpc.xsd,v 1.1 2007/03/14 19:59:24 plehegar Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wrpc="http://www.w3.org/ns/wsdl/rpc" targetNamespace="http://www.w3.org/ns/wsdl/rpc" elementFormDefault="qualified" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
+
+ <xs:attribute name="signature" type="wrpc:signatureType">
+ <xs:annotation>
+ <xs:documentation>
+ This attribute can be used as an extension to describe
+ the RPC signature associated with an operation that uses
+ the RPC style.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:simpleType name="signatureType">
+ <xs:list itemType="wrpc:signatureItemType"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="signatureItemType">
+ <xs:union memberTypes="xs:QName wrpc:directionToken"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="directionToken">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#in"/>
+ <xs:enumeration value="#out"/>
+ <xs:enumeration value="#inout"/>
+ <xs:enumeration value="#return"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-soap.xsd
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-soap.xsd?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-soap.xsd (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20-soap.xsd Tue Sep 1 05:54:15 2009
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--
+ W3C XML Schema defined in the Web Services Description Language
+ (WSDL) Version 2.0 Part 2: Adjuncts specification
+ http://www.w3.org/TR/wsdl20-adjuncts
+
+ Copyright © 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C® Software License [1] in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: soap.xsd,v 1.1 2007/03/14 19:59:24 plehegar Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsoap="http://www.w3.org/ns/wsdl/soap" xmlns:wsdl="http://www.w3.org/ns/wsdl" targetNamespace="http://www.w3.org/ns/wsdl/soap" elementFormDefault="qualified" attributeFormDefault="unqualified" finalDefault="" blockDefault="">
+
+ <xs:import namespace="http://www.w3.org/ns/wsdl" schemaLocation="wsdl20.xsd"/>
+
+ <xs:attribute name="version" type="xs:string"/>
+ <xs:attribute name="protocol" type="xs:anyURI"/>
+
+ <xs:attribute name="mepDefault" type="xs:anyURI"/>
+ <xs:attribute name="mep" type="xs:anyURI"/>
+
+ <xs:attribute name="action" type="xs:anyURI"/>
+
+ <xs:element name="module">
+ <xs:complexType mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:attribute name="ref" type="xs:anyURI" use="required"/>
+ <xs:attribute name="required" type="xs:boolean"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="header">
+ <xs:complexType mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:attribute name="element" type="xs:QName" use="required"/>
+ <xs:attribute name="mustUnderstand" type="xs:boolean"/>
+ <xs:attribute name="required" type="xs:boolean"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="TokenAny">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#any"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:attribute name="code">
+ <xs:simpleType>
+ <xs:union memberTypes="xs:QName wsoap:TokenAny"/>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="subcodes">
+ <xs:simpleType>
+ <xs:union memberTypes="wsoap:TokenAny">
+ <xs:simpleType>
+ <xs:list itemType="xs:QName"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+</xs:schema>
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20.xsd
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20.xsd?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20.xsd (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/wsdl20.xsd Tue Sep 1 05:54:15 2009
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--
+ W3C XML Schema defined in the Web Services Description (WSDL)
+ Version 2.0 specification
+ http://www.w3.org/TR/wsdl20
+
+ Copyright © 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C® Software License [1] in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: wsdl20.xsd,v 1.1 2007/03/14 19:45:33 plehegar Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://www.w3.org/ns/wsdl" targetNamespace="http://www.w3.org/ns/wsdl" elementFormDefault="qualified" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
+
+ <xs:element name="documentation" type="wsdl:DocumentationType"/>
+ <xs:complexType name="DocumentationType" mixed="true">
+ <xs:sequence>
+ <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="DocumentedType" mixed="false">
+ <xs:annotation>
+ <xs:documentation>
+ This type is extended by component types to allow them to be documented.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="wsdl:documentation" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ExtensibleDocumentedType" abstract="true" mixed="false">
+ <xs:annotation>
+ <xs:documentation>
+ This type is extended by component types to allow
+ attributes from other namespaces to be added.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="wsdl:DocumentedType">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- description element decl and type def -->
+ <xs:element name="description" type="wsdl:DescriptionType">
+ <xs:unique name="interface">
+ <xs:selector xpath="wsdl:interface"/>
+ <xs:field xpath="@name"/>
+ </xs:unique>
+ <xs:unique name="binding">
+ <xs:selector xpath="wsdl:binding"/>
+ <xs:field xpath="@name"/>
+ </xs:unique>
+ <xs:unique name="service">
+ <xs:selector xpath="wsdl:service"/>
+ <xs:field xpath="@name"/>
+ </xs:unique>
+ </xs:element>
+
+ <xs:complexType name="DescriptionType" mixed="false">
+ <xs:annotation>
+ <xs:documentation>
+ Although correct, this type declaration does not capture
+ all the constraints on the contents of the wsdl:description
+ element as defined by the WSDL 2.0 specification.
+
+ In particular, the ordering constraints wrt elements preceding
+ and following the wsdl:types child element are not captured, as
+ attempts to incorporate such restrictions in the schema
+ ran afoul of the UPA (Unique Particle Attribution) rule
+ in the XML Schema language.
+
+ Please refer to the WSDL 2.0 specification for
+ additional information on the contents of this type.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="wsdl:import"/>
+ <xs:element ref="wsdl:include"/>
+ <xs:element ref="wsdl:types"/>
+ <xs:element ref="wsdl:interface"/>
+ <xs:element ref="wsdl:binding"/>
+ <xs:element ref="wsdl:service"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="targetNamespace" type="xs:anyURI" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- types for import and include elements -->
+ <xs:element name="import" type="wsdl:ImportType"/>
+ <xs:complexType name="ImportType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:sequence>
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="strict"/>
+ </xs:sequence>
+ <xs:attribute name="namespace" type="xs:anyURI" use="required"/>
+ <xs:attribute name="location" type="xs:anyURI" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="include" type="wsdl:IncludeType"/>
+ <xs:complexType name="IncludeType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:sequence>
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="strict"/>
+ </xs:sequence>
+ <xs:attribute name="location" type="xs:anyURI" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="types" type="wsdl:TypesType"/>
+ <xs:complexType name="TypesType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:sequence>
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="strict"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- parts related to wsdl:interface -->
+ <xs:element name="interface" type="wsdl:InterfaceType">
+ <xs:unique name="operation">
+ <xs:selector xpath="wsdl:operation"/>
+ <xs:field xpath="@name"/>
+ </xs:unique>
+ <xs:unique name="fault">
+ <xs:selector xpath="wsdl:fault"/>
+ <xs:field xpath="@name"/>
+ </xs:unique>
+ </xs:element>
+ <xs:complexType name="InterfaceType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="operation" type="wsdl:InterfaceOperationType"/>
+ <xs:element name="fault" type="wsdl:InterfaceFaultType"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:attribute name="extends" use="optional">
+ <xs:simpleType>
+ <xs:list itemType="xs:QName"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="styleDefault" use="optional">
+ <xs:simpleType>
+ <xs:list itemType="xs:anyURI"/>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="InterfaceOperationType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="input" type="wsdl:MessageRefType"/>
+ <xs:element name="output" type="wsdl:MessageRefType"/>
+ <xs:element name="infault" type="wsdl:MessageRefFaultType"/>
+ <xs:element name="outfault" type="wsdl:MessageRefFaultType"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:attribute name="pattern" type="xs:anyURI" use="optional"/>
+ <xs:attribute name="safe" type="xs:boolean" use="optional"/>
+ <xs:attribute name="style" type="xs:anyURI" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="MessageRefType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="messageLabel" type="xs:NCName" use="optional"/>
+ <xs:attribute name="element" type="wsdl:ElementReferenceType" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:simpleType name="ElementReferenceType">
+ <xs:annotation>
+ <xs:documentation>
+ Use the QName of a GED that describes the content,
+ #any for any content,
+ #none for empty content, or
+ #other for content described by some other extension attribute that references a declaration in a non-XML extension type system.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xs:QName">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#any"/>
+ <xs:enumeration value="#none"/>
+ <xs:enumeration value="#other"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+
+ <xs:complexType name="MessageRefFaultType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="ref" type="xs:QName" use="required"/>
+ <xs:attribute name="messageLabel" type="xs:NCName" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="InterfaceFaultType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:attribute name="element" type="xs:QName" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- types related to wsdl:binding -->
+ <xs:element name="binding" type="wsdl:BindingType"/>
+ <xs:complexType name="BindingType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="operation" type="wsdl:BindingOperationType"/>
+ <xs:element name="fault" type="wsdl:BindingFaultType"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:attribute name="type" type="xs:anyURI" use="required"/>
+ <xs:attribute name="interface" type="xs:QName" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="BindingOperationType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="input" type="wsdl:BindingOperationMessageType"/>
+ <xs:element name="output" type="wsdl:BindingOperationMessageType"/>
+ <xs:element name="infault" type="wsdl:BindingOperationFaultType"/>
+ <xs:element name="outfault" type="wsdl:BindingOperationFaultType"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="ref" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="BindingOperationMessageType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="messageLabel" type="xs:NCName" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="BindingOperationFaultType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="ref" type="xs:QName" use="required"/>
+ <xs:attribute name="messageLabel" type="xs:NCName" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="BindingFaultType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="ref" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- types related to service -->
+ <xs:element name="service" type="wsdl:ServiceType">
+ <xs:unique name="endpoint">
+ <xs:selector xpath="wsdl:endpoint"/>
+ <xs:field xpath="@name"/>
+ </xs:unique>
+ </xs:element>
+ <xs:complexType name="ServiceType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="1" maxOccurs="unbounded">
+ <xs:element ref="wsdl:endpoint"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:attribute name="interface" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="endpoint" type="wsdl:EndpointType"/>
+ <xs:complexType name="EndpointType" mixed="false">
+ <xs:complexContent>
+ <xs:extension base="wsdl:ExtensibleDocumentedType">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:attribute name="binding" type="xs:QName" use="required"/>
+ <xs:attribute name="address" type="xs:anyURI" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:attribute name="required" type="xs:boolean"/>
+
+ <xs:complexType name="ExtensionElement" abstract="true" mixed="false">
+ <xs:annotation>
+ <xs:documentation>
+ This abstract type is intended to serve as the base type for
+ extension elements. It includes the wsdl:required attribute
+ which it is anticipated will be used by most extension elements
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute ref="wsdl:required" use="optional"/>
+ </xs:complexType>
+
+</xs:schema>
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/xml.xsd
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/xml.xsd?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/xml.xsd (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/resolver/xml.xsd Tue Sep 1 05:54:15 2009
@@ -0,0 +1,146 @@
+<?xml version='1.0'?>
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+
+ Note that local names in this namespace are intended to be defined
+ only by the World Wide Web Consortium or its subgroups. The
+ following names are currently defined in this namespace and should
+ not be used with conflicting semantics by any Working Group,
+ specification, or document instance:
+
+ base (as an attribute name): denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.
+
+ id (as an attribute name): denotes an attribute whose value
+ should be interpreted as if declared to be of type ID.
+ The xml:id specification is not yet a W3C Recommendation,
+ but this attribute is included here to facilitate experimentation
+ with the mechanisms it proposes. Note that it is _not_ included
+ in the specialAttrs attribute group.
+
+ lang (as an attribute name): denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.
+
+ space (as an attribute name): denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.
+
+ Father (in any context at all): denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+
+ In appreciation for his vision, leadership and dedication
+ the W3C XML Plenary on this 10th day of February, 2000
+ reserves for Jon Bosak in perpetuity the XML name
+ xml:Father
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
+ attributes on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ <schema . . .>
+ . . .
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ <type . . .>
+ . . .
+ <attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2005/08/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself, or with the XML namespace itself. In other words, if the XML
+ Schema or XML namespaces change, the version of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2005/08/xml.xsd will not change.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang">
+ <xs:annotation>
+ <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values is probably never
+ going to be a realistic possibility. See
+ RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
+ at http://www.iana.org/assignments/lang-tag-apps.htm for
+ further information.
+
+ The union allows for the 'un-declaration' of xml:lang with
+ the empty string.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:language">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value=""/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="space">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="id" type="xs:ID">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xml-id/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ </xs:attributeGroup>
+
+</xs:schema>
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/about-this-package
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/about-this-package?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/about-this-package (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/about-this-package Tue Sep 1 05:54:15 2009
@@ -0,0 +1,3 @@
+This package contains the portion of the Woden API that is
+specific to the WSDL 2.0 component model - i.e. the Java
+interfaces that represent the WSDL 2.0 components.
\ No newline at end of file
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/extensions/about-this-package
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/extensions/about-this-package?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/extensions/about-this-package (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/extensions/about-this-package Tue Sep 1 05:54:15 2009
@@ -0,0 +1,2 @@
+API for handling extensibility defined in the WSDL 2.0 specs
+(e.g. soap, http, MEPs, type system extensibility).
\ No newline at end of file
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/fragids/about-this-package
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/fragids/about-this-package?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/fragids/about-this-package (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/fragids/about-this-package Tue Sep 1 05:54:15 2009
@@ -0,0 +1,12 @@
+This package implements the Fragment Identifiers for WSDL 2.0 components as defined
+by Appendix A.2 of the W3C WSDL 2.0 Part 1: Core Language specification. See:
+
+ http://www.w3.org/TR/wsdl20/#frag-ids
+
+The package contains classes that:
+
+ - model the fragment identifiers for each WSDL 2.0 component
+ - generate fragment identifiers from abstract components
+ - find abstract components in a component model instance given their fragment identifiers
+ - parse URLs into fragment identifiers
+ - serialize fragment identifiers as URLs
\ No newline at end of file
Added: webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/xml/about-this-package
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/xml/about-this-package?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/xml/about-this-package (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/org/apache/woden/wsdl20/xml/about-this-package Tue Sep 1 05:54:15 2009
@@ -0,0 +1,9 @@
+XML-related API to support the WSDL 2.0 component model.
+i.e. the WSDL 2.0 API needed by tooling and editors that
+must manipulate the WSDL XML (where the abstract component
+model is not sufficient).
+
+This package is used only for those XML elements that are
+in the WSDL 2.0 namespace. It includes the WSDL20Element
+interface which all other interfaces in this package must
+extend (i.e. so they share a common type).
\ No newline at end of file
Added: webservices/woden/trunk/java/woden-api/src/main/resources/schema.catalog
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/main/resources/schema.catalog?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/main/resources/schema.catalog (added)
+++ webservices/woden/trunk/java/woden-api/src/main/resources/schema.catalog Tue Sep 1 05:54:15 2009
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# {referenced URI}={actual location}
+#
+# standard schema resolutions for XML Schema:
+http\://www.w3.org/2001/XMLSchema.xsd=org/apache/woden/resolver/XMLSchema.xsd
+http\://www.w3.org/2000/08/XMLSchema.xsd=org/apache/woden/resolver/XMLSchema.xsd
+http\://www.w3.org/2001/XMLSchema.dtd=org/apache/woden/resolver/XMLSchema.dtd
+http\://www.w3.org/2001/xml.xsd=org/apache/woden/resolver/xml.xsd
+#
+# standard schema resolutions for wsdl20:
+http\://www.w3.org/2007/03/wsdl/wsdl20.xsd=org/apache/woden/resolver/wsdl20.xsd
+http\://www.w3.org/2007/03/wsdl/wsdl20-extensions.xsd=org/apache/woden/resolver/wsdl20-extensions.xsd
+http\://www.w3.org/2007/03/wsdl/http.xsd=org/apache/woden/resolver/wsdl20-http.xsd
+http\://www.w3.org/2007/03/wsdl/wsdl20-instance.xsd=org/apache/woden/resolver/wsdl20-instance.xsd
+http\://www.w3.org/2007/03/wsdl/rpc.xsd=org/apache/woden/resolver/wsdl20-rpc.xsd
+http\://www.w3.org/2007/03/wsdl/soap.xsd=org/apache/woden/resolver/wsdl20-soap.xsd
Added: webservices/woden/trunk/java/woden-api/src/test/java/javax/xml/namespace/QNameDeserializeTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/test/java/javax/xml/namespace/QNameDeserializeTest.java?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/test/java/javax/xml/namespace/QNameDeserializeTest.java (added)
+++ webservices/woden/trunk/java/woden-api/src/test/java/javax/xml/namespace/QNameDeserializeTest.java Tue Sep 1 05:54:15 2009
@@ -0,0 +1,69 @@
+package javax.xml.namespace;
+
+/**
+ * Licensed to the apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+// * junit test for deserializing with the QName class.
+ *
+ * @author jkaputin@apache.org
+ */
+public class QNameDeserializeTest extends TestCase {
+
+ private static final String emptyString = "";
+ private QName qname;
+
+ public static Test suite()
+ {
+ return new TestSuite(QNameDeserializeTest.class);
+ }
+
+ public void testGoodDeserializeQNameWithoutPrefix() throws IOException,
+ ClassNotFoundException, Exception
+ {
+ /*
+ * Test that 'prefix' is initialized correctly when deserializing a v1.0 QName.
+ * The v1.0 QName does not have a 'prefix' field, so when it's deserialized using
+ * the v1.1 QName, its 'prefix' field should be set to the empty string "", not
+ * just initialized as null.
+ *
+ * The input to this testcase is a file containing a v1.0 QName serialized
+ * from the WSDL4J version of QName.
+ */
+
+ URL url = getClass().getClassLoader().getResource("javax/xml/namespace/serialized_QName_no_prefix");
+
+ ObjectInputStream ois =
+ new ObjectInputStream(url.openStream());
+
+ Object o = ois.readObject();
+ qname = (QName)o;
+
+ assertTrue("Expected a null 'prefix' to be initialized to the empty string \"\".",
+ qname.getPrefix() != null && qname.getPrefix().equals(emptyString));
+
+ }
+}
Added: webservices/woden/trunk/java/woden-api/src/test/java/javax/xml/namespace/QNameTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/test/java/javax/xml/namespace/QNameTest.java?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/test/java/javax/xml/namespace/QNameTest.java (added)
+++ webservices/woden/trunk/java/woden-api/src/test/java/javax/xml/namespace/QNameTest.java Tue Sep 1 05:54:15 2009
@@ -0,0 +1,518 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.xml.namespace;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.URI;
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * junit tests for the QName class.
+ *
+ * @author jkaputin@apache.org
+ */
+public class QNameTest extends TestCase {
+
+ private static final String emptyString = "";
+ private QName qname;
+
+
+ public static Test suite()
+ {
+ return new TestSuite(QNameTest.class);
+ }
+
+ /* ************************************************
+ * Tests for ctor QName(locPart)
+ * ************************************************/
+
+ public void testOneArgCtorGoodLocalPart()
+ {
+ qname = new QName("myLocalPart");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals("myLocalPart") &&
+ qname.getPrefix().equals(emptyString))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testOneArgCtorGoodLocalPartEmptyString()
+ {
+ qname = new QName("");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals(emptyString) &&
+ qname.getPrefix().equals(emptyString))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testOneArgCtorBadLocalPartNull()
+ {
+ boolean b = false;
+
+ try {
+ qname = new QName(null);
+ } catch (IllegalArgumentException e) {
+ b = true;
+ }
+
+ assertTrue("Expected an IllegalArgumentException because of null localPart.", b);
+ }
+
+ /* ************************************************
+ * Tests for ctor QName(NS, locPart)
+ * ************************************************/
+
+ public void testTwoArgCtorGoodNonEmptyStrings()
+ {
+ qname = new QName("myNamespace", "myLocalPart");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals("myNamespace") &&
+ qname.getLocalPart().equals("myLocalPart") &&
+ qname.getPrefix().equals(emptyString))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testTwoArgCtorGoodEmptyStrings()
+ {
+ qname = new QName("", "");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals(emptyString) &&
+ qname.getPrefix().equals(emptyString))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testTwoArgCtorGoodNullNamespaceURI()
+ {
+ qname = new QName(null, "myLocalPart");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals("myLocalPart") &&
+ qname.getPrefix().equals(emptyString))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testTwoArgCtorBadNullLocalPart()
+ {
+ boolean b = false;
+
+ try {
+ qname = new QName("myNamespace", null);
+ } catch (IllegalArgumentException e) {
+ b = true;
+ }
+
+ assertTrue("Expected an IllegalArgumentException because of null localPart.", b);
+ }
+
+ /* ************************************************
+ * Tests for ctor QName(NS, locPart, prefix)
+ * ************************************************/
+
+ public void testThreeArgCtorGoodNonEmptyStrings()
+ {
+ qname = new QName("myNamespace", "myLocalPart", "myPrefix");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals("myNamespace") &&
+ qname.getLocalPart().equals("myLocalPart") &&
+ qname.getPrefix().equals("myPrefix"))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testThreeArgCtorGoodEmptyStrings()
+ {
+ qname = new QName("", "", "");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals(emptyString) &&
+ qname.getPrefix().equals(emptyString))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testThreeArgCtorGoodNullNamespaceURI()
+ {
+ qname = new QName(null, "myLocalPart", "myPrefix");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals("myLocalPart") &&
+ qname.getPrefix().equals("myPrefix"))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testThreeArgCtorBadNullLocalPart()
+ {
+ boolean b = false;
+
+ try {
+ qname = new QName("myNamespace", null, "myPrefix");
+ } catch (IllegalArgumentException e) {
+ b = true;
+ }
+
+ assertTrue("Expected an IllegalArgumentException because of null localPart.", b);
+ }
+
+ public void testThreeArgCtorBadNullPrefix()
+ {
+ boolean b = false;
+
+ try {
+ qname = new QName("myNamespace", "myLocalPart", null);
+ } catch (IllegalArgumentException e) {
+ b = true;
+ }
+
+ assertTrue("Expected an IllegalArgumentException because of null prefix.", b);
+ }
+
+ /* ************************************************
+ * Tests for valueOf(String) method
+ * ************************************************/
+
+ public void testValueOfGoodNamespaceAndLocalPart()
+ {
+ qname = QName.valueOf("{myNamespace}myLocalPart");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals("myNamespace") &&
+ qname.getLocalPart().equals("myLocalPart") &&
+ qname.getPrefix().equals(emptyString))
+ );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+
+ assertEquals("Input string literal must match the output of toString()",
+ "{myNamespace}myLocalPart",
+ qname.toString() );
+ }
+
+ public void testValueOfGoodLocalPartOnly()
+ {
+ qname = QName.valueOf("myLocalPart");
+
+ if(qname != null)
+ {
+ assertTrue("QName was not initialized correctly",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals("myLocalPart") &&
+ qname.getPrefix().equals(emptyString))
+ );
+
+ assertEquals("Input string literal must match the output of toString()",
+ "myLocalPart",
+ qname.toString() );
+ }
+ else
+ {
+ fail("QName was not instantiated.");
+ }
+ }
+
+ public void testValueOfBadNullString()
+ {
+ boolean b = false;
+
+ try {
+ qname = QName.valueOf(null);
+ } catch (IllegalArgumentException e) {
+ b = true;
+ }
+
+ assertTrue("Expected an IllegalArgumentException because the string literal cannot be null.",
+ b);
+ }
+
+ public void testValueOfBadUnmatchedLeftBrace()
+ {
+ try {
+ qname = QName.valueOf("{myNamespacemyLocalPart");
+ } catch (IllegalArgumentException e) {
+ return;
+ }
+ fail("Expected an IllegalArgumentException because the starting left brace is not matched by a right brace: " + "\"{myNamespacemyLocalPart\"");
+ }
+
+ /* TODO these tests commented out for now (M7), because different QName impls get loaded depending on the
+ * environment (e.g. Ant 1.7.0, Java 5.0) and as they all differ slightly, some of these testcases which
+ * pass for the Woden QName class will fail for other QName implementations. Will need to either
+ * use a classloader to ensure that the Woden QName class is always used for these testcases or maybe
+ * just delete these testcases and keep the minimal testcases above for the valueOf() method.
+ * Note, it only seems to be the testcases for the valueOf() method that are affected.
+ *
+ public void testValueOfBadNoLocalpart()
+ {
+ try {
+ qname = QName.valueOf("{myNamespace}");
+ } catch (IllegalArgumentException e) {
+ return;
+ }
+ fail("Expected an IllegalArgumentException because there is no local part: " + "\"{myNamespace}\"");
+ }
+
+ public void testValueOfGoodLeftBraceNotLeftmost()
+ {
+ //this is junk, but it is permitted according to the QName Javadoc
+ try {
+ qname = QName.valueOf("x{myNamespace}myLocalPart");
+ } catch (IllegalArgumentException e) {
+ fail("The QName literal is not illegal: " + "\"x{myNamespace}myLocalPart\"");
+ }
+
+ assertTrue("QName created from string literal is incorrect.",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals("x{myNamespace}myLocalPart") &&
+ qname.getPrefix().equals(emptyString)) );
+
+ assertEquals("Input string literal must match the output of toString()",
+ "x{myNamespace}myLocalPart",
+ qname.toString() );
+ }
+
+ public void testValueOfGoodMultipleLeftBraces()
+ {
+ //this is junk, but it is permitted according to the QName Javadoc
+ try {
+ qname = QName.valueOf("{myNam{espace}myLocalPart");
+ } catch (IllegalArgumentException e) {
+ fail("The QName literal is not illegal: " + "\"{myNam{espace}myLocalPart\"");
+ }
+
+ assertTrue("QName created from string literal is incorrect.",
+ (qname.getNamespaceURI().equals("myNam{espace") &&
+ qname.getLocalPart().equals("myLocalPart") &&
+ qname.getPrefix().equals(emptyString)) );
+
+ assertEquals("Input string literal must match the output of toString()",
+ "{myNam{espace}myLocalPart",
+ qname.toString() );
+ }
+
+ public void testValueOfGoodUnmatchedRightBrace()
+ {
+ //this is junk, but it is permitted according to the QName Javadoc
+ try {
+ qname = QName.valueOf("myNamespace}myLocalPart");
+ } catch (IllegalArgumentException e) {
+ fail("The QName literal is not illegal: " + "\"myNamespace}myLocalPart\"");
+ }
+
+ assertTrue("QName created from string literal is incorrect.",
+ (qname.getNamespaceURI().equals(emptyString) &&
+ qname.getLocalPart().equals("myNamespace}myLocalPart") &&
+ qname.getPrefix().equals(emptyString)) );
+
+ assertEquals("Input string literal must match the output of toString()",
+ "myNamespace}myLocalPart",
+ qname.toString() );
+ }
+
+ public void testValueOfGoodMultipleRightBraces()
+ {
+ //this is junk, but it is permitted according to the QName Javadoc
+ try {
+ qname = QName.valueOf("{myNam}espace}myLocalPart");
+ } catch (IllegalArgumentException e) {
+ fail("The QName literal is not illegal: " + "\"{myNam}espace}myLocalPart\"");
+ }
+
+ assertTrue("QName created from string literal is incorrect.",
+ (qname.getNamespaceURI().equals("myNam") &&
+ qname.getLocalPart().equals("espace}myLocalPart") &&
+ qname.getPrefix().equals(emptyString)) );
+
+ assertEquals("Input string literal must match the output of toString()",
+ "{myNam}espace}myLocalPart",
+ qname.toString() );
+ }
+ */
+
+ /* ************************************************
+ * Tests for deserializing.
+ * ************************************************/
+
+ public void testGoodSerializeThenDeserialize() throws IOException,
+ ClassNotFoundException
+ {
+ //Serialize a QName then deserialize it to test it has been initialized
+ //correctly by the readObject() method.
+
+ qname = new QName("myNamespace", "myLocalPart", "myPrefix");
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(qname);
+ oos.close();
+
+ QName qnameCopy = null;
+
+ ObjectInputStream ois =
+ new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
+ Object o = ois.readObject();
+ qnameCopy = (QName)o;
+ ois.close();
+
+ assertTrue("QName was not initialized correctly after deserialization.",
+ (qnameCopy.getNamespaceURI().equals("myNamespace") &&
+ qnameCopy.getLocalPart().equals("myLocalPart") &&
+ qnameCopy.getPrefix().equals("myPrefix")));
+
+ }
+
+ /* ************************************************
+ * Tests for equals(obj) method
+ * ************************************************/
+
+ public void testEqualsGoodSameValues()
+ {
+ QName qn1, qn2;
+ qn1 = new QName("myNamespace", "myLocalPart");
+ qn2 = QName.valueOf("{myNamespace}myLocalPart");
+
+ assertTrue("Expected two QNames objects with the same values to be equal.",
+ qn1.equals(qn2));
+ }
+
+ public void testEqualsGoodDifferentPrefix()
+ {
+ /* the prefix is not used to determine equality, so even though the prefixes
+ * are different, the namespacesURIs and localParts are equivalent so the
+ * objects are equal.
+ */
+
+ QName qn1, qn2;
+ qn1 = new QName("myNamespace", "myLocalPart", "myPrefix");
+ qn2 = QName.valueOf("{myNamespace}myLocalPart"); //prefix defaults to ""
+
+ assertTrue("Expected two QNames objects with the same values to be equal.",
+ qn1.equals(qn2));
+ }
+
+ public void testEqualsGoodDifferentNamespaceAndLocalPart()
+ {
+ QName qn1, qn2;
+ qn1 = new QName("myNamespace", "myLocalPart", "");
+ qn2 = QName.valueOf("{yourNamespace}yourLocalPart"); //prefix defaults to ""
+
+ assertFalse("Expected two QNames objects with different values to be not equal.",
+ qn1.equals(qn2));
+ }
+
+ public void testEqualsGoodSameObjectRef()
+ {
+ QName qn1, qn2;
+ qn1 = new QName("myNamespace", "myLocalPart", "");
+ qn2 = qn1;
+
+ //qn1 and qn2 now refer to the same object.
+
+ assertTrue("Expected two QNames with the same object reference to be equal.",
+ qn1.equals(qn2));
+ }
+
+ public void testEqualsGoodNotAQName()
+ {
+ QName qn1;
+ qn1 = new QName("myNamespace", "myLocalPart", "");
+ Object o = new Object();
+
+ assertFalse("Expected a QName and a different type of object to be not equal.",
+ qn1.equals(o));
+ }
+
+
+
+}
Added: webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/types/NCNameTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/types/NCNameTest.java?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/types/NCNameTest.java (added)
+++ webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/types/NCNameTest.java Tue Sep 1 05:54:15 2009
@@ -0,0 +1,121 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.woden.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * junit tests for the NCName class.
+ */
+public class NCNameTest extends TestCase {
+
+ public static Test suite()
+ {
+ return new TestSuite(NCNameTest.class);
+ }
+
+ private NCName n1, n1_dup, n1_dup2, n2, n3, n3_dup, n3_dup2;
+
+ public void setUp() {
+ n1 = new NCName("someNCName");
+ n1_dup = new NCName("someNCName");
+ n1_dup2 = new NCName("someNCName");
+ n2 = new NCName("someOtheNCName");
+ n3= new NCName("");
+ n3_dup = new NCName("");
+ n3_dup2 = new NCName("");
+ }
+
+ public void testEqualsWithNullValueNCNames() {
+ equalsIsReflexive(n3);
+ equalsIsSymmetric(n3, n3_dup, n2);
+ equalsIsTransitive(n3, n3_dup, n3_dup2);
+ equalsIsConsistent(n3, n3_dup);
+ }
+
+ public void testEqualsWithNonNullValueNCNames() {
+ equalsIsReflexive(n1);
+ equalsIsSymmetric(n1, n1_dup, n2);
+ equalsIsTransitive(n1, n1_dup, n1_dup2);
+ equalsIsConsistent(n1, n1_dup);
+ }
+
+ private void equalsIsReflexive(NCName n1) {
+ assertTrue("reflexive test fails", n1.equals(n1));
+ }
+
+ private void equalsIsSymmetric(NCName n1, NCName n1_dup, NCName n2) {
+ assertTrue("symmetric test fails for equal NCNames", n1.equals(n1_dup));
+ assertTrue("symmetric test fails for equal NCNames", n1_dup.equals(n1));
+ assertTrue("symmetric test fails for unequal NCNames", !n1.equals(n2));
+ assertTrue("symmetric test fails for unequal NCNames", !n2.equals(n1));
+ }
+
+ private void equalsIsTransitive(NCName n1, NCName n1_dup, NCName n1_dup2) {
+ assertTrue("transitive test fails", n1.equals(n1_dup) && n1_dup.equals(n1_dup2) && n1.equals(n1_dup2));
+ }
+
+ private void equalsIsConsistent(NCName n1, NCName n1_dup) {
+ assertTrue("consistent test fails", n1.equals(n1_dup) && n1.equals(n1_dup));
+ }
+
+ public void testEqualsNullParamFalse() {
+ assertTrue("Null param doesn't return false", n1.equals(null) == false);
+ }
+
+ public void testThrowsIllegalArgExceptionWithNullArgument() {
+ try {
+ NCName nc = new NCName(null);
+ fail("NCName(null) should throw IllegalArgumentException");
+ } catch (IllegalArgumentException iae) {
+ // do nothing as this is the expected result
+ }
+ }
+
+ public void testMapWithStringKeyAndNCNameValue() {
+ String keyStr = new String("bar");
+ NCName nOrig = new NCName(keyStr);
+ NCName n;
+ Map ncnameMap = new HashMap();
+ ncnameMap.put(keyStr, nOrig);
+ n = (NCName)ncnameMap.get(keyStr);
+ assertNotNull("Couldn't find NCName in Map keyed off String key object used to put it there", n);
+ assertTrue("Didn't find the right NCName in the map", n==nOrig);
+ n = (NCName)ncnameMap.get(new String("bar"));
+ assertNotNull("Couldn't find NCName in Map keyed off new equivalent String", n);
+ assertTrue("Didn't find the right NCName in the map", n==nOrig);
+ }
+
+ public void testMapWithNCNameKeyAndStringValue() {
+ NCName keyNCName = new NCName("bar");
+ String sOrig = keyNCName.toString();
+ String s;
+ Map stringMap = new HashMap();
+ stringMap.put(keyNCName, sOrig);
+ s = (String)stringMap.get(keyNCName);
+ assertNotNull("Couldn't find String in Map keyed off NCName key object used to put it there", s);
+ assertTrue("Didn't find the right NCName in the map", s==sOrig);
+ s = (String)stringMap.get(new NCName("bar"));
+ assertNotNull("Couldn't find NCName in Map keyed off new equivalent NCName", s);
+ assertTrue("Didn't find the right NCName in the map", s==sOrig);
+ }
+}
Added: webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/types/QNameTokenUnionTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/types/QNameTokenUnionTest.java?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/types/QNameTokenUnionTest.java (added)
+++ webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/types/QNameTokenUnionTest.java Tue Sep 1 05:54:15 2009
@@ -0,0 +1,90 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.woden.types;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import javax.xml.namespace.QName;
+
+/**
+ * This class tests the three possible ways to construct a QNameTokenUnion and the functions for each.
+ *
+ * @author Dan Harvey, danharvey42@gmail.com
+ *
+ */
+public class QNameTokenUnionTest extends TestCase {
+
+
+ public static Test suite()
+ {
+ return new TestSuite(QNameTokenUnionTest.class);
+ }
+
+ public void testQNameTokenUnionString() {
+ //Test three possible token types.
+ //#any token
+ QNameTokenUnion union = QNameTokenUnion.ANY;
+ assertFalse("A QNameTokenUnion with token #any should return false for isQName()", union.isQName());
+ assertTrue("A QNameTokenUnion with token #any should return true for isToken()", union.isToken());
+ assertNull("A QNameTokenUnion with token #any should return null for getQName()", union.getQName());
+ assertTrue("A QNameTokenUnion with token #any should return #any for getToken()", union.getToken().equals("#any"));
+
+ //#none token
+ union = QNameTokenUnion.NONE;
+ assertFalse("A QNameTokenUnion with token #none should return false for isQName()", union.isQName());
+ assertTrue("A QNameTokenUnion with token #none should return true for isToken()", union.isToken());
+ assertNull("A QNameTokenUnion with token #none should return null for getQName()", union.getQName());
+ assertTrue("A QNameTokenUnion with token #none should return #none for getToken()", union.getToken().equals("#none"));
+
+ //#other token
+ union = QNameTokenUnion.OTHER;
+ assertFalse("A QNameTokenUnion with token #other should return false for isQName()", union.isQName());
+ assertTrue("A QNameTokenUnion with token #other should return true for isToken()", union.isToken());
+ assertNull("A QNameTokenUnion with token #other should return null for getQName()", union.getQName());
+ assertTrue("A QNameTokenUnion woth token #other should return #other for getToken()", union.getToken().equals("#other"));
+
+ }
+
+ public void testQNameTokenUnionQName() {
+ QNameTokenUnion union = null;
+
+ //Construct with a QName.
+ boolean notThrownException = true;
+ try {
+ union = new QNameTokenUnion(new QName("org.apache.woden"));
+ } catch (NullPointerException e) {
+ notThrownException = false;
+ }
+ assertTrue("A QNameTokenUnion with a valid QName should not throw a NullPointerException when constructed", notThrownException);
+ assertTrue("The QName returned a different QName value to that which was set.", union.getQName().equals(new QName("org.apache.woden")));
+ assertNull("A QNameTokenUnion with a valid QName should return null for getToken()", union.getToken());
+ assertTrue("A QNameTokenUnion with a valid QName should return true for isQName()", union.isQName());
+ assertFalse("A QNameTokenUnion with a valid QName should return false for isToken()", union.isToken());
+
+ //Construct with a null QName.
+ boolean thrownException = false;
+ try {
+ QName qname = null;
+ union = new QNameTokenUnion(qname);
+ } catch (NullPointerException e) {
+ thrownException = true;
+ }
+ assertTrue("A QNameTokenUnion with a null QName argument should throw an NullPointerException when constructed", thrownException);
+ }
+
+}
Added: webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/xpointer/XPointerTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/xpointer/XPointerTest.java?rev=809835&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/xpointer/XPointerTest.java (added)
+++ webservices/woden/trunk/java/woden-api/src/test/java/org/apache/woden/xpointer/XPointerTest.java Tue Sep 1 05:54:15 2009
@@ -0,0 +1,80 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.woden.xpointer;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class XPointerTest extends TestCase {
+
+
+ public static Test suite()
+ {
+ return new TestSuite(XPointerTest.class);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ public void testXPointerString() {
+ XPointer xpointer;
+ //Good Tests.
+ String[] goodXPointers = new String[]{
+ //Shorthand
+ "justaShorthandPointer",
+ //element() scheme.
+ "element(AnNCName)", "element(AnNCName/1)", "element(AnNCName/1/2/34)", "element(/1)", "element(/1/4/43)"
+ };
+
+ //Test XPointers
+ for (int i=0; i< goodXPointers.length; i++) {
+ try {
+ xpointer = new XPointer(goodXPointers[i]);
+ String result = xpointer.toString();
+ assertEquals("The serialisation of XPointer: " + goodXPointers[i] + ", produced a different result: " + result, goodXPointers[i], result);
+ } catch(InvalidXPointerException e) {
+ fail("XPointer: " + goodXPointers[i] + ", is reported as being invalid when it actually is valid.");
+ } catch(Exception e) {
+ fail("Failed with unexpected exception: " + e);
+ }
+ }
+
+ //Bad Tests.
+ String[] badXPointers = new String[]{
+ //Shorthand
+ "justaShorthand##Pointer",
+ //element() scheme.
+ "", "element(/)", "element(//)", "element(/1/2/3//)", "element(/1/b/3)", "element(Not!AnNCNa-me)",
+ "element(/ncname)", "element(AnNCName/)", "element(AnNCName//)", "element(AnNCName/1/b)", "element(AnNCName/1/2//)"
+ };
+
+ //Test XPointers
+ for (int i=0; i< badXPointers.length; i++) {
+ try {
+ xpointer = new XPointer(badXPointers[i]);
+ fail("XPointer parser failed to thrown an exception for invalid XPointer: " + badXPointers[i]);
+ } catch(Exception e) { //See if exception is anything other than InvalidXPointerException which we want.
+ if (!(e instanceof InvalidXPointerException)) {
+ fail("Parsing the XPointer threw an unexpected exception: " + e + ", On XPointer: " + badXPointers[i]);
+ }
+ }
+ }
+ }
+
+}
Added: webservices/woden/trunk/java/woden-api/src/test/resources/javax/xml/namespace/serialized_QName_no_prefix
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-api/src/test/resources/javax/xml/namespace/serialized_QName_no_prefix?rev=809835&view=auto
==============================================================================
Binary file - no diff available.
Propchange: webservices/woden/trunk/java/woden-api/src/test/resources/javax/xml/namespace/serialized_QName_no_prefix
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org