White Flag or Good Design Choice?


UNCLE!!!!!!!

Ok, I give!  I admit it!  I couldn’t figure out how to handle java.sql.Blob.  I’m sure one of you smarties out there can tell all about how to return a Blob from a java web service.  The last thing I tried was to send it as a byte array.  It appeared to work, but I couldn’t figure out what to do with it when I got it on the client side.  Then it occurred to me….

Why should my clients have to know how to deserialize, unpack (my blob data is packed), determine file type, and stream the file out to the browser?  Let the web application that hosts my web services do this!  Although I felt like it was a little of a cop out,  I changed that particular service into a Servlet and went along my merry way.  Works fine.

Of course, I won’t be able to sleep properly until I’ve solved the Case of the Unserializable BLOB!  (that’s not a Hardy Boys book is it?)

Advertisements

One thought on “White Flag or Good Design Choice?

  1. Pingback: Revisiting the whole binary serialization/deserialization thing… « Regular, Average Java Programmer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s