Hello all!
I've an XMLPort with a Picture field (BLOB). I want to export the data throught a web service. But unfortunately, the C# code through an exception that the root node is not process. I've seen that the blob field is the problem. I decode it into Base64 like the function in codeunit BizTalkXMLDomMgt, but I have the problem. Is there a way to generate the xml file with XMLPort (using web service)? Thank you in advance. Regards.
0
Comments
WebServices won't like XMLPorts with BLOB fields, most likely because of serialization issues. The way around it, like you rightly say, is to transfer BLOBs using Base64.
Do not include any elements with BLOB data source in your XMLPort, but instead create Text element with TextType=BigText, then fill it in with converted bytes from BLOB.
Below code uses .NET Interop and temporary file to achieve this, but I'm sure there are ways of doing it without going through the filesystem.