Sergey Beryozkin-5 wrote
> Hi
> On 20/11/12 10:46, jbright wrote:
>> Sergey / Sireesh
>>
>> Do we have a solution for this issue?
>>
>> I do have the similar problem.
>>
>> The JSONProvider is not creating collection properly.
>>
>> {
>> "BookResponse":{
>> "BookHeader":[
>> {
>> "BookHeaderDtls":{ .... }
>> }]
>> "BookHeader":[
>> {
>> "BookHeaderDtls":{ .... }
>> }]
>>
>> Irrespective of creating the list with "BookHeader" and populate the
>> BookHeaderDtls, I get only one "BookHeader":[{ and all the
>> BookHeaderDtls
>> are populated inside that.
>
> Yes, that's good enough. Should I move to JSONProvider? I was using the
> JacksonJsonProvider per your advice earlier and ended with with another
> issue opened as a new topic.
>
>>
>> But the schema is defined to have a list of BookHeader, which in XML
>> response is perfect like this
>>
>>
> <BookResponse>
>>
> <BookHeader>
> ....
> </BookHeader>
>>
> <BookHeader>
> ....
> </BookHeader>
>>
> <BookHeader>
> ....
> </BookHeader>
>>
> <BookHeader>
> ....
> </BookHeader>
>>
> <BookHeader>
> ....
> </BookHeader>
>> ......
>>
> </BookResponse>
>>
>
> How does BookResponse JAXB bean look like (what annotations are used) ?
> And also BookHeaderDtls ?
>
> By the way, should it be:
>
> " {
> "BookResponse":{
> "BookHeader":[
> {
> "BookHeaderDtls":{ .... }
> },
> {
> "BookHeaderDtls":{ .... }
> }
> ]
> }"
>
> ?
>
> This is a BookResponse with a BookHeader array, where each array element
> is a BookHeaderDtls JSON object.
>
> In your original example, it is BookResponse with n number of BookHeader
> single element arrays...
>
> Can you try the option I prototyped ?
>
> Sergey
>
>> Any help is appreciated...
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/JSONProvider-unable-to-unmarshal-json-containing-list-of-elements-tp5715651p5718799.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
--
View this message in context:
http://cxf.547215.n5.nabble.com/JSONProvider-unable-to-unmarshal-json-containing-list-of-elements-tp5715651p5721107.html
Sent from the cxf-user mailing list archive at Nabble.com.