Hi
On 17/02/14 19:33, Jose María Zaragoza wrote:
2014-02-17 16:52 GMT+01:00 Sergey Beryozkin <[email protected]>:
Hi

How I can do this ?

So you basically would like the unrecognized 'size' property be ignored ?
JAXB, without a schema, may let you do it as is, and in addition to that you
should be able to use 'inDropElements' property. You can alsoi register a
custom XMLStreamReader if needed, customizing it even further

Does it answer your question ?

Cheers, Sergey

Thanks, Sergey.

I think I cannot use  'inDropElement' because I don't know which new
fields the webservice will receive in the future.
I'll try to disable schema-validation and test your first solution

or make sure it has an open content model, allowing for the unrecognized elements;
In any case, I'm going to need to format the message because the
client is sending a non-valid JSON message.

Where is the best place "to fix" the incoming messages ? JAX-RS
Filters ? Override JSON provider ( in this case, what method ) ?

For me it's cleaner using a JAX-RS Filters, because a filter performs
all the dirty work and I don't modify the JSON provider
But I'm not sure

Unfortunately the filters have limited capabilities and altering the payload, all you can do is to register a custom InputStream, so it's more difficult to modify the payload at the IS stream level, as opposed to the XMLStreamReader level, JSON provider has a method createWriter, please check the source, ex, JSONUtils, on how to create the custom reader on top of the available reader

Cheers, Sergey
Thanks and regards




or

- any ideas ?

Thanks and regards



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to