I didn't see in your initial code anything that set up the dataFormat.
That along with the unmarsal/marshal are what you need to get it to work
correctly, not just using a bean.
<dataFormats>
<json id="jack" library="Jackson" unmarshalTypeName="com.example.
RetailStoreReturnPOJO""/>
</dataFormats>
Then in your route, right after your call* to* http4 you put:
<unmarshal ref="jack"/>
On Wed, Sep 28, 2016 at 11:56 AM, Brad Johnson <[email protected]
> wrote:
> Jackson works fine and I've used it many times. So does JAXB for JSON.
> Just remember to put the @XmlRootElement annotation on your bean in that
> case (yeah, even it if is only being used for JSON). I really wouldn't fool
> with the gapping of strings to a hashmap. You'll just create headaches. You
> can also use XStream with jettison. XStream is one of my favorite
> libraries though I don't usually use it to marshal/unmarshal JSON.
>
> Right after your call to http4 log the return data and post it. One item
> I've seen in the past in the context of web service calls is that it will
> put the individual elements it gets back in an array and you have to fish
> the zeroeth element out of the array to get the actual item you're looking
> for.
>
> But if you just print out/log what you get right after the call TO http
> that should help.
>
> Brad
>
>
>
>
>
> On Wed, Sep 28, 2016 at 8:36 AM, jeffz <[email protected]> wrote:
>
>> That's actually how it originally was, but I changed it while working on
>> my
>> older 'stream closed' issue. I can switch that back. I'm actually pretty
>> close now, just running into some issues reading certain fields within the
>> map object.
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.
>> com/Help-with-JSON-to-POJO-using-XML-Routes-tp5788130p5788158.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>