Deserialize Byte[] using K2 Studio

  • 19 October 2016
  • 1 reply
  • 2 views

Badge +1

I am busy implementing Muhimbi's PDF Converter Service as an endpoint webservice in K2. I've built a workflow in K2 Studio to carry out the PDF conversion, and smartForms to load the document to convert.

 

The conversion is done by using the Convert method which take 3 required parameters: 

  • Source File: [Type = byte] [Value = the physical source file]
  • OpenOptions: [Type = object] [Value = source file name and it’s extension]
  • ConversionSettings: [Type = object] [Value = destination extension]

The issue I'm having is with the SourceFile parameter which was serialized by:

  1. Taking the Base-64 <content> of the document/file to be converted.
  2. Using the Function Browser's To Binary method to convert the Base-64 string.
  3. Should then be left with array of bytes.
  4. Store the bytes in a datafield of type binary.

I then use that datafield as the SourceFile parameter.

 

The error I get at the SourceFile is:
Message: Unable to deserialize value Byte[]; ServiceName: EndpointsWebService; ServiceGuid: ab06376a-96c8-44d9-a517-686bb07b5000; InnerExceptionMessage: ;

 

Can someone guide me in a direction to solve where the problem might be?


1 reply

Userlevel 1
Badge +8

Hi,


 


Thanks for this related posted , Please see attached demo on how to Deserialize with a Endpoint Webservice


 


If this document was helpful, please can you click on the drop down and mark this as Accept the Solution on your end.


 


12213iDEBE3C72CAC33025.jpg


 


Regards

Reply