Mule 4上传至Salesforce的附件输入示例

Mule 4上传至Salesforce的附件输入示例,salesforce,mule,attachment,Salesforce,Mule,Attachment,我想将文件从Mule 4上传到Salesforce附件。我使用类型为“附件”的Create processor。Create processor的输入结构和附件类型是什么 我在创建之前尝试过这种转换: %dw 2.0 output application/java --- { ParentId: payload.TicketAttachmentID, Name: "test.bin", Body: payload.FileData } 我希望在Salesforce中上传

我想将文件从Mule 4上传到Salesforce附件。我使用类型为“附件”的Create processor。Create processor的输入结构和附件类型是什么

我在创建之前尝试过这种转换:

%dw 2.0
output application/java
---
{
    ParentId: payload.TicketAttachmentID,
    Name: "test.bin",
    Body: payload.FileData
}
我希望在Salesforce中上传附件。但是Mule 4在创建步骤上返回错误:

Internal execution exception while executing the script, this is most probably a bug, file an issue with the script and the input data.
Caused by:\njava.nio.charset.UnmappableCharacterException: Input length = 1
请尝试以下操作:

%dw 2.0
output application/json  <-- this could be the issue
---
{
    ParentId: payload.TicketAttachmentID,
    Name: "test.bin",
    Body: payload.FileData
}
%dw 2.0
输出应用程序/json尝试以下操作:

%dw 2.0
output application/json  <-- this could be the issue
---
{
    ParentId: payload.TicketAttachmentID,
    Name: "test.bin",
    Body: payload.FileData
}
%dw 2.0
输出应用程序/json