cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r777226 - in /cxf/branches/2.1.x-fixes: ./ rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
Date Thu, 21 May 2009 19:23:18 GMT
Author: dkulp
Date: Thu May 21 19:23:18 2009
New Revision: 777226

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

........
  r777224 | dkulp | 2009-05-21 15:19:25 -0400 (Thu, 21 May 2009) | 3 lines
  
  [CXF-2228] Problem with the rootNode attribute on the xmlbinding stuff
  not being consitent with single part messages between reading and
  writing
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 21 19:23:18 2009
@@ -1 +1 @@
-/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189
+/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224

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

Modified: cxf/branches/2.1.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java?rev=777226&r1=777225&r2=777226&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
Thu May 21 19:23:18 2009
@@ -108,7 +108,6 @@
                                                          BindingInfo bi, 
                                                          XMLStreamReader xsr) {
 
-        BindingOperationInfo match = null;
         for (BindingOperationInfo boi : bi.getOperations()) {
             BindingMessageInfo bmi;
             if (!isRequestor) {
@@ -118,41 +117,39 @@
             }
             
             if (hasRootNode(bmi, startQName)) {
-                match = boi;
                 //Consume The rootNode tag
                 try {
                     xsr.nextTag();
                 } catch (XMLStreamException xse) {
                     throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC",
LOG));
                 }
+                return boi;
             } else {
                 Collection<MessagePartInfo> bodyParts = bmi.getMessageParts();
                 if (bodyParts.size() == 1) {
                     MessagePartInfo p = bodyParts.iterator().next();
                     if (p.getConcreteName().equals(startQName)) {
-                        match = boi;
+                        return boi;
                     }
                 }
             }
         }
-        if (match == null) {
-            for (BindingOperationInfo boi : bi.getOperations()) {
-                if (startQName.equals(boi.getName())) {
-                    match = boi;
-                    //Consume The rootNode tag
-                    try {
-                        xsr.nextTag();
-                    } catch (XMLStreamException xse) {
-                        throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC",
LOG));
-                    }
+        for (BindingOperationInfo boi : bi.getOperations()) {
+            if (startQName.equals(boi.getName())) {
+                //Consume The rootNode tag
+                try {
+                    xsr.nextTag();
+                } catch (XMLStreamException xse) {
+                    throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC",
LOG));
                 }
-            } 
-        }
-        return match;
+                return boi;
+            }
+        } 
+        return null;
     }
 
     private boolean hasRootNode(BindingMessageInfo bmi, QName elName) {
         XMLBindingMessageFormat xmf = bmi.getExtensor(XMLBindingMessageFormat.class);
-        return xmf != null && xmf.getRootNode().equals(elName);
+        return bmi.getMessageParts().size() != 1 && xmf != null && xmf.getRootNode().equals(elName);
     }
 }



Mime
View raw message