Hi, OE11.3 SP03 I'm trying to learn working with classes in OE. I've read some documents and watched videos. It seems that it isn't possible to pass a class as a parameter to an AppServer (error 13224). Now we send some parameters to the AppServer but I was hoping changing this by just send a class. Is it correct that this isn't possible ? And how can I accomplish the same behaviour or do I need to stick with just sending parameters ? Kind regards Bart S.
Is OpenEdge 11.4 (or newer) an option? Object serialization was added to the ABL as part of that release.
In the past, we have used our own JSON Serialization implementation, that allowed us to send ABL classes as JSON strings and deserialize them:
Hmm, upgrading OpenEdge 11.4 is not an option at this moment. At this point, passing a class to the appserver would be the only reason to upgrade ....
I'll have a look in your examples, I hope I can get around it with your suggestion.
Thanks for replying !
Hi Mike,
Looked into your supplied examples but I really can't figure out how you place the class into a longchar to pass it to the appserver and how to read that longchar at the appserver side ....
Till a certain point I understand what you do, but then you've lost me ....
github.com/.../serialize-customer.p
serializes an object into lcSerialization.
github.com/.../deserialize-customer.p
deserializes from lcSerialization into an object.
is the sample Customer object.
Thanks, but I think that I know the reason why I didn't got it.
In serialize-customer.p you have the following statement:
lcSerialization = oCustomer:Serialize() .
But from where comes the serialize() ? I'm on OE11.3, is it possible that this isn't working in OE11.3 ?
Kind regards,
Bart S.
|
Hi Mike,
Thanks for you patience. The last two days I've been trying to get this work, but didn't succeed. Seems like a lot of overhead to just get some parameters to the appserver. I was hoping to be able to pass the class, but in 11.3 it isn't possible.
I'll think I will use a temp-table and do a 'WRITE-JSON' and 'READ-JSON' and then pass the Longchar. Maybe not the most elegant way but I'll have to wait for 11.4 > ...
Many thanks and kind regards,
Bart S.