LANSA Integrator - How to pass large base64 value
Posted: Tue Oct 30, 2018 6:52 pm
Hi all,
In order for Integrator to pass a value from a LANSA field to an entity defined either in an xml or json structure, that entity must be mapped to the corresponding LANSA field via LANSA Integrator Studio.
The problem that I am facing is the following. I have a large pdf that I must convert it to base64 and then map it to an xml entity.
Since the pdf is very large, defining a string field that will hold the base64 value of the pdf won't work as the base64 value of the pdf is almost 900000 characters.
So I decided to define inline a PRIM_DC.UniCodeString (Define_Com Class(#PRIM_DC.UnicodeString) Name(#CONTENT)) in order to pass to it the base64 value. The name of the defined PRIM_DC.UniCodeString (CONTENT) was used in the Integrator solution as a map to the xml entity.
It seems however that Integrator maps only defined fields (e.g. Define Field(#METADTA) Type(*STRING) Length(65535)). One solution that is provided is available only to soap solutions with the use of a "stream file" declaration.
So, my question is. How Can I pass to json or xml entities large base64 values? How can Integrator understand defined classes of PRIM_DC.UniCodeString in order to map them in json or xml entities?
Thanks in advance for your answers.
Regards,
Nick
In order for Integrator to pass a value from a LANSA field to an entity defined either in an xml or json structure, that entity must be mapped to the corresponding LANSA field via LANSA Integrator Studio.
The problem that I am facing is the following. I have a large pdf that I must convert it to base64 and then map it to an xml entity.
Since the pdf is very large, defining a string field that will hold the base64 value of the pdf won't work as the base64 value of the pdf is almost 900000 characters.
So I decided to define inline a PRIM_DC.UniCodeString (Define_Com Class(#PRIM_DC.UnicodeString) Name(#CONTENT)) in order to pass to it the base64 value. The name of the defined PRIM_DC.UniCodeString (CONTENT) was used in the Integrator solution as a map to the xml entity.
It seems however that Integrator maps only defined fields (e.g. Define Field(#METADTA) Type(*STRING) Length(65535)). One solution that is provided is available only to soap solutions with the use of a "stream file" declaration.
So, my question is. How Can I pass to json or xml entities large base64 values? How can Integrator understand defined classes of PRIM_DC.UniCodeString in order to map them in json or xml entities?
Thanks in advance for your answers.
Regards,
Nick