cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sea...@apache.org
Subject svn commit: r691965 - in /cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test: java/org/apache/cxf/tools/wsdlto/jaxws/ resources/wsdl2java_wsdl/cxf1662/
Date Thu, 04 Sep 2008 11:15:36 GMT
Author: seanoc
Date: Thu Sep  4 04:15:35 2008
New Revision: 691965

URL: http://svn.apache.org/viewvc?rev=691965&view=rev
Log:
fix for cxf-1662

Added:
    cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/
    cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child.wsdl
    cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child2.wsdl
    cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test.wsdl
    cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test2.wsdl
Modified:
    cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java

Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=691965&r1=691964&r2=691965&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Thu Sep  4 04:15:35 2008
@@ -36,6 +36,7 @@
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.tools.common.ProcessorTestBase;
 import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.util.AnnotationUtil;
 import org.apache.cxf.tools.wsdlto.WSDLToJava;
 import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
@@ -81,7 +82,7 @@
         //processor = null;
         env = null;
     }
-    
+
     @Test
     // Test for CXF-1678
     public void testLogicalOnlyWSDL() throws Exception {
@@ -1055,4 +1056,30 @@
         }
     }
     
+    @Test
+    public void testCXF1662() throws Exception {
+        String[] args = new String[] {"-d", output.getCanonicalPath(), "-p", "org.cxf",
+                getLocation("/wsdl2java_wsdl/cxf1662/test.wsdl")};
+
+        try {
+            WSDLToJava.main(args);
+        } catch (ToolException tex) {
+            assertTrue(tex.getMessage().contains(" -p option cannot be used when "
+                + "wsdl contains mutiple schemas"));
+        }    
+        
+        
+        String[] args2 = new String[] {"-d", output.getCanonicalPath(), "-p", "org.cxf",
+                getLocation("/wsdl2java_wsdl/cxf1662/test2.wsdl")};       
+        try {
+            WSDLToJava.main(args2);
+        } catch (ToolException tex) {
+            assertNull(tex);
+        }
+        assertNotNull(output);
+        File file = new File(output, "org/cxf/package-info.java");
+        assertTrue(file.exists());
+        String str = FileUtils.getStringFromFile(file);
+        assertTrue(str.contains("http://child/xsd"));
+    }   
 }

Added: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child.wsdl?rev=691965&view=auto
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child.wsdl
(added)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child.wsdl
Thu Sep  4 04:15:35 2008
@@ -0,0 +1,39 @@
+<wsdl:definitions name="Child"
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:tns="http://child/"
+  xmlns:xsd="http://child/xsd"
+  targetNamespace="http://child/">
+  <wsdl:types>
+    <xs:schema targetNamespace="http://child/xsd">
+      <xs:element name="Message">
+        <xs:complexType>
+          <xs:sequence/>
+        </xs:complexType>
+      </xs:element>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="Message">
+    <wsdl:part name="msg" element="xsd:Message"/>
+  </wsdl:message>
+  <wsdl:portType name="PortType">
+    <wsdl:operation name="Operation">
+      <wsdl:input message="tns:Message"/>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="Binding" type="tns:PortType">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"
/>
+    <wsdl:operation name="Operation">
+      <soap:operation style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="Service">
+        <wsdl:port name="Port" binding="tns:Binding">
+            <soap:address location="http://localhost/service" />
+        </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child2.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child2.wsdl?rev=691965&view=auto
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child2.wsdl
(added)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/child2.wsdl
Thu Sep  4 04:15:35 2008
@@ -0,0 +1,39 @@
+<wsdl:definitions name="Child2"
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:tns="http://child2/"
+  xmlns:xsd="http://child2/xsd"
+  targetNamespace="http://child2/">
+  <wsdl:types>
+    <xs:schema targetNamespace="http://child2/xsd">
+      <xs:element name="Child2Message">
+        <xs:complexType>
+          <xs:sequence/>
+        </xs:complexType>
+      </xs:element>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="Child2Message">
+    <wsdl:part name="msg" element="xsd:Child2Message"/>
+  </wsdl:message>
+  <wsdl:portType name="Child2PortType">
+    <wsdl:operation name="Child2Operation">
+      <wsdl:input message="tns:Child2Message"/>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="Child2Binding" type="tns:Child2PortType">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"
/>
+    <wsdl:operation name="Child2Operation">
+      <soap:operation style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="Child2Service">
+        <wsdl:port name="Child2Port" binding="tns:Child2Binding">
+            <soap:address location="http://localhost/service/child2" />
+        </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test.wsdl?rev=691965&view=auto
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test.wsdl
(added)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test.wsdl
Thu Sep  4 04:15:35 2008
@@ -0,0 +1,4 @@
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Parent">
+    <wsdl:import namespace="http://child/" location="child.wsdl" />
+    <wsdl:import namespace="http://child2/" location="child2.wsdl" />
+</wsdl:definitions>
\ No newline at end of file

Added: cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test2.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test2.wsdl?rev=691965&view=auto
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test2.wsdl
(added)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1662/test2.wsdl
Thu Sep  4 04:15:35 2008
@@ -0,0 +1,3 @@
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Parent">
+    <wsdl:import namespace="http://child/" location="child.wsdl" />
+</wsdl:definitions>
\ No newline at end of file



Mime
View raw message