To carry binary data within an XML tag, the most convenient approach is Base 64 encoding the content (use pub.string:base64Encode):
<rootxmltag>
<name>webMethodsIS1</name>
<lastname>Developer</lastname>
<pdfdata>=2ady46js09agadj04yhlkjd8rjlfg…</pdfdata>
</rootxmltag>
I understand base64 encoding adds 37% to the message size than absolutely essential (since HTTP is an 8-bit transfer protocol). If size is a huge worry, you could try the methods below:
You could also embed binary data directly in the XML document using the CDATA tag. I haven’t tried that. This article describes it well:
[url=“http://builder.com.com/5100-6374-1050529.html#Listing%20A”]http://builder.com.com/5100-6374-1050529.html#Listing%20A[/url]
Last month W3C put out a new standard on attaching binary data to XML documents:
[url=“XML-binary Optimized Packaging”]http://www.w3.org/TR/2005/REC-xop10-20050125/[/url]
It’s an unfortunate looking implementation full of namespaces. I bet WM doesn’t currently support it either, so you’ll have to write your own handler. I wouldn’t bother with it.
#Integration-Server-and-ESB#Flow-and-Java-services#webMethods