Adding Literal Data for a WS Call?

View: New views
1 Messages — Rating Filter:   Alert me  

Adding Literal Data for a WS Call?

by jsexton0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm given a WSDL with a parameter element of type base64Binary.

In an EJB calling this service, I have in hand a String that represents, literally, what I want to appear in that element.  In other words, the following would work if I could somehow construct it:

<byteElemment>
<![CDATA[
My-Literal-UTF-16-String-Here
]]>
</byteElemment>

But the generated Java only has a setter of the form setByteElemment(byte[] bytes).  If I use getBytes() on my string, any encoding, the WS call fails.  

Is this because the base64Binary field gets uuencoded?  Can I avoid that?  How can I create a byte array that I can place in this element, literally?

Thanks