cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1408890 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Date Tue, 13 Nov 2012 18:54:59 GMT
Author: dkulp
Date: Tue Nov 13 18:54:59 2012
New Revision: 1408890

URL: http://svn.apache.org/viewvc?rev=1408890&view=rev
Log:
[CXF-4630] With the latest XmlSchema code, you cannot set the element name to null after it's
been set.  Thus, only set the name if we really intend to.

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=1408890&r1=1408889&r2=1408890&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue Nov 13 18:54:59 2012
@@ -1297,14 +1297,13 @@ public class ReflectionServiceFactoryBea
 
         for (MessagePartInfo mpi : unwrappedMessage.getMessageParts()) {
             el = new XmlSchemaElement(schema, Boolean.TRUE.equals(mpi.getProperty(HEADER)));
-            // We hope that we can't have parts that different only in namespace.
-            el.setName(mpi.getName().getLocalPart());
             Map<Class<?>, Boolean> jaxbAnnoMap = getJaxbAnnoMap(mpi);
             if (mpi.isElement()) {
                 addImport(schema, mpi.getElementQName().getNamespaceURI());
-                el.setName(null);
                 XmlSchemaUtils.setElementRefName(el, mpi.getElementQName());
             } else {
+                // We hope that we can't have parts that different only in namespace.
+                el.setName(mpi.getName().getLocalPart());
                 if (mpi.getTypeQName() != null && !jaxbAnnoMap.containsKey(XmlList.class))
{
                     el.setSchemaTypeName(mpi.getTypeQName());
                     addImport(schema, mpi.getTypeQName().getNamespaceURI());



Mime
View raw message