True, but then you have no way of communicating the semantics of the fault. “Hey, you sent me a bad account #”, no the requestor just gets some local fault stating that they were unable to parse the XML.
I agree that the best workaround, although not perfect, is to stream to disk and then stream that output. That in a way is a two phase model, streaming to disk is your ‘prepare’ if any exceptions occur while streaming you ‘abort’ by sending a SOAP fault back, if you are successful stream the buffered stream back as the results.
The downside of this approach is latency. It would have been nice if the requestor could start processing results before the server has completed generating them.
- Mark
From: Brian Abbott [mailto:[EMAIL PROTECTED]
It seems that if an exception is thrown, the stream
should stop at that point. So, now you've transmitted an incomplete message. It
seems that if you want to avoid making major modifications to SOAP, you would
need to send a fault message immediately following that would in some way
reference the previous message where the exception was thrown. Nelso, streaming SOAP is certainly a good idea for addressing some scalability issues. However it also introduces an interesting challenge. Say you have a service that processes some input and starts streaming output immediately. As it is generating the response SOAP message every byte that is output goes almost immediately to the wire (ignoring caching and/or framing for a second). Now say sometime into the result an error occurs, a database exception, or perhaps a problem in the input stream, oops! The result SOAP stream has already commited itself to be a SOAP body, it can no longer turn itself into a fault because those bytes have gone out over the wire. What to do!? In some ways it would have been nice if the SOAP protocol had put the fault at the end rather than the beginning (SOAP footers?) SOAP 1.2 seems to allow a SOAP fault to appear within a child of the body, but then states "the element has no SOAP-defined semantics" There are certainly problems I would also like to use streaming for, but what to do about faults? - Mark
|
- RE: SOAP message size limit with Axis Lerena, Alberto
- Re: SOAP message size limit with Axis Aleksander Slominski
- RE: SOAP message size limit with Axis Lerena, Alberto
- RE: SOAP message size limit with Axis Nelson Minar
- Re: SOAP message size limit with Axis Peter Molettiere
- RE: SOAP message size limit with Axis Lerena, Alberto
- RE: SOAP message size limit with Axis Nelson Minar
- Streaming SOAP and Faults Mark Ericson
- Re: Streaming SOAP and Faults Brian Abbott
- RE: Streaming SOAP and Faults Mark Ericson
- Re: Streaming SOAP and Faults Mark Ericson
- Re: Streaming SOAP and Faults Nelson Minar
- Re: Streaming SOAP and Faults Aleksander Slominski
- Re: Streaming SOAP and Faults Brian Abbott
- Re: Streaming SOAP and Faults Peter Molettiere
- Re: Streaming SOAP and Faults Aleksander Slominski
- Re: Streaming SOAP and Faul... Nelson Minar
- Re: Streaming SOAP and Faults Peter Molettiere
- RE: SOAP message size limit with Axis Lerena, Alberto