thx

it works !

in fact, the errors are due to the xsd delcaration and jaxb side (not camel
side). it works well with XmlRootElement but not with complex type ;-)

thx for all now i can go forward with lovely camel

Bruno

willem.jiang wrote:
> 
> Hi,
> 
> I think you need to let the jaxb unmarshal the xml without wrapping with 
> JAXBElement, just like this
> 
> <jaxb ignoreJAXBElement="ture" prettyPrint="true"
> contextPath="poc.camel.echange" />
> 
> 
> Willem
> 
> 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.jaxbelem...@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.jaxbelem...@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
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>> 
> 
> 
> 

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

Reply via email to