You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2008/02/25 20:09:05 UTC

svn commit: r630959 [1/4] - in /webservices/axis2/trunk/java/modules: jaxws/ jaxws/test-resources/catalog/ jaxws/test-resources/catalog/dir1/ jaxws/test-resources/catalog/dir2/ jaxws/test-resources/catalog/dir3/ jaxws/test-resources/catalog/fail/ jaxws...

Author: dims
Date: Mon Feb 25 11:09:01 2008
New Revision: 630959

URL: http://svn.apache.org/viewvc?rev=630959&view=rev
Log:
Fix for AXIS2-3499 - Introduce support in JAX-WS for OASIS XML Catalogs.

Added:
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/basic-catalog.xml
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/child-catalog.xml
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir1/
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir1/abstract.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir2/
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir2/imported1.xsd
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir3/
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir3/imported2.xsd
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/firstImportFail.xml
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/root-catalog.xml
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/secondImportFail.xml
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/thirdImportFail.xml
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux.xsd
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux2.xsd
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBad.xsd
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBase.xsd
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root-catalog.xml
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/unique-catalog.xml
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/XMLCatalogTests.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/JAXWSCatalogManager.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/impl/
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/catalog/impl/OASISCatalogManager.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogURIResolver.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/pom.xml
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataTest.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/metadata/pom.xml
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/EndpointDescription.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/ServiceDescription.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/builder/JAXWSRIWSDLGenerator.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/BaseWSDLLocator.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java
    webservices/axis2/trunk/java/modules/parent/pom.xml

Modified: webservices/axis2/trunk/java/modules/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/pom.xml?rev=630959&r1=630958&r2=630959&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws/pom.xml Mon Feb 25 11:09:01 2008
@@ -70,6 +70,10 @@
 			<version>${version}</version>
 		</dependency>
         <dependency>
+            <groupId>xml-resolver</groupId>
+            <artifactId>xml-resolver</artifactId>
+        </dependency>
+        <dependency>
             <groupId>jaxen</groupId>
             <artifactId>jaxen</artifactId>
         </dependency>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/basic-catalog.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/basic-catalog.xml?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/basic-catalog.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/basic-catalog.xml Mon Feb 25 11:09:01 2008
