Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Iris vs Java

Question
Marcio Coelho · Nov 30, 2021

Iris vs Java

Hello. I'm having problems migrating a java application that is running with cache 2018 to Iris
The application uses json generated by the cache to receive it as a string in java.

Basically an instance of the "%ZEN.proxyObject" class
On Iris I've been trying to convert this '%ZEN.proxyObject Object to an instance of the %GlobalBinaryStream class and I need to get it via reference.
But I haven't had success yet. I Just found example with primitive dataTypes via reference and I need a Streams.

Has anyone done something like that?
This is my cache class example:

ClassMethod Login(ByRef streamReturn As %GlobalBinaryStream, user As %String, pass As %String) As %Status [ ProcedureBlock = 1 ]
{
 set streamReturn=##class(%GlobalBinaryStream).%New()
 set cswReturn=##class(%ZEN.proxyObject).%New()
 set cswReturn.success=1
 ;
 set sc=##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.streamReturn,cswReturn,,,,"aelo")  ;
 quit sc
}

I need to get streamReturn with java native api...
Thanks 


 

#Java #InterSystems IRIS
Product version: IRIS 2021.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux for x86-64) 2021.1 (Build 215U) Wed Jun 9 2021 09:48:12 EDT

Source URL:https://community.intersystems.com/post/iris-vs-java