cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1148955 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/ tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/ tools/wadlto/jaxrs/src/test/resources/wadl/
Date Wed, 20 Jul 2011 22:20:37 GMT
Author: sergeyb
Date: Wed Jul 20 22:20:36 2011
New Revision: 1148955

URL: http://svn.apache.org/viewvc?rev=1148955&view=rev
Log:
[CXF-3664] Fixing wadl source generator to match generated type names better

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
    cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
    cxf/trunk/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java?rev=1148955&r1=1148954&r2=1148955&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
Wed Jul 20 22:20:36 2011
@@ -738,7 +738,7 @@ public class SourceGenerator {
         if (localName == null) {
             return null;
         }
-        String clsName = packageName + "." + localName;
+        String clsName = packageName + "." + localName.toLowerCase();
         for (String type : typeClassNames) {
             if (type.toLowerCase().equals(clsName)) {
                 return type;

Modified: cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java?rev=1148955&r1=1148954&r2=1148955&view=diff
==============================================================================
--- cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
(original)
+++ cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
Wed Jul 20 22:20:36 2011
@@ -389,7 +389,7 @@ public class JAXRSContainerTest extends 
     
     private void doVerifyTypes(List<File> files, String schemaPackage, String ext)
{
         assertTrue(checkContains(files, schemaPackage + ".Book." + ext));
-        assertTrue(checkContains(files, schemaPackage + ".Book2." + ext));
+        assertTrue(checkContains(files, schemaPackage + ".TheBook2." + ext));
         assertTrue(checkContains(files, schemaPackage + ".Chapter." + ext));
         assertTrue(checkContains(files, schemaPackage + ".ObjectFactory." + ext));
         assertTrue(checkContains(files, schemaPackage + ".package-info." + ext));

Modified: cxf/trunk/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml?rev=1148955&r1=1148954&r2=1148955&view=diff
==============================================================================
--- cxf/trunk/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml (original)
+++ cxf/trunk/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml Wed Jul 20 22:20:36
2011
@@ -24,7 +24,7 @@
         xmlns:tns="http://superbooks" attributeFormDefault="unqualified" elementFormDefault="unqualified"

         targetNamespace="http://superbooks">
     <xs:element name="thebook" type="tns:book"/>
-    <xs:element name="thebook2" type="tns:book2"/>
+    <xs:element name="theBook2" type="tns:theBook2"/>
     <xs:element name="thechapter" type="tns:chapter"/>
     <xs:complexType name="book">
         <xs:sequence>
@@ -37,7 +37,7 @@
             <xs:element name="id" type="xs:int"/>
         </xs:sequence>
     </xs:complexType>
-    <xs:complexType name="book2">
+    <xs:complexType name="theBook2">
         <xs:sequence>
             <xs:element name="id" type="xs:int"/>
             <xs:element minOccurs="0" name="name" type="xs:string"/>
@@ -76,7 +76,7 @@
     <resource path="/book2">
      <method name="GET" id="getBook2">
       <response>
-       <representation mediaType="application/xml" element="prefix1:thebook2"/>
+       <representation mediaType="application/xml" element="prefix1:theBook2"/>
        <representation mediaType="application/json"/>
       </response>
      </method>
@@ -100,7 +100,7 @@
        <param name="provider.bar" style="query" type="xs:int"/>
        <param name="a" style="query" repeating="true" type="xs:string"/>
 
-       <representation mediaType="application/xml" element="prefix1:thebook2">
+       <representation mediaType="application/xml" element="prefix1:theBook2">
         <doc>InputBook</doc>
        </representation>
        <representation mediaType="application/json">



Mime
View raw message