You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2009/03/05 19:01:56 UTC

[jira] Resolved: (CXF-2051) Exception in REST Service creates not-well-formed xml responses

     [ https://issues.apache.org/jira/browse/CXF-2051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-2051.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.5
                   2.2

If org.apache.cxf.output.buffering is set to true or if a given provider has getEnableBuffering() method which returns true then the output will be buffered, If we're talking about small to medium size messages then the perfomance sideeffects are unlikely to happen, the CachedOutputStream is very efficient.

Additionally, if enableStreaming propery is set to true on a JAXBElementProvider then a caching XMLStreamWriter will be used to capture all the events in memory and then output them to the real stream.



> Exception in REST Service creates not-well-formed xml responses
> ---------------------------------------------------------------
>
>                 Key: CXF-2051
>                 URL: https://issues.apache.org/jira/browse/CXF-2051
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.2
>            Reporter: Andreas Sahlbach
>             Fix For: 2.2, 2.1.5
>
>
> I've got this with SOAP and REST services using JAXB Databinding. In case of errors during the databinding phase, I get not well-formed xml like this:
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Company><addresses><address1Ntl>street</address1Ntl><cityNtl>city</cityNtl><countryISO>276</countryISO><type>Extern</type><zipCity>69250</zipCity></addresses><ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat"><ns1:faultstring xmlns:ns1="http://cxf.apache.org/bindings/xformat">org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: de.volkswagen.ums.persistence.data.PersistentOrganization.displaynames, no session or session was closed</ns1:faultstring></ns1:XMLFault>
> So the already created beginning of the response is not replaced but appended by the fault, creating a not usable response.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.