I'm fairly new to Axis2 and I was wondering if there was any way to ensure that the messages sent from the client are complete..
For example, if a client sends a request with an attachment, how will I know that the attachment I received in the server is complete?
And if for example, while sending the attachment, the client's internet connection got interrupted and the rest of the message was not sent, how will my server behave? Will it process the partial message, or won't it?
SOAP is based on XML; a partial message (meaning, XML that is not well-formed) is unlikely to be processable at all.
Joined: May 03, 2012
Tim Moores wrote:SOAP is based on XML; a partial message (meaning, XML that is not well-formed) is unlikely to be processable at all.
Thank you for replying sir!
So, let's say my client is sending a file that has 100 records in it. Does it mean that there will never be a case wherein I'll only be receiving 50 rows due to an interrupted internet connection? And if so, is it safe to say that i need not ask the client to put a header and footer in the file for me to validate whether I received the file in its entirety?
Joined: Sep 21, 2011
It's possible that the server-side starts processing the SOAP using an XML parser that doesn't need the full document (like SAX), but I consider that highly unlikely. An incomplete XML document is not well-formed, and thus should not be processed. At the very least, you'll get an exception. It shouldn't be hard to test what your SOAP implementation does under these circumstances.