0

我必须解组 xml 并将对象发送到 cxf 组件。最初我一直在使用“vm”队列来做这件事,它工作正常。现在我想用 'jms' 队列替换它,而这样做的对象不能转移到 jms 队列中。我没有将对象放入 jms 队列。

//My Jaxb config

JaxbDataFormat jaxbAuthUnmarshal = new JaxbDataFormat(jc);
    jaxbAuthUnmarshal.setContextPath(MyModel.class.getName());
    jaxbAuthUnmarshal.setPartClass(MyModel.class.getName());


//My Route
from("jms:queue:Que01?connectionFactory=#amqConnectionFactory")
.unmarshal(jaxbAuthUnmarshal)
to("jms:queue:Oue02?connectionFactory=#amqConnectionFactory");

//Additional Log information
.to("log:beforeJaxb?showAll=true")
----------------------------------- 
        beforeJaxb| 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Exchange[Id: ID-B526DCOK-49409-1512362528955-12-27, ExchangePattern: InOnly, Properties: {CamelBinding=org.apache.camel.component.jms.JmsBinding@2916c118, CamelCreatedTimestamp=Mon Dec 04 14:28:11 IST 2017, CamelExternalRedelivered=false, CamelMessageHistory=[DefaultMessageHistory[routeId=UNMARSHALLER, node=log91], DefaultMessageHistory[routeId=UNMARSHALLER, node=to407]], CamelToEndpoint=log://beforeJaxb?showAll=true}, Headers: {breadcrumbId=ID-B526DCOK-49409-1512362528955-12-1, CamelFileAbsolute=true, CamelFileAbsolutePath=C:\INPUT\Sample_File_04Dec_12.xml, CamelFileLastModified=1511438482208, CamelFileLength=3728, CamelFileName=Sample_File_04Dec_12.xml, CamelFileNameConsumed=Sample_File_04Dec_12.xml, CamelFileNameOnly=Sample_File_04Dec_12.xml, CamelFileParent=C:\INPUT, CamelFilePath=C:\INPUT\Sample_File_04Dec_12.xml, CamelFileRelativePath=Sample_File_04Dec_12.xml, CamelJmsDeliveryMode=2, correlationId=4c6f8c74-bc96-4769-b3d3-55096d65cc6a, correlationIdDesc=GUID, JMSCorrelationID=null, JMSCorrelationIDAsBytes=null, JMSDeliveryMode=2, JMSDestination=queue://AUTH_IB_REQUEST_SPLITTED_QUEUE, JMSExpiration=0, JMSMessageID=ID:B526DCOK-49407-1512362520050-25:6:1:1:1, JMSPriority=4, JMSRedelivered=false, JMSReplyTo=null, JMSTimestamp=1512377891097, JMSType=null, JMSXGroupID=null, JMSXUserID=null, recordDesc=GUID, recordId=d97b0e6f-f300-4e1f-939b-076621d0a282, totalRecordCount=2}, BodyType: String, Body: <<Request file, removed for confidential purpose>>, Out: null: ]
.to("log:afterJaxb?showAll=true")
-----------------------------------
        afterJaxb | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Exchange[Id: ID-B526DCOK-49409-1512362528955-12-27, ExchangePattern: InOnly, Properties: {CamelBinding=org.apache.camel.component.jms.JmsBinding@2916c118, CamelCreatedTimestamp=Mon Dec 04 14:28:11 IST 2017, CamelExternalRedelivered=false, CamelMessageHistory=[DefaultMessageHistory[routeId=UNMARSHALLER, node=log91], DefaultMessageHistory[routeId=UNMARSHALLER, node=to407], DefaultMessageHistory[routeId=UNMARSHALLER, node=unmarshal12], DefaultMessageHistory[routeId=UNMARSHALLER, node=to408]], CamelToEndpoint=log://afterJaxb?showAll=true}, Headers: {breadcrumbId=ID-B526DCOK-49409-1512362528955-12-1, CamelFileAbsolute=true, CamelFileAbsolutePath=C:\INPUT\Sample_File_04Dec_12.xml, CamelFileLastModified=1511438482208, CamelFileLength=3728, CamelFileName=Sample_File_04Dec_12.xml, CamelFileNameConsumed=Sample_File_04Dec_12.xml, CamelFileNameOnly=Sample_File_04Dec_12.xml, CamelFileParent=C:\INPUT, CamelFilePath=C:\INPUT\Sample_File_04Dec_12.xml, CamelFileRelativePath=Sample_File_04Dec_12.xml, CamelJmsDeliveryMode=2, correlationId=4c6f8c74-bc96-4769-b3d3-55096d65cc6a, correlationIdDesc=GUID, JMSCorrelationID=null, JMSCorrelationIDAsBytes=null, JMSDeliveryMode=2, JMSDestination=queue://AUTH_IB_REQUEST_SPLITTED_QUEUE, JMSExpiration=0, JMSMessageID=ID:B526DCOK-49407-1512362520050-25:6:1:1:1, JMSPriority=4, JMSRedelivered=false, JMSReplyTo=null, JMSTimestamp=1512377891097, JMSType=null, JMSXGroupID=null, JMSXUserID=null, recordDesc=GUID, recordId=d97b0e6f-f300-4e1f-939b-076621d0a282, totalRecordCount=2}, BodyType: com.MyModel, Body: com.MyModel@4688701f, Out: null: ]
exc.getIn().getBody(Object.class)
----------------------------------
    JmsMessage[JmsMessageID: ID:B526DCOK-49407-1512362520050-25:8:1:2:1]
4

0 回答 0