i have written converter class
@Converter
public class OutboundMessageConverter {
@Converter
public static com.gehcit.cp.ws.interop.OutboundMessage
convertToInterfaceEngineOutboundmessage(com.gehcit.cp.cem.outboundmessage.OutboundMessage
outboundMessage) {
com.gehcit.cp.ws.interop.OutboundMessage
interfaceengineoutboundmessage =
new com.gehcit.cp.ws.interop.OutboundMessage();
interfaceengineoutboundmessage.setSubscriptionName(outboundMessage.subscriptionName);
interfaceengineoutboundmessage.setEvent(outboundMessage.getEvent());
interfaceengineoutboundmessage.setMetaData(outboundMessage.getMetaData());
interfaceengineoutboundmessage.setMessage(outboundMessage.getMessage());
return interfaceengineoutboundmessage;
}
}
i have loaded this converter using
src/main/java/META-INF/services/org/apache/camel/TypeConverter file.
this is my camel code:
com.gehcit.cp.cem.outboundmessage.OutboundMessage outboundMessage =
prepareOutboundMessage(payload, eventMessage);
exchange.getOut().setBody(outboundMessage);
In the destination endpoint i am expecting
com.gehcit.cp.ws.interop.OutboundMessage object.
I am getting this error at the time of sending the data to destination end
point
org.apache.cxf.interceptor.Fault:
com.gehcit.cp.cem.outboundmessage.OutboundMessage cannot be cast to
com.gehcit.cp.ws.interop.OutboundMessage
Does camel do the automatically convertion what ever the destination
endpoint expects?
--
View this message in context:
http://camel.465427.n5.nabble.com/Type-Converters-in-Camel-tp5731607.html
Sent from the Camel - Users mailing list archive at Nabble.com.