Hi all,
After switching from 2.0.9 to 2.2.3 i found that StaxOutInterceptor have
changes it's behaviour.
I have a problem with XMLStreamWriter in 2.0.9 - if function returns
empty array - it will be changed to a null -
for example:
<getArrayResult>
</getArrayResult>
which mean new ArrayList() on client
will be changed to
<getArrayResult />
That means on client null.
I have fixed this by creating new interceptor before StaxOutInterceptor
and set "auto empty elements" property of xml writer to false
XMLOutputFactory outputFactory =
StaxOutInterceptor.getXMLOutputFactory(message);
if(WstxOutputFactory.class.isAssignableFrom(outputFactory.getClass())){
WstxOutputFactory of = (WstxOutputFactory)outputFactory;
of.getConfig().setProperty(XMLOutputFactory2.P_AUTOMATIC_EMPTY_ELEMENTS,
false);
}
Now StaxOutInterceptor.getXMLOutputFactory always returns NULL - so i
have no way to specify this flag anymore.
How can i setup XMLStreamWriter to
AUTOMATIC_EMPTY_ELEMENTS = OFF ?
Best regards,
Sergey
--------
This data is for general information only and shall not be used to produce documents of any kind without same being submitted to, reviewed by, and approved by Intego in writing. All data is subject to change. User assumes all liability relating to the use of this data and agrees to release, indemnify, and hold harmless Intego from any and all claims relating said use. User is responsible to check for any viruses before use.