camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From contactreji <contactr...@gmail.com>
Subject Re: CFX to Queue : io.serializationException
Date Thu, 12 Sep 2013 02:00:39 GMT
Hi Christian

Thank you so much.  Could you help me with configuring the marshaller.  The
class is something called DTPowerconsumption which has the schema for the
pojo.

I see in Camel jaxb component that there are parameters called contextPath
and namespaces. What should I enter for those values?

Reji

On Thursday, September 12, 2013, Christian Mueller [via Camel] <
ml-node+s465427n5739188h7@n5.nabble.com> wrote:
> Yes, use the camel-jaxb dataformat to marshal your payload into a
> byte[]/String before sending it to the queue. After dequeuing it,
unmarshal
> it to your Java pojo.
>
> Best,
> Christian
> -----------------
>
> Software Integration Specialist
>
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
>
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>
>
> On Wed, Sep 11, 2013 at 2:27 PM, contactreji <[hidden email]> wrote:
>
>> Hi Guys
>>
>> I have a problem in the following route.
>>
>> *<route id="Route1_MES_Queue">
>>                         <from uri="cxf:bean:PowerConsumptionEndpoint"/>
>>                         <log message="Persisting Message to queue
>> ${body}\n">
>>                                 <description>&lt;bean
>> ref="myBean"/&gt;</description>
>>                         </log>
>>                         <to uri="activemq:queue:EC_InboundQueue" />
>>                 </route>
>> *
>>
>> The data from cxf:bean:PowerConsumptionEndpoint is not able to queue up
 in
>> the message broker. It gives io.serialization exception.
>>
>> I tried modifying as cxf:bean:PowerConsumptionEndpoint?dataFormat=MESSAGE
>> which indeed solved the issue.
>>
>> But I have another route picking the same data from the queue as
>>
>> *
>> <route id="Route2_Queue_SAPPI">
>>                         <from uri="activemq:queue:EC_InboundQueue" />
>>
>>                         <log message="Message dequed Queue ${body}\n">
>>                                 <description>&lt;bean
>> ref="myBean"/&gt;</description>
>>                         </log>
>>                         <to uri="SAPClientInvoker" />
>>                 </route>*
>>
>> Here the SAPClientInvoker is a Java class which makes a webservice call
to
>> SAP PI system. We have followed the WSDL approach and we have a schema
>> class
>> DTPowerConsumption whose object is used to invoke Webservice call to SAP
>> PI.
>> *
>> This is part of SAPClientInvoker Class
>> DTPowerConsumption PC=exchng.getIn().getBody(DTPowerConsumption.class);
>>                 LOGGER.info("\n Data received for Energy Consumption from
>> MES  \n");
>>                 LOGGER.info("\n Sending Request from MES to PI for Energy
>> Consumption
>> \n");
>>
>>                 try {
>>                         LOGGER.info("before invoking");
>>                         sapService.siID59PowerconsumptionAsyncOut(PC);
>>                         LOGGER.info("Response from PI for Energy
>> Consumption");
>>                         exchng.getOut().setBody("Response from PI Energy
>> for consumption");
>>
>> *
>> Now i assume that dataFormat=MESSAGE parameter is fiddling with the
>> original
>> compatible data coming to fuse endpoint and hencethe SAPClientInvoker
>> webservice call is not able to maintain the perfect call to SAP PI. and
SAP
>> PI ends up sending HTTP 500 error code .
>>
>>
>> Can anyone suggest me how to store the data on route 1 without really
>> fiddling with the message formats without serialization exceptions?
>>
>> Or can I use a marshaller before storing it into the Queue and
unmarshaller
>> after fetching it from the queue before calling SAPClinetInvoker?
>>
>> If so can I use Camel component
>>
>> *<marshal>
>>             <jaxb prettyPrint="false"
>> contextPath="org.apache.camel.example"
>>                 partClass="org.apache.camel.example.PurchaseOrder"
>>                 fragment="true"
>>                 partNamespace="{http://example.camel.org/apache}po" />
>>         </marshal>
>>
>>  <unmarshal>
>>             <jaxb prettyPrint="false"
>> contextPath="org.apache.camel.example"
>>                 partClass="org.apache.camel.example.Partial" />
>>         </unmarshal>
>> *
>> What is the value to be entered for contextPath and partNamespace?? I am
>> confused with that.
>> If there is a alternate way to handle this, please help me with it..
>>
>> Reji
>>
>>
>>
>>
>> --
>> View this message in context:
>>
http://camel.465427.n5.nabble.com/CFX-to-Queue-io-serializationException-tp5739142.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
below:
>
http://camel.465427.n5.nabble.com/CXF-to-Apache-ActiveMQ-Queue-io-serializationException-tp5739142p5739188.html
> To unsubscribe from CXF to Apache ActiveMQ Queue :
io.serializationException, click here.
> NAML




--
View this message in context: http://camel.465427.n5.nabble.com/CXF-to-Apache-ActiveMQ-Queue-io-serializationException-tp5739142p5739195.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message