Author: bimargulies
Date: Sun Dec 14 13:25:18 2008
New Revision: 726532

URL: http://svn.apache.org/viewvc?rev=726532&view=rev
Log:
WSCOMMONS-377.

Add functionality so that the base URI of an XmlSchemaCollection is used to 
resolve imports inside of a 
schema when that schemas's system ID is not usable as a base URI. I'm calling 
this a fix to 377.

Added:
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java
   (with props)
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/java/tests/WSCOMMONS377Test.java
   (with props)
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd
   (with props)
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd
   (with props)
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl
   (with props)
Modified:
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
    
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java

Modified: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java?rev=726532&r1=726531&r2=726532&view=diff
==============================================================================
--- 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
 (original)
+++ 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
 Sun Dec 14 13:25:18 2008
@@ -126,15 +126,15 @@
        /**
         * handles the schema element
         * @param schemaEl
-        * @param uri
+        * @param systemId
         */
-       XmlSchema handleXmlSchemaElement(Element schemaEl, String uri) {
+       XmlSchema handleXmlSchemaElement(Element schemaEl, String systemId) {
                // get all the attributes along with the namespace declns
                
schema.setNamespaceContext(NodeNamespaceContext.getNamespaceContext(schemaEl));
                setNamespaceAttributes(schema, schemaEl);
 
                XmlSchemaCollection.SchemaKey schemaKey = new 
XmlSchemaCollection.SchemaKey(
-                               schema.logicalTargetNamespace, uri);
+                               schema.logicalTargetNamespace, systemId);
                if (!collection.containsSchema(schemaKey)) {
                        collection.addSchema(schemaKey, schema);
                        schema.parent = collection; // establish parentage now.
@@ -153,7 +153,7 @@
                        schema.id = schemaEl.getAttribute("id");
                }
 
-               schema.setSourceURI(uri);
+               schema.setSourceURI(systemId);
 
                /***********
                 * for ( each childElement)

Modified: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java?rev=726532&r1=726531&r2=726532&view=diff
==============================================================================
--- 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
 (original)
+++ 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
 Sun Dec 14 13:25:18 2008
@@ -42,6 +42,7 @@
 
 import org.apache.ws.commons.schema.constants.Constants;
 import org.apache.ws.commons.schema.extensions.ExtensionRegistry;
+import org.apache.ws.commons.schema.resolver.CollectionURIResolver;
 import org.apache.ws.commons.schema.resolver.DefaultURIResolver;
 import org.apache.ws.commons.schema.resolver.URIResolver;
 import org.apache.ws.commons.schema.utils.DOMUtil;
@@ -94,20 +95,27 @@
        }
        
        
-       
-    static class SchemaKey {
+       /**
+        * Key that identifies a schema in a collection, composed of a 
targetNamespace
+        * and a system ID. 
+        */
+    public static class SchemaKey {
         private final String namespace;
         private final String systemId;
         SchemaKey(String pNamespace, String pSystemId) {
             namespace = pNamespace == null ? Constants.NULL_NS_URI : 
pNamespace;
             systemId = pSystemId == null ? "" : pSystemId;
         }
+        
         String getNamespace() { return namespace; }
+        
         String getSystemId() { return systemId; }
+        
         public int hashCode() {
             final int PRIME = 31;
             return (PRIME + namespace.hashCode()) * PRIME + 
systemId.hashCode();
         }
+        
         public boolean equals(Object obj) {
             if (this == obj)
                 return true;
@@ -118,6 +126,7 @@
             final SchemaKey other = (SchemaKey) obj;
             return namespace.equals(other.namespace)  &&  
systemId.equals(other.systemId);
         }
+        
         public String toString() {
             return Constants.NULL_NS_URI.equals(namespace) ?
                     systemId : ("{" + namespace + "}" + systemId);
@@ -156,10 +165,15 @@
     /**
      * Set the base URI. This is used when schemas need to be
      * loaded from relative locations
-     * @param baseUri  baseUri for this
+     * @param baseUri  baseUri for this collection.
      */
-    public void setBaseUri(String baseUri){
+    public void setBaseUri(String baseUri) {
         this.baseUri = baseUri;
+        if(schemaResolver instanceof CollectionURIResolver) {
+               CollectionURIResolver resolverWithBase = 
+                       (CollectionURIResolver) schemaResolver;
+               resolverWithBase.setCollectionBaseURI(baseUri);
+        }
     }
 
     /**
@@ -396,10 +410,26 @@
         return doc;
     }
 
+    /**
+     * Read an XML schema into the collection from a SAX InputSource.
+     * Schemas in a collection must be unique in the concatenation of system 
ID and
+     * targetNamespace. In this API, the systemID is taken from the source.
+     * @param inputSource the XSD document.
+     * @param veh handler that is called back for validation.
+     * @return the XML schema object.
+     */
     public XmlSchema read(InputSource inputSource, ValidationEventHandler veh) 
{
         return read(inputSource, veh, null);
     }
-
+    
+    /**
+     * Read an XML schema into the collection from a TRaX source. 
+     * Schemas in a collection must be unique in the concatenation of system 
ID and
+     * targetNamespace. In this API, the systemID is taken from the Source.
+     * @param source the XSD document.
+     * @param veh handler that is called back for validation.
+     * @return the XML schema object.
+     */
     public XmlSchema read(Source source, ValidationEventHandler veh) {
         if (source instanceof SAXSource) {
             return read(((SAXSource) source).getInputSource(), veh);
@@ -422,12 +452,27 @@
         }
     }
 
+    /**
+     * Read an XML schema into the collection from a DOM document. 
+     * Schemas in a collection must be unique in the concatenation of system 
ID and
+     * targetNamespace. In this API, the systemID is taken from the document.
+     * @param doc the XSD document.
+     * @param veh handler that is called back for validation.
+     * @return the XML schema object.
+     */
     public XmlSchema read(Document doc, ValidationEventHandler veh) {
         SchemaBuilder builder = new SchemaBuilder(this, null);
         return builder.build(doc, null, veh);
     }
 
    
+    /**
+     * Read an XML Schema into the collection from a DOM element. Schemas in a 
collection
+     * must be unique in the concatentation of System ID and targetNamespace. 
The system ID will 
+     * be empty for this API.
+     * @param elem the DOM element for the schema.
+     * @return the XmlSchema
+     */
     public XmlSchema read(Element elem) {
         SchemaBuilder builder = new SchemaBuilder(this, null);
         XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, null);
@@ -435,25 +480,51 @@
         return xmlSchema;
     }
 
-    public XmlSchema read(Document doc, String uri, ValidationEventHandler 
veh) {
-        return read(doc, uri, veh, null);
+    /**
+     * Read an XML Schema from a complete XSD XML DOM Document into this 
collection.
+     * Schemas in a collection must be unique in
+     * the concatenation of SystemId and targetNamespace.
+     * @param doc The schema document.
+     * @param systemId System ID for this schema.
+     * @param veh handler to be called to check validity of the schema.
+     * @return the schema object.
+     */
+    public XmlSchema read(Document doc, String systemId, 
ValidationEventHandler veh) {
+        return read(doc, systemId, veh, null);
     }
 
-    public XmlSchema read(Document doc, String uri, ValidationEventHandler veh,
+    /**
+     * Read an XML Schema from a complete XSD XML DOM Document into this 
collection.
+     *  Schemas in a collection must be unique in
+     * the concatenation of SystemId and targetNamespace.
+     * @param doc Source document.
+     * @param systemId System id.
+     * @param veh Stub for future capability to handle validation errors.
+     * @param validator object that is called back to check validity of the 
target namespace.
+     * @return the schema object.
+     */
+    public XmlSchema read(Document doc, String systemId, 
ValidationEventHandler veh,
             TargetNamespaceValidator validator) {
         SchemaBuilder builder = new SchemaBuilder(this, validator);
-        XmlSchema schema = builder.build(doc, uri, veh);
+        XmlSchema schema = builder.build(doc, systemId, veh);
         schema.setInputEncoding(DOMUtil.getInputEncoding(doc));
                return schema;
     }
 
-    public XmlSchema read(Element elem, String uri) {
+    /**
+     * Read a schema from a DOM tree into the collection. The schemas in a 
collection must be unique
+     * in the concatenation of the target namespace and the system ID.  
+     * @param elem xs:schema DOM element.
+     * @param systemId System id.
+     * @return the schema object.
+     */
+    public XmlSchema read(Element elem, String systemId) {
         SchemaBuilder builder = new SchemaBuilder(this, null);
-        XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, uri);
+        XmlSchema xmlSchema = builder.handleXmlSchemaElement(elem, systemId);
         
xmlSchema.setInputEncoding(DOMUtil.getInputEncoding(elem.getOwnerDocument()));
         return xmlSchema;
     }
-
+    
     /**
      * Creates new XmlSchemaCollection
      */
@@ -462,7 +533,7 @@
     }
 
     /**
-     * Retrieve a set of XmlSchema instances with the given its system ID.
+     * Retrieve a set containing the XmlSchema instances with the given system 
ID.
      * In general, this will return a single instance, or none. However,
      * if the schema has no targetNamespace attribute and was included
      * from schemata with different target namespaces, then it may
@@ -494,33 +565,46 @@
         return (XmlSchema[]) c.toArray(new XmlSchema[c.size()]);
     }
 
+    
+    /**
+     * Retrieve a global element from the schema collection. 
+     * @param qname the element QName.
+     * @return the element object, or null.
+     */
     public XmlSchemaElement getElementByQName(QName qname) {
-        String uri = qname.getNamespaceURI();
-        for (Iterator iter = schemas.entrySet().iterator();  iter.hasNext();  
) {
-            Map.Entry entry = (Map.Entry) iter.next();
-            if (((SchemaKey) entry.getKey()).getNamespace().equals(uri)) {
-                XmlSchemaElement element = ((XmlSchema) 
entry.getValue()).getElementByName(qname);
-                if (element != null) {
-                    return element;
-                }
-        }
-        }
-        return null;
-    }
+               String uri = qname.getNamespaceURI();
+               for (Iterator iter = schemas.entrySet().iterator(); 
iter.hasNext();) {
+                       Map.Entry entry = (Map.Entry) iter.next();
+                       if (((SchemaKey) 
entry.getKey()).getNamespace().equals(uri)) {
+                               XmlSchemaElement element = ((XmlSchema) 
entry.getValue())
+                                               .getElementByName(qname);
+                               if (element != null) {
+                                       return element;
+                               }
+                       }
+               }
+               return null;
+       }
 
+    /**
+     * Retrieve a global type from the schema collection.
+     * @param schemaTypeName the QName of the type.
+     * @return the type object, or null.
+     */
     public XmlSchemaType getTypeByQName(QName schemaTypeName) {
-        String uri = schemaTypeName.getNamespaceURI();
-        for (Iterator iter = schemas.entrySet().iterator();  iter.hasNext();  
) {
-            Map.Entry entry = (Map.Entry) iter.next();
-            if (((SchemaKey) entry.getKey()).getNamespace().equals(uri)) {
-                XmlSchemaType type = ((XmlSchema) 
entry.getValue()).getTypeByName(schemaTypeName);
-                if (type != null) {
-                    return type;
-                }
-        }
-        }
-        return null;
-    }
+               String uri = schemaTypeName.getNamespaceURI();
+               for (Iterator iter = schemas.entrySet().iterator(); 
iter.hasNext();) {
+                       Map.Entry entry = (Map.Entry) iter.next();
+                       if (((SchemaKey) 
entry.getKey()).getNamespace().equals(uri)) {
+                               XmlSchemaType type = ((XmlSchema) 
entry.getValue())
+                                               .getTypeByName(schemaTypeName);
+                               if (type != null) {
+                                       return type;
+                               }
+                       }
+               }
+               return null;
+       }
     
     /**
      * Find a global attribute by QName in this collection of schemas.
@@ -578,23 +662,49 @@
         unresolvedTypes.remove(typeName);
     }
 
+    /**
+     * Retrieve the namespace context.
+     * @return the namespace context.
+     */
     public NamespacePrefixList getNamespaceContext() {
         return namespaceContext;
     }
 
+    /**
+     * Set the namespace context for this collection, which controls the 
assignment of
+     * namespace prefixes to namespaces.
+     * @param namespaceContext the context.
+     */
     public void setNamespaceContext(NamespacePrefixList namespaceContext) {
         this.namespaceContext = namespaceContext;
     }
 
-    public void push(SchemaKey pKey){
+    /**
+     * Push a schema onto the stack of schemas.
+     *  This function, while public, is probably not useful outside of 
+     * the implementation.
+     * @param pKey the schema key.
+     */
+    public void push(SchemaKey pKey) {
         stack.push(pKey);
     }
 
-    public void pop(){
+    /**
+     * Pop the stack of schemas. This function, while public, is probably not 
useful outside of 
+     * the implementation.
+     */
+    public void pop() {
         stack.pop();
     }
 
-    public boolean check(SchemaKey pKey){
+    /**
+     * Return an indication of whether a particular schema is in the working 
stack of 
+     * schemas. This function, while public, is probably not useful outside of 
+     * the implementation.
+     * @param pKey schema key
+     * @return true if the schema is in the stack.
+     */
+    public boolean check(SchemaKey pKey) {
         return (stack.indexOf(pKey)==-1);
     }
 

Added: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java?rev=726532&view=auto
==============================================================================
--- 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java
 (added)
+++ 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java
 Sun Dec 14 13:25:18 2008
@@ -0,0 +1,29 @@
+/*
+ * 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.ws.commons.schema.resolver;
+
+/**
+ * 
+ * Extended URIResolver that can be informed about
+ * a collective base URI. 
+ */
+public interface CollectionURIResolver extends URIResolver {
+       void setCollectionBaseURI(String uri);
+       String getCollectionBaseURI();
+}

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java?rev=726532&r1=726531&r2=726532&view=diff
==============================================================================
--- 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java
 (original)
+++ 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java
 Sun Dec 14 13:25:18 2008
@@ -31,28 +31,36 @@
 /**
  * This resolver provides the means of resolving the imports and includes of a
  * given schema document. The system will call this default resolver if there
- * is no other resolver present in the system
+ * is no other resolver present in the system. 
  */
-public class DefaultURIResolver implements URIResolver {
+public class DefaultURIResolver implements CollectionURIResolver {
+       
+       private String collectionBaseURI;
 
 
     /**
-     * As for the resolver the publid ID is the target namespace of the
-     * schema and the schemaLocation is the value of the schema location
-     * @param namespace
-     * @param schemaLocation
-     * @param baseUri
+     * Try to resolve a schema location to some data.
+     * @param namespace targt namespace.
+     * @param schemaLocation system ID.
+     * @param baseUri base URI for the schema.
      */
     public InputSource resolveEntity(String namespace,
                                      String schemaLocation,
-                                     String baseUri){
+                                     String baseUri) {
 
         if (baseUri!=null) 
         {
             try
             {
                 File baseFile = new File(baseUri);
-                if (baseFile.exists()) baseUri = baseFile.toURI().toString();
+                if (baseFile.exists()) {
+                       baseUri = baseFile.toURI().toString();
+                } else if(collectionBaseURI != null) {
+                       baseFile = new File(collectionBaseURI);
+                    if (baseFile.exists()) {
+                       baseUri = baseFile.toURI().toString();
+                    }
+                }
                 
                 String ref = new URI(baseUri).resolve(new 
URI(schemaLocation)).toString();
 
@@ -161,4 +169,20 @@
 
         return new URL("file", "", path);
     }    // getFileURL
+
+    /**
+     * Get the base URI derived from a schema collection. It serves as a 
fallback from the specified base.
+     * @return URI
+     */
+       public String getCollectionBaseURI() {
+               return collectionBaseURI;
+       }
+
+       /**
+        * set the collection base URI, which serves as a fallback from the 
base of the immediate schema.
+        * @param collectionBaseURI the URI.
+        */
+       public void setCollectionBaseURI(String collectionBaseURI) {
+               this.collectionBaseURI = collectionBaseURI;
+       }
 }

Added: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/java/tests/WSCOMMONS377Test.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/java/tests/WSCOMMONS377Test.java?rev=726532&view=auto
==============================================================================
--- 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/java/tests/WSCOMMONS377Test.java
 (added)
+++ 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/java/tests/WSCOMMONS377Test.java
 Sun Dec 14 13:25:18 2008
@@ -0,0 +1,44 @@
+/*
+ * Created on 31.08.2008
+ * (C) Copyright 2003-2008 Alexander Veit
+ */
+
+
+package tests;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.constants.Constants;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * @author alex
+ * $Revision$
+ */
+public class WSCOMMONS377Test extends TestCase {
+
+    public void testSchemaImport() throws Exception {
+        DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
+        fac.setNamespaceAware(true);
+
+        String strUri = Resources.asURI("WSCOMMONS-377/importing.wsdl");
+        Document doc = fac.newDocumentBuilder().parse(strUri);
+
+        XmlSchemaCollection xsColl = new XmlSchemaCollection();
+        xsColl.setBaseUri(Resources.TEST_RESOURCES + "/WSCOMMONS-377");
+
+        NodeList nodesSchema = 
doc.getElementsByTagNameNS(Constants.URI_2001_SCHEMA_XSD, "schema");
+        XmlSchema[] schemas = new XmlSchema[nodesSchema.getLength()];
+
+        String systemIdBase = "urn:schemas";
+        for (int i = 0; i < nodesSchema.getLength(); i++)
+            schemas[i] = xsColl.read((Element)nodesSchema.item(i), 
systemIdBase + i);
+    }
+}

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/java/tests/WSCOMMONS377Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/java/tests/WSCOMMONS377Test.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/java/tests/WSCOMMONS377Test.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd
URL: 
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd?rev=726532&view=auto
==============================================================================
--- 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd
 (added)
+++ 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd
 Sun Dec 14 13:25:18 2008
@@ -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.
+  -->
+
+<xsd:schema
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+       xmlns:types="http://test.example.org/types/";
+       targetNamespace="http://test.example.org/";
+       elementFormDefault="qualified">
+
+       <xsd:import namespace="http://test.example.org/types/"; 
schemaLocation="importedTypes.xsd" />
+       
+       <xsd:element name="myArray" type="types:tArray"/>
+
+</xsd:schema>
\ No newline at end of file

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedElements.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd
URL: 
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd?rev=726532&view=auto
==============================================================================
--- 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd
 (added)
+++ 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd
 Sun Dec 14 13:25:18 2008
@@ -0,0 +1,31 @@
+<!--
+  ~ 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.
+  -->
+
+<xsd:schema
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+       targetNamespace="http://test.example.org/types/";
+       elementFormDefault="qualified">
+
+       <xsd:complexType name="tArray">
+               <xsd:sequence>
+                       <xsd:any namespace="##any" />
+               </xsd:sequence>
+       </xsd:complexType>
+
+</xsd:schema>
\ No newline at end of file

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importedTypes.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl
URL: 
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl?rev=726532&view=auto
==============================================================================
--- 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl
 (added)
+++ 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl
 Sun Dec 14 13:25:18 2008
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions
+       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+       xmlns:tns="http://test.example.org/";
+       xmlns:types="http://test.example.org/types/";
+       targetNamespace="http://test.example.org/";>
+
+       <wsdl:types>
+               <xsd:schema>
+                       <xsd:import namespace="http://test.example.org/"; 
schemaLocation="importedElements.xsd" />
+               </xsd:schema>
+               <xsd:schema>
+                       <xsd:import namespace="http://test.example.org/types/"; 
schemaLocation="importedTypes.xsd" />
+               </xsd:schema>
+       </wsdl:types>
+
+</wsdl:definitions>
\ No newline at end of file

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/test/test-resources/WSCOMMONS-377/importing.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml


Reply via email to