You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/08/01 20:30:02 UTC

svn commit: r1368174 - /cxf/branches/2.4.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java

Author: dkulp
Date: Wed Aug  1 18:30:02 2012
New Revision: 1368174

URL: http://svn.apache.org/viewvc?rev=1368174&view=rev
Log:
Merged revisions 1368165 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1368165 | dkulp | 2012-08-01 14:28:07 -0400 (Wed, 01 Aug 2012) | 18 lines

  Merged revisions 1368111 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

  ........
    r1368111 | dkulp | 2012-08-01 12:42:26 -0400 (Wed, 01 Aug 2012) | 10 lines

    Merged revisions 1368099 via  git cherry-pick from
    https://svn.apache.org/repos/asf/cxf/trunk

    ........
      r1368099 | dkulp | 2012-08-01 12:24:12 -0400 (Wed, 01 Aug 2012) | 2 lines

      [CXF-4449] Make sure the xmlbinding root elements are qualified

    ........

  ........

........

Modified:
    cxf/branches/2.4.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java

Modified: cxf/branches/2.4.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java?rev=1368174&r1=1368173&r2=1368174&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java (original)
+++ cxf/branches/2.4.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java Wed Aug  1 18:30:02 2012
@@ -41,6 +41,8 @@ import org.apache.cxf.interceptor.URIMap
 import org.apache.cxf.interceptor.WrappedOutInterceptor;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.MessageInfo;
+import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 
@@ -84,7 +86,9 @@ public class XMLBindingFactory extends A
         info.setName(new QName(service.getName().getNamespaceURI(), 
                                service.getName().getLocalPart() + "XMLBinding"));
 
-        for (OperationInfo op : service.getInterface().getOperations()) {                       
+        for (OperationInfo op : service.getInterface().getOperations()) {
+            adjustConcreteNames(op.getInput());
+            adjustConcreteNames(op.getOutput());
             BindingOperationInfo bop = 
                 info.buildOperation(op.getName(), op.getInputName(), op.getOutputName());
             info.addOperation(bop);
@@ -93,4 +97,14 @@ public class XMLBindingFactory extends A
         return info;
     }
 
+    private void adjustConcreteNames(MessageInfo mi) {
+        if (mi != null) {
+            for (MessagePartInfo mpi : mi.getMessageParts()) {
+                if (!mpi.isElement()) {
+                    //if it's not an element, we need to make it one
+                    mpi.setElementQName(mpi.getName());
+                }
+            }
+        }
+    }
 }