Next Challenge: Serializing Blobs

So, I’ve successfully implemented a couple of WS operations, but both of them return pretty simple data types.   I used the “Start from Java” method using annotations and such.  Now I have a different scenario:  a Blob return type.  I tried wrapping it a different class…nope.  I always get an exception during the serialization/marshalling process.

exception message:

javax.xml.bind.JAXBException: class oracle.sql.BLOB nor any of its super class is known to this context.

I suspect it has to do with java.sql.Blob being an interface, but I’m not sure how to solve this problem.  My reading on the subject leads me to believe that the “Start from Java” development model may not handle certain types very well (more support for the “Start from WSDL and Java” model).  Here’s the code for my wrapper class that doesn’t do the trick:

 Failed Blob Adapter Code (fig. 1.4)

And the journey continues!

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s