This comes down to the way CXF prioritizes streaming for performance.  In 
order to properly stream data, we have to make the assumption that writing 
the object graph out will succeed.   In your case, that's not true.   There 
is another case that also breaks it the same way:  schema validation on 
writes.   

If schema validation is turned on, we now (starting with 2.1.3) "cache" the 
xml events until the very end and then write them all out if no exceptions 
are thrown during mashalling.   Thus, one fix for you would be to just turn 
on schema validation.     Obviously, the schema validation invokes some extra 
overhead.   Thus, we probably could introduce a new flag to turn on the 
buffering.      If you would like to tackle that, a patch to 
AbstractOutDatbindingInterceptor would be all that is needed.
On line 75, there is:
if (shouldValidate(message) && !isRequestor(message)) {
that would just need to be updated to check extra flags.

Dan




On Thursday 04 December 2008 10:56:52 am [EMAIL PROTECTED] 
wrote:
> I have some hibernate objects what should be marshaled, and if i get
> error during this process - for example in lazy loading - i get very
> strange output:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>    <soap:Body>
>       <ns1:findByCriteriaResponse
> xmlns:ns1="http://ws.pc2.takecharge.com/";> <soap:Fault>
>             <faultcode>soap:Server</faultcode>
>             <faultstring>Marshalling Error: No row with the given
> identifier exists: [com.data.alert.AlertType#10]</faultstring>
>          </soap:Fault>
>       </ns1:findByCriteriaResponse>
>    </soap:Body>
> </soap:Envelope>
>
> Is there any ability to create normal response - Fault element inside
> Body - not in sub tags:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>    <soap:Body>
>          <soap:Fault>
>             <faultcode>soap:Server</faultcode>
>             <faultstring>Marshalling Error: No row with the given
> identifier exists: [com.data.alert.AlertType#10]</faultstring>
>          </soap:Fault>
>    </soap:Body>
> </soap:Envelope>



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog

Reply via email to