How to convert a binary response variable from a SOAP Web service?

Hi all,  For a project, I am implementing a SOAP Web service call. The operation results in a binary variable, but actually it is an XML document containing a String value. I already read the following post, these answers doesn't help because I am dealing with a variable instead of an attribute.  Does anyone have an idea how I can convert this binary variable? Thanks!
1 answers

What are you expecting to get back, is the binary data by any chance an image?
If so you could store the string in a field and then use the base64decoder from the community commons module to decode the data