Month: December 2007

Simple Web Services

UPDATED: Something like Hessian - - would have been exactly what I was looking for to send binary data over HTTP. I recently had the need to send an object model from an applet back to the server. The model was rather complex and what might have been normal in the office, would have been to marshal the data into an XML document and send it to a SOAP interface. But that's rather excessive and would take quite some time to develop (think generating XML definitions, JAXB, generating a web service and some WSDL, then the web service clients, yawn, yawn). So I had a quick think about what I wanted to achieve. I wanted some data to be sent from the client to the server. I wanted to develop it quickly too (so no time for research and the trials of software selection). It had to be HTTP friendly as well, since I am paranoid about opening ports on my public servers. So I wondered about serialising the model and sending it to a simple servlet where it could be stored into a database as a BLOB. If necessary (which was later to become the case) I would also be able to deserialise the model server side and extract some data from it. The only problem I faced was whether I could send binary data (the serialised data) over an HTTP request? To be on the safe side, and to avoid worrying about things like MIME types, I took…

Read more