@@ -0,0 +1,23 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+   <system
+       systemId="http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+       uri="catalog/schema/application_1_4.xsd" />
+   <system
+       systemId="http://soapinterop.org/xsd2"
+       uri="importAux.xsd" />
+   <system
+       systemId="http://example.com/test/doesnotexist.wsdl"
+       uri="dir1/abstract.wsdl" />
+   <system
+       systemId="doesnotexist.xsd"
+       uri="dir2/imported1.xsd" />
+   <system
+       systemId="http://example.com/neverExisted.xsd"
+       uri="dir3/imported2.xsd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+       uri="catalog/dtd/ejb-jar.dtd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+       uri="catalog/dtd/ejb-jar_2_0.dtd" />
+</catalog>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/child-catalog.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/child-catalog.xml?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/child-catalog.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/child-catalog.xml Mon Feb 25 11:09:01 2008
@@ -0,0 +1,15 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+   <system
+       systemId="http://example.com/test/doesnotexist.wsdl"
+       uri="dir1/abstract.wsdl" />
+   <system
+       systemId="doesnotexist.xsd"
+       uri="dir2/imported1.xsd" />
+   <system
+       systemId="http://example.com/neverExisted.xsd"
+       uri="dir3/imported2.xsd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+       uri="catalog/dtd/ejb-jar.dtd" />
+   <nextCatalog catalog="next.xml"/>
+</catalog>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir1/abstract.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir1/abstract.wsdl?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir1/abstract.wsdl (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir1/abstract.wsdl Mon Feb 25 11:09:01 2008
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<wsdl:definitions
+  targetNamespace="http://www.example.com/test/messageTypes"
+  xmlns="http://www.example.com/test/messageTypes"
+  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:ns1="urn:types1"
+  xmlns:ns2="urn:types2">
+  
+  <wsdl:types xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  
+    <xs:schema attributeFormDefault="unqualified"
+      elementFormDefault="qualified"
+      targetNamespace="http://www.example.com/test/messageTypes"
+      xmlns:ns="http://www.example.com/test/messageTypes" 
+      xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:element name="getTotal">
+        <xs:complexType>
+          <xs:sequence/>
+        </xs:complexType>
+      </xs:element>     
+      <xs:element name="getTotalResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="xs:int"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:import namespace="urn:types1" schemaLocation="doesNotExist.xsd"/>
+    </xs:schema>
+    
+  </wsdl:types>
+  <wsdl:message name="getTotalRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="getTotal" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="getTotalResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="getTotalResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="addRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:add" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="addResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:addResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="clearRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:clear" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="clearResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:clearResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="divideRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:divide" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="divideResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:divideResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="divideByZeroException" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:divideByZeroFault" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="multiplyRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:multiply" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="multiplyResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns2:multiplyResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="subtractRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns2:subtract" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="subtractResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns2:subtractResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  
+</wsdl:definitions>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir2/imported1.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir2/imported1.xsd?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir2/imported1.xsd (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir2/imported1.xsd Mon Feb 25 11:09:01 2008
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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 targetNamespace="urn:types1"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        elementFormDefault="qualified">
+      <xsd:import namespace="urn:types2" schemaLocation="http://example.com/neverExisted.xsd"/>
+      <xsd:element name="add">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="param0" type="xsd:int"/>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="addResponse">
+        <xsd:complexType>
+          <xsd:sequence/>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="clear">
+        <xsd:complexType>
+          <xsd:sequence/>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="clearResponse">
+        <xsd:complexType>
+          <xsd:sequence/>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="divide">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="param0" type="xsd:int"/>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="divideResponse">
+        <xsd:complexType>
+          <xsd:sequence/>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="divideByZeroFault" type="xsd:int"/>
+      <xsd:element name="multiply">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="param0" type="xsd:int"/>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+  </xsd:schema>
+  
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir3/imported2.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir3/imported2.xsd?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir3/imported2.xsd (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/dir3/imported2.xsd Mon Feb 25 11:09:01 2008
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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 targetNamespace="urn:types2"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        elementFormDefault="qualified">
+      <xsd:element name="multiplyResponse">
+        <xsd:complexType>
+          <xsd:sequence/>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="subtract">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="param0" type="xsd:int"/>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="subtractResponse">
+        <xsd:complexType>
+          <xsd:sequence/>
+        </xsd:complexType>
+      </xsd:element>
+  </xsd:schema>
+  
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/firstImportFail.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/firstImportFail.xml?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/firstImportFail.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/firstImportFail.xml Mon Feb 25 11:09:01 2008
@@ -0,0 +1,23 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+   <system
+       systemId="http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+       uri="catalog/schema/application_1_4.xsd" />
+   <system
+       systemId="http://soapinterop.org/xsd2"
+       uri="importAux.xsd" />
+   <!--system
+       systemId="http://example.com/test/doesnotexist.wsdl"
+       uri="dir1/abstract.wsdl" /-->
+   <system
+       systemId="doesnotexist.xsd"
+       uri="dir2/imported1.xsd" />
+   <system
+       systemId="http://example.com/neverExisted.xsd"
+       uri="dir3/imported2.xsd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+       uri="catalog/dtd/ejb-jar.dtd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+       uri="catalog/dtd/ejb-jar_2_0.dtd" />
+</catalog>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/root-catalog.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/root-catalog.xml?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/root-catalog.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/root-catalog.xml Mon Feb 25 11:09:01 2008
@@ -0,0 +1,15 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+   <system
+       systemId="http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+       uri="catalog/schema/application_1_4.xsd" />
+   <system
+       systemId="http://soapinterop.org/xsd2"
+       uri="importAux.xsd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+       uri="catalog/dtd/ejb-jar.dtd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+       uri="catalog/dtd/ejb-jar_2_0.dtd" />
+   <nextCatalog catalog="thirdImportFail.xml"/>
+</catalog>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/secondImportFail.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/secondImportFail.xml?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/secondImportFail.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/secondImportFail.xml Mon Feb 25 11:09:01 2008
@@ -0,0 +1,23 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+   <system
+       systemId="http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+       uri="catalog/schema/application_1_4.xsd" />
+   <system
+       systemId="http://soapinterop.org/xsd2"
+       uri="importAux.xsd" />
+   <system
+       systemId="http://example.com/test/doesnotexist.wsdl"
+       uri="dir1/abstract.wsdl" />
+   <!--system
+       systemId="doesnotexist.xsd"
+       uri="dir2/imported1.xsd" /-->
+   <system
+       systemId="http://example.com/neverExisted.xsd"
+       uri="dir3/imported2.xsd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+       uri="catalog/dtd/ejb-jar.dtd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+       uri="catalog/dtd/ejb-jar_2_0.dtd" />
+</catalog>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/thirdImportFail.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/thirdImportFail.xml?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/thirdImportFail.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/fail/thirdImportFail.xml Mon Feb 25 11:09:01 2008
@@ -0,0 +1,23 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+   <system
+       systemId="http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+       uri="catalog/schema/application_1_4.xsd" />
+   <system
+       systemId="http://soapinterop.org/xsd2"
+       uri="importAux.xsd" />
+   <system
+       systemId="http://example.com/test/doesnotexist.wsdl"
+       uri="dir1/abstract.wsdl" />
+   <system
+       systemId="doesnotexist.xsd"
+       uri="dir2/imported1.xsd" />
+   <!-- system
+       systemId="http://example.com/neverExisted.xsd"
+       uri="dir3/imported2.xsd" /-->
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+       uri="catalog/dtd/ejb-jar.dtd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+       uri="catalog/dtd/ejb-jar_2_0.dtd" />
+</catalog>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux.xsd?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux.xsd (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux.xsd Mon Feb 25 11:09:01 2008
@@ -0,0 +1,34 @@
+<!--
+  ~ 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.
+  -->
+
+<schema targetNamespace="http://soapinterop.org/xsd2"
+        xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:xsd1="http://soapinterop.org/xsd2"
+        elementFormDefault="qualified">
+    <complexType name="SOAPStruct">
+        <all>
+            <element name="varFloat" type="xsd:float"/>
+            <element name="varInt" type="xsd:int"/>
+            <element name="varString" type="xsd:string"/>
+        </all>
+    </complexType>
+    <element name="SOAPWrapper" type="xsd:string"/>
+</schema>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux2.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux2.xsd?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux2.xsd (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importAux2.xsd Mon Feb 25 11:09:01 2008
@@ -0,0 +1,34 @@
+<!--
+  ~ 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.
+  -->
+
+<schema targetNamespace="http://soapinterop.org/xsd2"
+        xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:xsd1="http://soapinterop.org/xsd2"
+        elementFormDefault="qualified">
+    <complexType name="SOAPStruct">
+        <all>
+            <element name="varFloat" type="xsd:float"/>
+            <element name="varInt" type="xsd:int"/>
+            <element name="varString" type="xsd:string"/>
+        </all>
+    </complexType>
+    <element name="SOAPWrapper2" type="xsd:string"/>
+</schema>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBad.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBad.xsd?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBad.xsd (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBad.xsd Mon Feb 25 11:09:01 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.
+  -->
+
+<schema targetNamespace="http://soapinterop.org/xsd"
+        xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:xsd1="http://soapinterop.org/xsd"
+        xmlns:xsd2="http://soapinterop.org/xsd2"
+        elementFormDefault="qualified">
+    <import namespace="http://soapinterop.org/xsd2" schemaLocation="importAux2.xsd"></import>
+    <element name="echoStructParam" type="xsd2:SOAPStruct"/>
+</schema>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBase.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBase.xsd?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBase.xsd (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/importBase.xsd Mon Feb 25 11:09:01 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.
+  -->
+
+<schema targetNamespace="http://soapinterop.org/xsd"
+        xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:xsd1="http://soapinterop.org/xsd"
+        xmlns:xsd2="http://soapinterop.org/xsd2"
+        elementFormDefault="qualified">
+    <import namespace="http://soapinterop.org/xsd2" schemaLocation="importAux.xsd"></import>
+    <element name="echoStructParam" type="xsd2:SOAPStruct"/>
+</schema>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root-catalog.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root-catalog.xml?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root-catalog.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root-catalog.xml Mon Feb 25 11:09:01 2008
@@ -0,0 +1,15 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+   <system
+       systemId="http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+       uri="catalog/schema/application_1_4.xsd" />
+   <system
+       systemId="http://soapinterop.org/xsd2"
+       uri="importAux.xsd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+       uri="catalog/dtd/ejb-jar.dtd" />
+   <public
+       publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+       uri="catalog/dtd/ejb-jar_2_0.dtd" />
+   <nextCatalog catalog="child-catalog.xml"/>
+</catalog>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root.wsdl?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root.wsdl (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/root.wsdl Mon Feb 25 11:09:01 2008
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<wsdl:definitions
+  targetNamespace="http://www.example.com/test/calculator"
+  xmlns:axis2ns1="http://www.example.com/test/calculator"
+  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+  xmlns:msgtypes="http://www.example.com/test/messageTypes"
+  xmlns:ns1="urn:types1"
+  xmlns:ns2="urn:types2"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:import namespace="http://www.example.com/test/messageTypes" location="http://example.com/test/doesnotexist.wsdl"/>
+  
+  <!-- Importing does not actually bring in the messages, just the ability to refer to them.
+       Without the following (duplicated) messages the wsdl definition would not have any messages.
+       However, do use the imported versions of these messages in the operation descriptions below.
+  -->
+  <wsdl:message name="getTotalRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="msgtypes:getTotal" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="getTotalResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="msgtypes:getTotalResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="addRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:add" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="addResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:addResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="clearRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:clear" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="clearResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:clearResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="divideRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:divide" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="divideResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:divideResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="divideByZeroException" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:divideByZeroFault" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="multiplyRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns1:multiply" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="multiplyResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns2:multiplyResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="subtractRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns2:subtract" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:message name="subtractResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:part element="ns2:subtractResponse" name="part1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+  </wsdl:message>
+  <wsdl:portType name="CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:operation name="getTotal" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <wsdl:input message="msgtypes:getTotalRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+      <wsdl:output message="msgtypes:getTotalResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+    </wsdl:operation>
+    <wsdl:operation name="add" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <wsdl:input message="msgtypes:addRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+      <wsdl:output message="msgtypes:addResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+    </wsdl:operation>
+    <wsdl:operation name="clear" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <wsdl:input message="msgtypes:clearRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+      <wsdl:output message="msgtypes:clearResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+    </wsdl:operation>
+    <wsdl:operation name="divide" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <wsdl:input message="msgtypes:divideRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+      <wsdl:output message="msgtypes:divideResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+      <wsdl:fault message="msgtypes:divideByZeroException"
+        name="divideByZeroException" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+    </wsdl:operation>
+    <wsdl:operation name="multiply" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <wsdl:input message="msgtypes:multiplyRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+      <wsdl:output message="msgtypes:multiplyResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+    </wsdl:operation>
+    <wsdl:operation name="subtract" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <wsdl:input message="msgtypes:subtractRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+      <wsdl:output message="msgtypes:subtractResponseMessage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="CalculatorServiceSOAP11Binding"
+    type="axis2ns1:CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <soap:binding style="document"
+      transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+    <wsdl:operation name="getTotal" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <soap:operation soapAction="urn:getTotal" style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      <wsdl:input xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:input>
+      <wsdl:output xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="add" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <soap:operation soapAction="urn:add" style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      <wsdl:input xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:input>
+      <wsdl:output xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="clear" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <soap:operation soapAction="urn:clear" style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      <wsdl:input xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:input>
+      <wsdl:output xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="divide" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <soap:operation soapAction="urn:divide" style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      <wsdl:input xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:input>
+      <wsdl:output xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:output>
+      <wsdl:fault name="divideByZeroException" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:fault body="use" name="divideByZeroException"
+          namespace="http://www.example.com/test/calculator" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:fault>
+    </wsdl:operation>
+    <wsdl:operation name="multiply" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <soap:operation soapAction="urn:multiply" style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      <wsdl:input xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:input>
+      <wsdl:output xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="subtract" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <soap:operation soapAction="urn:subtract" style="document" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      <wsdl:input xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:input>
+      <wsdl:output xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+        <soap:body namespace="http://www.example.com/test/calculator"
+          use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="CalculatorServiceWebService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    <wsdl:port binding="axis2ns1:CalculatorServiceSOAP11Binding"
+      name="CalculatorServiceSOAP11port" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <soap:address location="" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

Added: webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/unique-catalog.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/unique-catalog.xml?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/unique-catalog.xml (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/catalog/unique-catalog.xml Mon Feb 25 11:09:01 2008
@@ -0,0 +1,11 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
+<public publicId="-//OASIS//DTD XML DocBook V4.1.2//EN"
+        uri="docbook/xml/docbookx.dtd"/>
+
+<system systemId="urn:x-oasis:docbook-xml-v4.1.2"
+        uri="docbook/xml/docbookx.dtd"/>
+
+<delegatePublic publicIdStartString="-//Example//"
+          catalog="http://www.example.com/catalog"/>
+</catalog>

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/MultiRedirectionCatalogTest.java Mon Feb 25 11:09:01 2008
@@ -0,0 +1,147 @@
+/*
+ * 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.axis2.jaxws.catalog;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Input;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.Part;
+import javax.wsdl.PortType;
+import javax.wsdl.WSDLException;
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.jaxws.catalog.impl.OASISCatalogManager;
+import org.apache.axis2.jaxws.util.WSDL4JWrapper;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests the use of the Apache Commons Resolver API to resolve URIs.
+ */
+public class MultiRedirectionCatalogTest extends TestCase {
+	private static final String ROOT_WSDL = "/test-resources/catalog/root.wsdl";
+	private static final String TEST_RESOURCES = "test-resources/catalog/";
+	
+	public void testOneCatalogSuccess() {
+		verifySuccess(ROOT_WSDL, TEST_RESOURCES + "basic-catalog.xml");
+	}
+	
+	public void testNextCatalogSuccess() {
+		verifySuccess(ROOT_WSDL, TEST_RESOURCES + "root-catalog.xml");
+	}
+	
+	public void testNextCatalogFailure() {
+		verifyFailure(ROOT_WSDL, TEST_RESOURCES + "fail/root-catalog.xml");		
+	}
+	
+	public void testNoCatEntryForFirstImport() {
+		verifyFailure(ROOT_WSDL, TEST_RESOURCES + "fail/firstImportFail.xml");
+	}
+	
+	public void testNoCatEntryForSecondImport() {
+		verifyFailure(ROOT_WSDL, TEST_RESOURCES + "fail/secondImportFail.xml");
+	}
+	
+	public void testNoCatEntryForThirdImport() {
+		verifyFailure(ROOT_WSDL, TEST_RESOURCES + "fail/thirdImportFail.xml");
+	}
+	
+	/**
+	 * Ensure that the catalog is used to locate imported resources.
+	 */
+	private void verifySuccess(String wsdlLocation, String catalogFile) {
+	    URL url = getURLFromLocatoinString(wsdlLocation);
+	    
+	    try{
+			OASISCatalogManager catalogManager = new OASISCatalogManager();
+			catalogManager.setCatalogFiles(catalogFile);
+	    	WSDL4JWrapper w4j = new WSDL4JWrapper(url, catalogManager);
+	    	Definition wsdlDef = w4j.getDefinition();
+	    	assertNotNull(wsdlDef);   
+	    	QName portTypeName = new QName("http://www.example.com/test/calculator",
+	    			                       "CalculatorService",
+	    			                       "");
+	    	PortType portType = wsdlDef.getPortType(portTypeName);
+	    	assertNotNull(portType);
+	    	Operation clearOp = portType.getOperation("clear", null, null);
+	    	assertNotNull(clearOp);
+	    	Input clearOpInput = clearOp.getInput();
+	    	assertNotNull(clearOpInput);
+	    	Message msg = clearOpInput.getMessage();
+	    	assertNotNull(msg);
+	    	Part expectedPart = msg.getPart("part1");
+            assertNotNull(expectedPart);
+	    }catch(Exception e){
+	    	e.printStackTrace();
+	    	fail();
+	    }
+	}	
+	
+	/**
+	 * Ensure that the test case is valid by failing in the absence of a needed
+	 * catalog entry.
+	 */
+	private void verifyFailure(String wsdlLocation, String catalogFile) {
+	    URL url = getURLFromLocatoinString(wsdlLocation);
+	    
+	    try{
+			OASISCatalogManager catalogManager = new OASISCatalogManager();
+			catalogManager.setCatalogFiles(catalogFile);
+	    	WSDL4JWrapper w4j = new WSDL4JWrapper(url, catalogManager);
+	    	w4j.getDefinition();
+	    	fail("Should have received a WSDLException due to the invalid WSDL location " 
+	        		+ "not redirected by the catalog.");
+	    } catch(WSDLException e) {
+	    	// do nothing - successful test case
+	    } catch(Exception e){
+	    	e.printStackTrace();
+	    	fail();
+	    }
+	}
+	
+	/**
+	 * Given a String representing a file location, return a URL.
+	 * @param wsdlLocation
+	 * @return
+	 */
+	private URL getURLFromLocatoinString(String wsdlLocation) {
+		URL url = null;
+	    try {
+	    	try{
+	        	String baseDir = new File(System.getProperty("basedir",".")).getCanonicalPath();
+	        	wsdlLocation = new File(baseDir + wsdlLocation).getAbsolutePath();
+        	}catch(Exception e){
+        		e.printStackTrace();
+        		fail();
+        	}
+	       	File file = new File(wsdlLocation);
+	       	url = file.toURL();
+	    } catch (MalformedURLException e) {
+	        e.printStackTrace();
+	        fail();
+	    }
+	    
+	    return url;
+	}
+}

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/XMLCatalogTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/XMLCatalogTests.java?rev=630959&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/XMLCatalogTests.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/catalog/XMLCatalogTests.java Mon Feb 25 11:09:01 2008
@@ -0,0 +1,108 @@
+/*
+ * 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.axis2.jaxws.catalog;
+
+import java.io.File;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.axis2.jaxws.catalog.impl.OASISCatalogManager;
+import org.apache.axis2.jaxws.util.CatalogURIResolver;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.w3c.dom.Document;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests the use of the Apache Commons Resolver API to resolve URIs.
+ */
+public class XMLCatalogTests extends TestCase {
+	private static final String TEST_RESOURCES = "test-resources/catalog/";
+	private static final String BASIC_CATALOG = TEST_RESOURCES + "basic-catalog.xml";
+	private static final String IMPORT_BASE = TEST_RESOURCES + "importBase.xsd";
+	private static final String IMPORT_BAD = TEST_RESOURCES + "importBad.xsd";	
+
+    /**
+     * Verify that all the expected conditions are met (the control case).
+     * @throws Exception
+     */
+    public void testSchemaImportNoCatalogNoNeed() throws Exception{
+        File file = new File(IMPORT_BASE);
+        //create a DOM document
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        documentBuilderFactory.setNamespaceAware(true);
+        Document doc = documentBuilderFactory.newDocumentBuilder().
+                parse(file.toURL().toString());
+
+        XmlSchemaCollection schemaCol = new XmlSchemaCollection();
+        XmlSchema schema = schemaCol.read(doc,file.toURL().toString(),null);
+        assertNotNull(schema);
+
+        assertNotNull(schema.getTypeByName(new QName("http://soapinterop.org/xsd2","SOAPStruct")));
+        assertNotNull(schema.getElementByName(new QName("http://soapinterop.org/xsd2","SOAPWrapper")));
+    }
+    
+    /**
+     * Verify that the element is not present when using IMPORT_BAD in the 
+     * absence of a CatalogManager.
+     * @throws Exception
+     */
+    public void testSchemaImportCatalogNeedNotPresent() throws Exception{
+        File file = new File(IMPORT_BAD);
+        //create a DOM document
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        documentBuilderFactory.setNamespaceAware(true);
+        Document doc = documentBuilderFactory.newDocumentBuilder().
+                parse(file.toURL().toString());
+
+        XmlSchemaCollection schemaCol = new XmlSchemaCollection();
+        XmlSchema schema = schemaCol.read(doc,file.toURL().toString(),null);
+        assertNotNull(schema);
+
+        assertNotNull(schema.getTypeByName(new QName("http://soapinterop.org/xsd2","SOAPStruct")));
+        assertNull(schema.getElementByName(new QName("http://soapinterop.org/xsd2","SOAPWrapper")));
+    }
+    
+    /**
+     * Verify that the element is present using IMPORT_BAD if the XML Resolver 
+     * is used.  This test is for a simple, single-file catalog.
+     * @throws Exception
+     */
+    public void testSchemaImportBasicCatalog() throws Exception{
+		OASISCatalogManager catalogManager = new OASISCatalogManager();
+		catalogManager.setCatalogFiles(BASIC_CATALOG);
+		
+        File file = new File(IMPORT_BAD);
+        //create a DOM document
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        documentBuilderFactory.setNamespaceAware(true);
+        Document doc = documentBuilderFactory.newDocumentBuilder().
+                parse(file.toURL().toString());
+
+        XmlSchemaCollection schemaCol = new XmlSchemaCollection();
+        schemaCol.setSchemaResolver(new CatalogURIResolver(catalogManager));
+        XmlSchema schema = schemaCol.read(doc,file.toURL().toString(),null);
+        assertNotNull(schema);
+
+        assertNotNull(schema.getTypeByName(new QName("http://soapinterop.org/xsd2","SOAPStruct")));
+        assertNotNull(schema.getElementByName(new QName("http://soapinterop.org/xsd2","SOAPWrapper")));
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org