go to post Enrico Parisi · Dec 20, 2022 Hi Yuri, thank you for your sample, I noticed you don't handle/consider the response from EPRSave(). Are you actually using that API in a production system?
go to post Enrico Parisi · Dec 14, 2022 Try enabling the log in the Java Gateway. In Management Portal: System Administration > Configuration > Connectivity > External Language Servers > Edit External Language Server Edit the "%Java Server" (you may need to stop it, if started) and in Advanced Settings specify a Log File. Then reproduce the problem and check the log file. The log file (in some case) can grow significantly, you may want to disable it when done. Enrico
go to post Enrico Parisi · Dec 14, 2022 Frankly I cannot see any advantage in using the sample you posted, it makes things more complicated with no advantage and no, it's not faster than just use a plain simple property. There are cases when those "tricks" (calculated properties, Set/Get methods) can be useful, but that's not the case of the code in your sample. Regarding VALUELIST, it makes it easy and simple to define a (typically small) set of valid values for a property, then, if necessary, you can optionally provide a "user friendly" representation of those value. If you don't find it useful or don't need it, well....don't use it. Enrico
go to post Enrico Parisi · Sep 8, 2022 The solution in simple....if you know it: set addressArray=netGate.new("remote.test.Address[2]") do addressArray.%set(0, home) do addressArray.%set(1, home2) set person = netGate.new("remote.test.Person") do person.setAddressArray(addressArray) set addressArray2=person.getAddressArray() for i=0:1:1 { set addr = addressArray2.%get(i) w !, addr.city } In addition to %set() and %get() method for arrays there are also %setall(), %getall() methods. Hopefully these methods will be documented sometime in the future. Enrico
go to post Enrico Parisi · Sep 7, 2022 I realized the problem using "Recast", the gateway needs to be instantiated using the new gateway. I had to fix a couple of things related to how the datatypes are casted and now it works. However, this is not exactly what I was looking for, as mentioned my goal is to convert existing code that use the no longer documented "legacy gateway" to "new code" using the current (poorly) documented $system.external. My goal is to move "forward" my code for current and future releases of IRIS.Removing the need of the imported proxy classes also simplify the IRIS upgrade process. Thank you again and enjoy your vacation! Enrico
go to post Enrico Parisi · Sep 7, 2022 Hi Stuart, thank you so much for your answer and effort, I feel sorry for your vacation!! As mentioned, to keep things simple in my test instead of using my "real stuff" (somewhat more complex) I'm using the "old" test code %Net.Remote.DotNet.Test and corresponding .NET project that I have compiled with .NET Framework 4.5, this provides a simple testbed to test basic functionality. Using the now undocumented legacy gateway the test works fine Then, when I: set ^%SYS("Gateway","Remote","Recast",namespace)=1 and reimport proxy classes, I can see that the generated proxy classes are different, so the "recast" had some effect. Unfortunately running the test code....fail in the very first line: USER>do ##class(%Net.Remote.DotNet.Test).Test(58555) Errore #5023: Errore del gateway di Java: <ZJGTW>%dispatch+17^%Net.Remote.Base.1 It fails in the line (the first call to .NET class): Set student=##class(remote.test.Student).%New(gateway,29,"976-01-6712") So...neither this approach works...at all. Thank you again, Enrico
go to post Enrico Parisi · Sep 6, 2022 Unfortunately it does not work just as it always has, a %ListOfObjects cannot be passed to a .NET method that expect a .NET array as argument, like the setAddressArray() method. It simply does not work.
go to post Enrico Parisi · Sep 2, 2022 I don't think you can add SqlProc at class level, but you can modify the class definition programmatically. Look at the class %Dictionary.MethodDefinition and the property SqlProc, if you set it to 1 is the same as adding [SqlProc] to the method. %Dictionary.MethodDefinition is a child class of %Dictionary.ClassDefinition. Of course I advise you to test it in a temporary system/namespace before... Hope it helps, Enrico
go to post Enrico Parisi · Mar 25, 2020 Hi Guillaume, I think the ParseFile method of %XML.TextReader is what you are looking for. I've not tested, but according to the documentation, it should work. https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls... Note: the link is to IRIS doc., but should be the same in Ensemble 2017. Enrico