cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1178548 - in /cxf/branches/2.4.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
Date Mon, 03 Oct 2011 19:56:49 GMT
Author: dkulp
Date: Mon Oct  3 19:56:49 2011
New Revision: 1178548

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

........
  r1178546 | dkulp | 2011-10-03 15:55:05 -0400 (Mon, 03 Oct 2011) | 2 lines
  
  [CXF-3813] Remove the soap specific attributes before unmarshalling the
  header to prevent validation errors.
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java

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

Modified: cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java?rev=1178548&r1=1178547&r2=1178548&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
Mon Oct  3 19:56:49 2011
@@ -28,6 +28,7 @@ import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.binding.soap.model.SoapHeaderInfo;
 import org.apache.cxf.headers.Header;
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
@@ -57,6 +58,7 @@ public class SoapHeaderInterceptor exten
 
     public void handleMessage(Message m) throws Fault {
         SoapMessage message = (SoapMessage) m;
+        SoapVersion soapVersion = message.getVersion();
         Exchange exchange = message.getExchange();
 
         MessageContentsList parameters = MessageContentsList.getContentsList(message);
@@ -99,6 +101,16 @@ public class SoapHeaderInterceptor exten
                     
                     if (param.getDataBinding() == null) {
                         Node source = (Node)param.getObject();
+                        if (source instanceof Element) {
+                            //need to remove these attributes as they
+                            //would cause validation failures
+                            Element el = (Element)source;
+                            
+                            el.removeAttributeNS(soapVersion.getNamespace(),
+                                              soapVersion.getAttrNameMustUnderstand());
+                            el.removeAttributeNS(soapVersion.getNamespace(),
+                                               soapVersion.getAttrNameRole());
+                        }
                         if (supportsNode) {
                             object = getNodeDataReader(message).read(mpi, source);
                         } else {



Mime
View raw message