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:
- Taking the Base-64 <content> of the document/file to be converted.
- Using the Function Browser's To Binary method to convert the Base-64 string.
- Should then be left with array of bytes.
- 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?