servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bsny...@apache.org
Subject svn commit: r393975 - /incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/client/JAXBMarshaller.java
Date Thu, 13 Apr 2006 23:44:32 GMT
Author: bsnyder
Date: Thu Apr 13 16:44:31 2006
New Revision: 393975

URL: http://svn.apache.org/viewcvs?rev=393975&view=rev
Log:
Fixed SM-401 using patch.

Modified:
    incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/client/JAXBMarshaller.java

Modified: incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/client/JAXBMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/client/JAXBMarshaller.java?rev=393975&r1=393974&r2=393975&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/client/JAXBMarshaller.java
(original)
+++ incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/client/JAXBMarshaller.java
Thu Apr 13 16:44:31 2006
@@ -18,6 +18,7 @@
 import java.io.StringWriter;
 
 import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.MessagingException;
 import javax.jbi.messaging.NormalizedMessage;
 import javax.xml.bind.JAXBContext;
 import javax.xml.transform.Source;
@@ -59,4 +60,15 @@
         	throw new RuntimeException(e);
         }
     }
+
+	@Override
+	public void marshal(MessageExchange exchange, NormalizedMessage message, Object body) throws
MessagingException {
+		if (body instanceof Source) {
+            message.setContent((Source) body);
+        }
+        else {
+            Source content = asContent(message, body);
+            message.setContent(content);
+    	}
+	}
 }



Mime
View raw message