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


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.

Reply via email to