Hi, to be honest, I don't even know how XMLBeans manages to deal with
List<String>, JSONProvider alone just would not handle it, so perhaps the
invocation path is different when simple types such as String are used.
Anyway, I added a startDocument call to XMLBeansJSONProvider - not sure if
it helps; but I recall I had to do the same for AegisJSONProvider few months
ago

cheers, Sergey

On Fri, Jul 2, 2010 at 9:49 AM, Jim Talbut <[email protected]> wrote:

> I've just hit the same problem.
> Originally I had an object that contained a List of Strings, I then changed
> that to a List of a custom object and now it hits this exception.
> Given that it works for some objects and not for others I don't think it's
> a simple case of STAX implementation.
>
> Jim
>
>
> On 15/06/2010 18:03, Sergey Beryozkin wrote:
>
>> Hi
>>
>> XMLBeansJSONProvider is not easy to customize at the moment, so you may
>> want
>> to create a custom provider, using the same code XMLBeansJSONProvider does
>> in its writeTo and adding xsw.writeStartDocument(); after the write has
>> been
>> created
>> cheers, Sergey
>>
>> On Tue, Jun 15, 2010 at 3:54 PM, Reed, Nate<[email protected]>  wrote:
>>
>>
>>
>>> I'm running into a problem in CXF marshalling a JSON response document
>>> using the XMLBeansJSONProvider and Jettison.  It seems to be related to
>>> the
>>> Woodstox STAX implementation.
>>>
>>>
>>>
>>> It looks like the MappedXMLStreamWriter expects a START_DOCUMENT event
>>> that
>>> never occurs, as this line causes a NullPointerException:
>>>
>>>
>>>
>>>      public void writeEndElement() throws XMLStreamException {
>>>
>>>            if (stack.isEmpty()) throw new XMLStreamException("Too many
>>> closing tags.");
>>>
>>> à          current = stack.pop().withProperty(current);
>>>
>>>      }
>>>
>>>
>>>
>>> Since it looks like a problem with this STAX implementation, is there 1)
>>>  a
>>> recommended STAX implementation to use?, and 2) a way to configure this
>>> in
>>> CXF?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Nate
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>

Reply via email to