Skip to main content
Known Participant
December 14, 2010
Question

InDesign Server (via SOAP) -- Returning Binary Data: Possible or Not?

  • December 14, 2010
  • 1 reply
  • 670 views

is it possible to return binary data to soap client?

given: myFile = File('MyFancyJpeg.jpg');

I want to return either a base64 encoded, or hex result back to the SOAP client. (filetype, above, is totally arbitrary, by the way)

Is InDesign server capable of something like this?

This topic has been closed for replies.

1 reply

Inspiring
December 15, 2010

I think so. See ww-ids-soap.pdf in the SDK. You can return to the client any value you want; the value is typed in the SOAP response. An example from that pdf of a mixed-type array response:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:IDSP="http://ns.adobe.com/InDesign/soap/">
    <SOAP-ENV:Body>
        <IDSP:RunScriptResponse>
            <errorNumber>0</errorNumber>
            <scriptResult>
                <data xsi:type="IDSP:List">
                    <item><data xsi:type="xsd:string">1</data></item>
                    <item><data xsi:type="xsd:string">2</data></item>
                    <item><data xsi:type="xsd:long">10</data></item>
                    <item><data xsi:type="xsd:long">12</data></item>
                </data>
            </scriptResult>
        </IDSP:RunScriptResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Jeff