cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1408892 - /cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Date Tue, 13 Nov 2012 19:04:05 GMT
Author: dkulp
Date: Tue Nov 13 19:04:05 2012
New Revision: 1408892

URL: http://svn.apache.org/viewvc?rev=1408892&view=rev
Log:
Merged revisions 1408890 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1408890 | dkulp | 2012-11-13 13:54:59 -0500 (Tue, 13 Nov 2012) | 2 lines

  [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/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=1408892&r1=1408891&r2=1408892&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue Nov 13 19:04:05 2012
@@ -1298,14 +1298,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