cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r530684 - in /incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor: JavaToWSDLProcessorTest.java internal/jaxws/JaxwsServiceBuilderTest.java internal/jaxws/expected/expected_holder.wsdl
Date Fri, 20 Apr 2007 08:12:00 GMT
Author: jliu
Date: Fri Apr 20 01:11:59 2007
New Revision: 530684

URL: http://svn.apache.org/viewvc?view=rev&rev=530684
Log:
Added javatowsdl test case for holder, filed jira CXF-564

Added:
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl
  (with props)
Modified:
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
    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/JavaToWSDLProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java?view=diff&rev=530684&r1=530683&r2=530684
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
Fri Apr 20 01:11:59 2007
@@ -53,6 +53,7 @@
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class JavaToWSDLProcessorTest extends ProcessorTestBase {
@@ -485,5 +486,24 @@
         env.put(ToolConstants.CFG_WSDLURL, output.getCanonicalPath() + "/cxf188.wsdl");
         wj2Processor.setContext(env);
         wj2Processor.execute();
+    }
+
+    @Test
+    @Ignore
+    public void testHolder() throws Exception {
+        env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/holder.wsdl");
+        env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.holder.HolderService");
+        j2wProcessor.setEnvironment(env);
+        try {
+            j2wProcessor.process();
+            File wsdlFile = new File(output, "holder.wsdl");
+            assertTrue(wsdlFile.exists());
+            assertTrue("WSDL file: " + wsdlFile.toString() + " is empty", wsdlFile.length()
> 0);
+        } catch (ToolException e) {
+            String expected = "org.apache.cxf.tools.fortest.holder.HolderService";
+            assertTrue(e.getMessage().contains(expected));
+        } catch (Exception e) {
+            fail("Should not happen other exception " + e.getMessage());
+        }
     }
 }

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=530684&r1=530683&r2=530684
==============================================================================
--- 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
Fri Apr 20 01:11:59 2007
@@ -143,6 +143,24 @@
     }
     
     @Test
+    //FIXME: CXF-564, generated wsdl is invalid -
+    //"invalid XML schema: "header" must refer to an existing element"
+    public void testHolder() throws Exception {
+        builder.setServiceClass(org.apache.cxf.tools.fortest.holder.HolderService.class);
+        ServiceInfo service = builder.build();
+
+        generator.setServiceModel(service);
+        File output = getOutputFile("holder.wsdl");
+        assertNotNull(output);
+        generator.generate(output);
+        assertTrue(output.exists());
+
+        String expectedFile = this.getClass()
+            .getResource("expected/expected_holder.wsdl").getFile();
+        assertFileEquals(expectedFile, output.getAbsolutePath());
+    }
+    
+    @Test
     public void testAsync() throws Exception {
         builder.setServiceClass(org.apache.hello_world_async_soap_http.GreeterAsync.class);
         ServiceInfo service = builder.build();

Added: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.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_holder.wsdl?view=auto&rev=530684
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl
(added)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl
Fri Apr 20 01:11:59 2007
@@ -0,0 +1,156 @@
+<!--
+  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="HolderServiceService" targetNamespace="http://holder.fortest.tools.cxf.apache.org/"
xmlns:ns1="http://holder.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>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://holder.fortest.tools.cxf.apache.org/"
attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://holder.fortest.tools.cxf.apache.org/">
+<xsd:element name="echo">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="arg0" nillable="true" type="xsd:string"/>
+<xsd:element name="arg1" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="echoResponse">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="return" nillable="true" type="xsd:string"/>
+<xsd:element name="return1" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="echo3">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element nillable="true" ref="header"/>
+<xsd:element name="arg1" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="echo3Response">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="return" nillable="true" type="xsd:string"/>
+<xsd:element nillable="true" ref="header"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="echo2">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="arg0" nillable="true" type="xsd:string"/>
+<xsd:element name="arg1" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="echo2Response">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="return" nillable="true" type="xsd:string"/>
+<xsd:element name="return1" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+</xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="echo">
+    <wsdl:part name="echo" element="ns1:echo">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="echo3Response">
+    <wsdl:part name="echo3Response" element="ns1:echo3Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="echo2">
+    <wsdl:part name="echo2" element="ns1:echo2">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="echoResponse">
+    <wsdl:part name="echoResponse" element="ns1:echoResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="echo2Response">
+    <wsdl:part name="echo2Response" element="ns1:echo2Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="echo3">
+    <wsdl:part name="echo3" element="ns1:echo3">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="HolderService">
+    <wsdl:operation name="echo">
+      <wsdl:input name="echo" message="ns1:echo">
+    </wsdl:input>
+      <wsdl:output name="echoResponse" message="ns1:echoResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="echo3">
+      <wsdl:input name="echo3" message="ns1:echo3">
+    </wsdl:input>
+      <wsdl:output name="echo3Response" message="ns1:echo3Response">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="echo2">
+      <wsdl:input name="echo2" message="ns1:echo2">
+    </wsdl:input>
+      <wsdl:output name="echo2Response" message="ns1:echo2Response">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="HolderServiceServiceSoapBinding" type="ns1:HolderService">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="echo">
+      <soap:operation soapAction="" style="document"/>
+      <wsdl:input name="echo">
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="echoResponse">
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="echo2">
+      <soap:operation soapAction="" style="document"/>
+      <wsdl:input name="echo2">
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="echo2Response">
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="echo3">
+      <soap:operation soapAction="" style="document"/>
+      <wsdl:input name="echo3">
+        <soap:header message="ns1:echo3" part="header" use="literal">
+        </soap:header>
+        <soap:body parts="echo3" use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="echo3Response">
+        <soap:header message="ns1:echo3Response" part="header" use="literal">
+        </soap:header>
+        <soap:body parts="echo3Response" use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="HolderServiceService">
+    <wsdl:port name="HolderServicePort" binding="ns1:HolderServiceServiceSoapBinding">
+      <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_holder.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_holder.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message