cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r571500 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
Date Fri, 31 Aug 2007 15:50:56 GMT
Author: dkulp
Date: Fri Aug 31 08:50:55 2007
New Revision: 571500

URL: http://svn.apache.org/viewvc?rev=571500&view=rev
Log:
Fix looking up parts that point to elements that may be in different namespaces.
Fix issue with Faults that have an empty details element on the wire causing an NPE

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java?rev=571500&r1=571499&r2=571500&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractMessageContainer.java
Fri Aug 31 08:50:55 2007
@@ -130,7 +130,15 @@
      * @return the message part; or <code>null</code> if not found.
      */
     public MessagePartInfo getMessagePart(QName name) {
-        return messageParts.get(name);
+        MessagePartInfo mpi = messageParts.get(name);
+        if (mpi == null) {
+            for (MessagePartInfo mpi2 : messageParts.values()) {
+                if (name.equals(mpi2.getConcreteName())) {
+                    return mpi2;
+                }
+            }
+        }
+        return mpi;
     }
     
     /**

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java?rev=571500&r1=571499&r2=571500&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
Fri Aug 31 08:50:55 2007
@@ -72,6 +72,9 @@
 
     protected void processFaultDetail(Fault fault, Message msg) {
         Element exDetail = (Element) DOMUtils.getChild(fault.getDetail(), Node.ELEMENT_NODE);
+        if (exDetail == null) {
+            return;
+        }
         QName qname = new QName(exDetail.getNamespaceURI(), exDetail.getLocalName());
         FaultInfo faultWanted = null;
         MessagePartInfo part = null;



Mime
View raw message