cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1210878 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/ tools/wadlto/jaxrs/src/test/resources/wadl/ tools/wadlto/jaxrs/src/test/resources/wadl/schemas/
Date Tue, 06 Dec 2011 11:59:47 GMT
Author: sergeyb
Date: Tue Dec  6 11:59:47 2011
New Revision: 1210878

URL: http://svn.apache.org/viewvc?rev=1210878&view=rev
Log:
Merged revisions 1210875 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1210875 | sergeyb | 2011-12-06 11:57:25 +0000 (Tue, 06 Dec 2011) | 1 line
  
  [CXF-3953] Checking for JAXB types with underscore characters
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
    cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/jaxbBindingWithSchemaLoc.xml
    cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/schemas/book.xsd

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1210875

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java?rev=1210878&r1=1210877&r2=1210878&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
Tue Dec  6 11:59:47 2011
@@ -984,8 +984,11 @@ public class SourceGenerator {
                                       Set <String> typeClassNames) {
         String clsName = matchClassName(typeClassNames, packageName, localName);
         if (clsName == null && gInfo != null) {
-            clsName = matchClassName(typeClassNames, packageName, 
-                                   gInfo.getElementTypeMap().get(localName));
+            String elementTypeName = gInfo.getElementTypeMap().get(localName);
+            clsName = matchClassName(typeClassNames, packageName, elementTypeName);
+            if (clsName == null && elementTypeName != null && elementTypeName.contains("_"))
{
+                clsName = matchClassName(typeClassNames, packageName, elementTypeName.replaceAll("_",
""));
+            }
         }
         if (clsName == null && schemaTypesMap != null) {
             clsName = schemaTypesMap.get(packageName + "." + localName);

Modified: cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/jaxbBindingWithSchemaLoc.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/jaxbBindingWithSchemaLoc.xml?rev=1210878&r1=1210877&r2=1210878&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/jaxbBindingWithSchemaLoc.xml
(original)
+++ cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/jaxbBindingWithSchemaLoc.xml
Tue Dec  6 11:59:47 2011
@@ -20,7 +20,7 @@
 	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
 	schemaLocation="schemas/book.xsd"
-	node="//xs:complexType[@name='theBook2']/xs:sequence/xs:element[@name='id']">
+	node="//xs:complexType[@name='theBook_2']/xs:sequence/xs:element[@name='id']">
 	<jaxb:property name="book2Id"/>
 </jaxb:bindings>
 

Modified: cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/schemas/book.xsd
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/schemas/book.xsd?rev=1210878&r1=1210877&r2=1210878&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/schemas/book.xsd (original)
+++ cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/schemas/book.xsd Tue
Dec  6 11:59:47 2011
@@ -28,7 +28,7 @@
             <xs:element name="id" type="xs:int"/>
         </xs:sequence>
     </xs:complexType>
-    <xs:complexType name="theBook2">
+    <xs:complexType name="theBook_2">
         <xs:sequence>
             <xs:element name="id" type="xs:int"/>
             <xs:element minOccurs="0" name="name" type="xs:string"/>



Mime
View raw message