This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Services and the fly likes Need help on Axis2 reliable messaging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need help on Axis2 reliable messaging" Watch "Need help on Axis2 reliable messaging" New topic
Author

Need help on Axis2 reliable messaging

Xao Wu
Greenhorn

Joined: May 03, 2012
Posts: 4
Hi!

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?

Your help would be greatly appreciated.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
SOAP is based on XML; a partial message (meaning, XML that is not well-formed) is unlikely to be processable at all.
Xao Wu
Greenhorn

Joined: May 03, 2012
Posts: 4
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?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
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.
Xao Wu
Greenhorn

Joined: May 03, 2012
Posts: 4
ok, i'll try to test it.. thank you so much sir!
 
Consider Paul's rocket mass heater.
 
subject: Need help on Axis2 reliable messaging