I have found the solution:
in one of interceptors before the WrappedOutInterceptor
i 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);
        }


Sergey Pulyaev wrote:
> 
> Ok, i have switched to 2.0.9.
> But now - when i use code in line 76 - i mean CachingXmlEventWriter - i
> get invalid response text:
> previously i get response from function with result List<Long>  like that:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> <soap:Body>
> <ns1:getUserRolesResponse
> xmlns:ns1="http://ws.pc2.takecharge.com/";></ns1:getUserRolesResponse></soap:Body>
> </soap:Envelope>
> 

-- 
View this message in context: 
http://www.nabble.com/Exception-while-marshalling-tp20836363p21049494.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to