cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r578658 - in /incubator/cxf/trunk/tools/wsdlto/test/src/test: java/org/apache/cxf/tools/wsdlto/jaxws/ resources/wsdl2java_wsdl/cxf1053/
Date Mon, 24 Sep 2007 05:17:12 GMT
Author: mmao
Date: Sun Sep 23 22:17:10 2007
New Revision: 578658

URL: http://svn.apache.org/viewvc?rev=578658&view=rev
Log:
CXF-1053
 * Add user test case


Added:
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/catalog.xml
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/extra.xsd
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/myservice.wsdl
Modified:
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenOptionTest.java

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenOptionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenOptionTest.java?rev=578658&r1=578657&r2=578658&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenOptionTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenOptionTest.java
Sun Sep 23 22:17:10 2007
@@ -144,4 +144,20 @@
             fail("Catalog not working");
         }
     }
+
+    @Test
+    public void testGetCatalogPublic() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/cxf1053/myservice.wsdl"));
+        env.put(ToolConstants.CFG_CATALOG, getLocation("/wsdl2java_wsdl/cxf1053/catalog.xml"));
+        env.put(ToolConstants.CFG_COMPILE, null);
+        env.put(ToolConstants.CFG_CLASSDIR, null);
+
+        processor.setContext(env);
+        try {
+            processor.execute();
+        } catch (Exception e) {
+            e.printStackTrace();
+            fail("Catalog not working");
+        }
+    }
 }

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/catalog.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/catalog.xml?rev=578658&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/catalog.xml
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/catalog.xml
Sun Sep 23 22:17:10 2007
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+    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.
+-->
+
+<!DOCTYPE catalog
+PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
+"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+
+<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+    <rewriteURI rewritePrefix="./extra.xsd" uriStartString="http://www.company.com/extra.xsd"/>
+</catalog>

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/extra.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/extra.xsd?rev=578658&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/extra.xsd
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/extra.xsd
Sun Sep 23 22:17:10 2007
@@ -0,0 +1,57 @@
+<?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.
+-->
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.company.com/extra"
xmlns="http://www.company.com/extra"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+    <xs:element name="extraByNameAndTypeRequest">
+        <xs:annotation>
+            <xs:documentation>Request all or Request by name</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="name" type="xs:string"/>
+                <xs:element name="type" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="extraByNameAndTypeResponse">
+        <xs:annotation>
+            <xs:documentation>Response to extra request</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:choice>
+                <xs:element name="id" type="xs:string"/>
+            </xs:choice>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="extraError" type="extraErrorComplexType"/>
+    <xs:complexType name="extraErrorComplexType">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="1" name="message" nillable="false" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Error message.</xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+</xs:schema>

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/myservice.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/myservice.wsdl?rev=578658&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/myservice.wsdl
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1053/myservice.wsdl
Sun Sep 23 22:17:10 2007
@@ -0,0 +1,77 @@
+<?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 name="myservice" targetNamespace="http://www.company.com/MyService"

+    xmlns:tns="http://www.company.com/MyService"
+    xmlns:extra="http://www.company.com/extra" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+    
+    <wsdl:types>
+        <xsd:schema>
+            <xsd:import namespace="http://www.company.com/extra" schemaLocation="http://www.company.com/extra.xsd"/>
+        </xsd:schema>
+    </wsdl:types>
+    
+    <wsdl:message name="extraFault">
+        <wsdl:part name="fault" element="extra:extraError" />
+    </wsdl:message>
+    
+    <wsdl:message name="extraRequest">
+        <wsdl:part name="parameters" element="extra:extraByNameAndTypeRequest"/>
+    </wsdl:message>
+    
+    <wsdl:message name="extraResponse">
+        <wsdl:part name="parameters" element="extra:extraByNameAndTypeResponse" />
+    </wsdl:message>
+    
+    <wsdl:portType name="myManager">
+        <wsdl:operation name="extraSearch">
+            <wsdl:input  name="extraRequest"  message="tns:extraRequest" />
+            <wsdl:output name="extraResponse" message="tns:extraResponse" />
+            <wsdl:fault  name="extraFault"    message="tns:extraFault" />
+        </wsdl:operation>
+    </wsdl:portType>
+    
+    <wsdl:binding name="myServiceSoapBinding" type="tns:myManager">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"
/>
+        
+        <wsdl:operation name="extraSearch">
+            <soap:operation soapAction="" style="document" />
+            <wsdl:input name="extraRequest">
+                <soap:body use="literal" />
+            </wsdl:input>
+            <wsdl:output name="extraResponse">
+                <soap:body use="literal" />
+            </wsdl:output>
+            <wsdl:fault name="extraFault">
+                <soap:fault name="extraFault" use="literal" />
+            </wsdl:fault>
+        </wsdl:operation>
+        
+    </wsdl:binding>
+    
+    <wsdl:service name="MyService">
+        <wsdl:port name="MyService" binding="tns:myServiceSoapBinding">
+            <soap:address location="http://localhost:8080/MyServiceServer/services/myServiceServer"
/>
+        </wsdl:port>
+    </wsdl:service>
+    
+</wsdl:definitions>
\ No newline at end of file



Mime
View raw message