On 09 Dec 2013, at 17:20 , neerajp <neeraj_star2...@yahoo.com> wrote:
> > 2) Your binary content is encoded in some way inside XML, right? Not just > random binary, which would make it invalid XML? Like base64 or something? > > [Neeraj]: I want to use random binary(*not base64 encoded*) in some of the > XML fields inside CDATA tag so that XML will not become invalid. I hope I > can do this. You can't – there are binary values that are simply not acceptable in an XML stream. Encoding the binary is the canonical way around this. That said, the obvious alternative is to use /update/extract instead of /update – this gives you a way of handling up to one binary stream in addition to any number of fields that can be represented as text. In that case, you need to construct a POST request that sends the binary content as a file stream, and the other parameters as ordinary form data (actually, it may be possible to send some/all of the other fields as url parameters, but that does not really simplify things).