function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SGulSGul 

Passing File and PartSource in Apex Callout

Hi,

I want to call a third party webservice which is expecting parameters of List<FILE> and LIST<PartSource>

PartSource datatype relates to org.apache.commons.httpclient.methods.multipart.PartSource.

 

Since i need to call this from Apex, can you please help me out to figure out , How can I pass out this information from Apex to webservice?

P.S.

1) Passing onto BLOB Data in these parameters is failing. Salesforce documentation @ Page No 206 of Apex Code Developer's Guide says that BLOB can't be passed in CALLOUTs.

 

2) We don't want to/can't  have a Java Layer in between which accepts String and convert to the acceptable format of File and PartSource

 

Can we write something in Apex to cater to this requirement??

Is it possible to import Java Libraries and use their functions in Salesforce???

 

Thanks.