on 11-18-2016 8:18 PM
Hi Experts,
Please loot at my bellow code.
// Webservice Reponse, already base-64 converted, No need to convert again.
var ReponseString = ws_result.Content;
var binaryString : BinaryObject;
this.binaryData.content = ReponseString ;
//Warning. ReponseString is having value. Debugging: Empty value return.
Is there any other way to store string in binary object? Am I missing anything in above code?
Regards
Sankaran A
Hi Sankaran,
You said that your return from the web service is already on Base64. Did you try the follow:
var docType : DocumentTypeCode;
var binaryObject : BinaryObject;
var docDesc : Description;
var docName : LANGUAGEINDEPENDENT_Name;
var docAltName : LANGUAGEINDEPENDENT_Name;
docAltName = "altName";
var ReponseString = ws_result.Content;
docName = "NameOfDoc.pdf";
docDesc.content = "Your description of the document";
docType.content = "10001"; /*Standard Attachment*/
binaryObject.mimeCode = "application/pdf";
/*Here is the important line*/
binaryObject.content = Binary.ParseFromBase64String(ReponseString);
this.AttachmentFolder.CreateFile(docType, docName, docAltName, docDesc, binaryObject);
I hope this help
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you much @Marlos
Regards
Sankaran A
Hi Stephane,
I have to make sure that your string is in base64, otherwise it will generate an error. You may try to convert an PDF file to a Base64 string (here). And, use this hard coded string to check if the parser on C4C was ok.
I did no try to do this, but it may work and give you an direction to go.
Best regards
Marlos Damasceno
Hello Sankaran,
What about using the DO AttachmentFolder?
Just use the action CreateFile which supports a parameter DocumentFileContentBinaryObject.
HTH,
Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sankaran,
I also encountered the same problem.
You can try WebServiceUtilities.EncryptWithHashBasedMessageAuthenticationCode() the method.
Unfortunately,I did not find the relevant documents about the method paraments.
Thanks and Regards,
Eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.