You need to sign in to do that
Don't have an account?
Attempting to invoke an outside .NET WCF Service
I have an external .NET WCF Service that I am trying to invoke from outside the Salesforce sandbox. One of the arguments in the .NET WCF Service function call is a byte array. What is the appropriate conversion in APEX so that I can pass data to this function?
WSDL element:
<xs:elementminOccurs="0"name="FileContents"nillable="true"type="xs:base64Binary" />
Call to this:
String filecontents = BuildFile();
inputfile.FileName = 'SalesForceAddressFile.txt';
inputfile.FileContents = EncodingUtil.base64Encode(Blob.valueOf(filecontents));
When I look at the DataContract that was pulled in, the property is a String, but defined to the service as base64Binary.
But when I invoke the webservice, there is an error thrown and I have narrowed it down to this property. What am I doing wrong?