servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r357934 - /incubator/servicemix/trunk/servicemix-components/src/main/java/org/servicemix/components/saaj/SaajMarshaler.java
Date Tue, 20 Dec 2005 07:54:29 GMT
Author: gnodet
Date: Mon Dec 19 23:54:22 2005
New Revision: 357934

URL: http://svn.apache.org/viewcvs?rev=357934&view=rev
Log:
Fix SM-242 : The SaajBinding component does not remove the soap envelope on the response

Modified:
    incubator/servicemix/trunk/servicemix-components/src/main/java/org/servicemix/components/saaj/SaajMarshaler.java

Modified: incubator/servicemix/trunk/servicemix-components/src/main/java/org/servicemix/components/saaj/SaajMarshaler.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-components/src/main/java/org/servicemix/components/saaj/SaajMarshaler.java?rev=357934&r1=357933&r2=357934&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-components/src/main/java/org/servicemix/components/saaj/SaajMarshaler.java
(original)
+++ incubator/servicemix/trunk/servicemix-components/src/main/java/org/servicemix/components/saaj/SaajMarshaler.java
Mon Dec 19 23:54:22 2005
@@ -29,12 +29,15 @@
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.MimeHeader;
 import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElement;
 import javax.xml.soap.SOAPEnvelope;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.soap.SOAPPart;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.Iterator;
@@ -53,7 +56,9 @@
         addNmsProperties(normalizedMessage, soapMessage);
 
         SOAPPart soapPart = soapMessage.getSOAPPart();
-        normalizedMessage.setContent(soapPart.getContent());
+        SOAPBody soapBody = soapPart.getEnvelope().getBody();
+        SOAPElement elem = (SOAPElement) soapBody.getChildElements().next();
+        normalizedMessage.setContent(new DOMSource(elem));
 
         addNmsAttachments(normalizedMessage, soapMessage);
     }



Mime
View raw message