You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by jl...@apache.org on 2007/04/20 07:57:20 UTC
svn commit: r530660 - in
/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws:
./ expected/
Author: jliu
Date: Thu Apr 19 22:57:19 2007
New Revision: 530660
URL: http://svn.apache.org/viewvc?view=rev&rev=530660
Log:
Filed more bugs (non-critical though) on javatowsdl, added test cases.
Added:
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl (with props)
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl (with props)
Modified:
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?view=diff&rev=530660&r1=530659&r2=530660
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java (original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java Thu Apr 19 22:57:19 2007
@@ -92,7 +92,7 @@
@Test
- public void testDocLit() throws Exception {
+ public void testDocLitWrapped() throws Exception {
builder.setServiceClass(org.apache.hello_world_doc_lit.Greeter.class);
ServiceInfo service = builder.build();
generator.setServiceModel(service);
@@ -105,6 +105,42 @@
.getFile();
assertFileEquals(expectedFile, output.getAbsolutePath());
}
+
+ @Test
+ //FIXME CXF-561: generated duplicate scheams because @RequestWrapper does not
+ //contain namespace
+ public void testDocWrappedWithLocalName() throws Exception {
+ builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.Stock.class);
+ ServiceInfo service = builder.build();
+
+ generator.setServiceModel(service);
+ File output = getOutputFile("doc_lit_wrapped_localName.wsdl");
+ assertNotNull(output);
+ generator.generate(output);
+ assertTrue(output.exists());
+
+ String expectedFile = this.getClass().getResource("expected/expected_doc_lit_wrapped_localName.wsdl")
+ .getFile();
+ assertFileEquals(expectedFile, output.getAbsolutePath());
+ }
+
+ @Test
+ //FIXME CXF-561: generated duplicate scheams because @RequestWrapper does not
+ //contain namespace
+ public void testDocWrappedNoWebParam() throws Exception {
+ builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.HelloWithNoWebParam.class);
+ ServiceInfo service = builder.build();
+
+ generator.setServiceModel(service);
+ File output = getOutputFile("doc_lit_wrapped_no_webparam.wsdl");
+ assertNotNull(output);
+ generator.generate(output);
+ assertTrue(output.exists());
+
+ String expectedFile = this.getClass()
+ .getResource("expected/expected_doc_lit_wrapped_no_webparam.wsdl").getFile();
+ assertFileEquals(expectedFile, output.getAbsolutePath());
+ }
@Test
public void testAsync() throws Exception {
@@ -182,35 +218,6 @@
generator.generate(file);
assertTrue(output.exists());
- }
-
- // TODO:
- @Test
- @Ignore
- public void testDocWrappedWithLocalName() throws Exception {
- builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.Stock.class);
- ServiceInfo service = builder.build();
-
- generator.setServiceModel(service);
- File file = getOutputFile("doc_lit_wrapped_localName.wsdl");
- assertNotNull(output);
- generator.generate(file);
- assertTrue(output.exists());
-
- }
-
- // TODO:
- @Test
- @Ignore
- public void testDocWrappedNoWebParam() throws Exception {
- builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.HelloWithNoWebParam.class);
- ServiceInfo service = builder.build();
-
- generator.setServiceModel(service);
- File file = getOutputFile("doc_lit_wrapped_webparam.wsdl");
- assertNotNull(output);
- generator.generate(file);
- assertTrue(output.exists());
}
@Test
Added: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl?view=auto&rev=530660
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl (added)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl Thu Apr 19 22:57:19 2007
@@ -0,0 +1,88 @@
+<!--
+ 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.
+-->
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="StockService" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:ns1="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cxf.com/" version="1.0">
+<xs:element name="getPrice">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="responseType" type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="getPriceResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="responseType" type="xs:float"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+</xs:schema>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://doc.withannotation.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/">
+<xsd:element name="getPrice">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="arg0" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="getPriceResponse">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="return" nillable="true" type="xsd:float"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+</xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="getPriceResponse">
+ <wsdl:part name="getPriceResponse" element="ns1:getPriceResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getPrice">
+ <wsdl:part name="getPrice" element="ns1:getPrice">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="Stock">
+ <wsdl:operation name="getPrice">
+ <wsdl:input name="getPrice" message="ns1:getPrice">
+ </wsdl:input>
+ <wsdl:output name="getPriceResponse" message="ns1:getPriceResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="StockServiceSoapBinding" type="ns1:Stock">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getPrice">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="getPrice">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getPriceResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="StockService">
+ <wsdl:port name="StockPort" binding="ns1:StockServiceSoapBinding">
+ <soap:address location="http://localhost:9090"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Propchange: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl?view=auto&rev=530660
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl (added)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl Thu Apr 19 22:57:19 2007
@@ -0,0 +1,80 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="HelloWithNoWebParamService" targetNamespace="http://apache.org/" xmlns:ns1="http://apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://doc.withannotation.fortest.tools.cxf.apache.org/" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/" version="1.0">
+<xs:element name="sayHi" type="tns:sayHi"/>
+<xs:element name="sayHiResponse" type="tns:sayHiResponse"/>
+<xs:complexType name="sayHi">
+<xs:sequence>
+<xs:element name="arg0" type="xs:long"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="sayHiResponse"/>
+</xs:schema>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://apache.org/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://apache.org/">
+<xsd:element name="sayHi">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="arg0" nillable="true" type="xsd:long"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="sayHiResponse">
+<xsd:complexType>
+<xsd:sequence/>
+</xsd:complexType>
+</xsd:element>
+</xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="sayHiResponse">
+ <wsdl:part name="sayHiResponse" element="ns1:sayHiResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="sayHi">
+ <wsdl:part name="sayHi" element="ns1:sayHi">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="Hello">
+ <wsdl:operation name="sayHi">
+ <wsdl:input name="sayHi" message="ns1:sayHi">
+ </wsdl:input>
+ <wsdl:output name="sayHiResponse" message="ns1:sayHiResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="HelloWithNoWebParamServiceSoapBinding" type="ns1:Hello">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sayHi">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="sayHi">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sayHiResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloWithNoWebParamService">
+ <wsdl:port name="HelloWithNoWebParamPort" binding="ns1:HelloWithNoWebParamServiceSoapBinding">
+ <soap:address location="http://localhost:9090"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Propchange: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml