1 17 package org.apache.servicemix.components.groovy; 18 19 import org.apache.servicemix.jbi.messaging.DefaultMarshaler; 20 import org.apache.servicemix.jbi.messaging.PojoMarshaler; 21 22 import javax.jbi.messaging.MessageExchange; 23 import javax.jbi.messaging.NormalizedMessage; 24 import javax.jbi.messaging.MessagingException; 25 26 import groovy.lang.GString; 27 28 34 public class GroovyMarshaler extends DefaultMarshaler { 35 36 public void marshal(MessageExchange exchange, NormalizedMessage message, Object body) throws MessagingException { 37 if (body instanceof GString) { 38 body = body.toString(); 39 } 40 41 super.marshal(exchange, message, body); 43 } 44 } 45 | Popular Tags |