Hi All
i’d like to use get/attach binary file function with UCS. There are corresponding ESP functions, but all of them are expecting parameter of type “binary” for content.
for example:
‘AppName’ [str] = “UCS_p”
‘AppType’ [str] = “CONTACT_SERVER”
‘Service’ [str] = “OMInteractions”
‘Method’ [str] = “GetDocument”
‘Parameters’
= (size=7561)
‘MimeType’ [str] = “application/unknown”
‘TheName’ [str] = “test.pdf”
‘Content’ [bin] = (size=7477)
0x25 0x50 0x44 0x46 0x2D 0x31 0x2E 0x34 0x0A 0x25 0xC3 0xA4 0xC3 0xBC 0xC3 0xB6 0xC3 0x9F 0x0A 0x32
…
When calling this method, ORS even can’t evaluate result in _event.data.content ![]()
The thing is that in case of IRD i can set data type using modifier like {b}Content. In case of javascript/scxml it’s impossible to use type other than int or string. If i submit request to UCS with content of type string, UCS reply with error.
The example of call for add document function:
<session:fetch requestid=“App_ExternalService1[‘requestid’]” srcexpr=“‘\’ + ‘CFGContactServer’ + ‘\’ + ‘OMInteractions’ + ‘\’ + ‘AddDocument’” timeout=“30” method=“‘esp’”>
The following block is used to prepare content
var App_ExternalService1_content = {
params: {
MimeType: ‘application/unknown’,
TheName: ‘attach.pdf’,
TheSize: 32,
Content: var_content2,
InteractionId: system.InteractionID
},
udata: {
}
};
where var_content2 should be binary rather than string. I’ve tried to use array object, but ORS doesn’t know about ArrayBuffer ;(
The question is: how to get/put binary content or does other way exist to submit attached document to interaction?