camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Karpe <aska...@progress.com>
Subject Re: in.getBody() Bug ???
Date Thu, 11 Feb 2010 15:47:35 GMT

This sounds suspiciously like a case of the problem being earlier in the DSL
and prior to reaching the processor getBody(). Have you checked the JAXB
object to not be null before passing it downstream...? Also, have you
checked if the payload is not being stomped somewhere earlier in the DSL
prior to reaching the processor? 

I would very very surprised if a bug is present in the getBody() since it is
a well worn & high traffic operation and if there were such problems they
would be picked up earlier during unit testing...

Can you please verify this...?

Cheers,

Ashwin...


Tapdur wrote:
> 
> no exception just return null object
> 
> 2010-02-11 15:19:04,197 : Logger.process :
> 37b63738-e0c4-46aa-9906-a3a25805896f >>> (route1)
> from(http://127.0.0.1:9090/greeting) -->  <<< Pattern:InOut,
> Headers:{org.restlet.http.version=HTTP/1.0,
> CamelHttpUri=http://127.0.0.1:9090/greeting,
> org.restlet.http.headers=[Accept: xml/application, Content-Type: ,
> User-Agent: Jakarta Commons-HttpClient/3.1, Host: 127.0.0.1:9090,
> Content-Length: 57], CamelHttpMethod=POST,
> org.restlet.startTime=1265897944026}, BodyType:String,
> Body:<GreetingRequest>
>        <name>Tapdur</name>
> </GreetingRequest>
> 
> 2010-02-11 15:19:04,369 : Logger.process :
> 37b63738-e0c4-46aa-9906-a3a25805896f >>> (route1)  -->
> log://poc.camel.greeting?level=DEBUG <<< Pattern:InOut,
> Headers:{org.restlet.http.headers=[Accept: xml/application, Content-Type:
> , User-Agent: Jakarta Commons-HttpClient/3.1, Host: 127.0.0.1:9090,
> Content-Length: 57], CamelHttpUri=http://127.0.0.1:9090/greeting,
> org.restlet.startTime=1265897944026, org.restlet.http.version=HTTP/1.0,
> CamelHttpMethod=POST}, BodyType:javax.xml.bind.JAXBElement,
> Body:javax.xml.bind.JAXBElement@143c268
> 
> 2010-02-11 15:19:04,432 : Logger.process :
> 37b63738-e0c4-46aa-9906-a3a25805896f >>> (route1)
> log://poc.camel.greeting?level=DEBUG --> ref:greeting <<< Pattern:InOut,
> Headers:{CamelHttpUri=http://127.0.0.1:9090/greeting,
> org.restlet.startTime=1265897944026, org.restlet.http.headers=[Accept:
> xml/application, Content-Type: , User-Agent: Jakarta
> Commons-HttpClient/3.1, Host: 127.0.0.1:9090, Content-Length: 57],
> org.restlet.http.version=HTTP/1.0, CamelHttpMethod=POST},
> BodyType:javax.xml.bind.JAXBElement,
> Body:javax.xml.bind.JAXBElement@143c268
> 
> 
> 
> 
> 
> 
> 
> 
> Ashwin Karpe wrote:
>> 
>> Hi,
>> 
>> Can you also post the exception that is being thrown...? 
>> 
>> In addition is the payload being sent to the processor a serializable
>> object of GreetingRequestType.class?
>> 
>> You may want to introduce a log() in the DSL to get a sense of the
>> contents of the exchange
>> 
>> Cheers,
>> 
>> Ashwin...
>> 
>> 
>> Tapdur wrote:
>>> 
>>> Hi community
>>> 
>>> in the process method, i want to get a body of type wich is generated by
>>> xjc, how to pass to the getBody() the jaxb option
>>> ignoreJAXBElement="false" (used in the unmarshall) ?
>>> 
>>> this line fail (within the correct object in the echange.in.value
>>> attribute):  GreetingRequestType user = (GreetingRequestType)
>>> exchange.getIn().getBody(GreetingRequestType.class);
>>> 
>>> is it a bug or is there any workaround ?
>>> 
>>> Thx
>>> Bruno
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: http://old.nabble.com/in.getBody%28%29-Bug-----tp27544321p27548627.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message