This could be an "I don't know what I'm doing" type issue, as I've rarely had to use this and don't live and breathe this stuff, but I'm running out of ideas so I thought I'd go into beg for help mode.
I have a .net core 3.1 app written in C# that communicates with Unidata 8.2 on Windows via WebDE 5.3 using RPC calls. Everything was working great with WebDE 4.x but I'm struggling with 5.3.
I can communicate with UniData and retrieve a response. The response is a @AM delimited string on the Unidata side. When I receive the response it's just one long string delimited with the default unicode character, 65533. I looked for someplace to set the character set/encoding but didn't find anything obvious.
1) Are there any updates to the documentation that show current RPC examples? The 5.3.1 docs show the method is setConnection but it appears you need to use ActiveConnection instead. I'm wondering if anything else has changed that I could be missing.
2) What needs to be updated in the project so I can use getProperty() as it was intended?
3) Do I have the correct dlls / versions? Do I need to require a 32-bit build?
The project references the DLLs in the netcoreapp3.1 directory. RedPages.NET v 5.3.1.3809 and UODOTNET.dll v 1.0.0.0.
I experimented with a new project to targeting the .net 4.8 framework (referencing the dlls in the "net48" directory, UODOTNET.dll v 3.171.1.9003 and RedPagesNET.dll v 5.3.1.3809) I get this when the connection attempt is made:
Method not found: 'System.String System.AppDomainSetup.get_ConfigurationFile()
at IBMU2.UODOTNET.UniObjects.InitDefaultValues()
at IBMU2.UODOTNET.UniObjects.set_UOPooling(Boolean value)
at U2.WDE.RedPages.Connection.setProperties()
at U2.WDE.RedPages.Connection..ctor(String URL)
....
Not sure if I need to update a package or what's going on.
This is a simplified version of what I'm doing:
using U2.WDE.RedPages;
Connection oConn = new Connection("accountnamehere");
RedObject oCust = new RedObject();
oCust.ActiveConnection = oConn;
string method = "MYRPCSUB";
string param1 = "params";
string param2 = "params";
RecordSet rs = oCust.callRPC(method, param1, param2);
string returnedData = rs.getProperty("SERVERSTATUS"); // this returns "STATUS" + (char)65533 + "SERVERMESSAGE=MESSAGE"
And in Unidata:
SUBROUTINE MYRPCSUB(PARAMS,RECORD,RESPONSE)
RESPONSE = ''
RESPONSE<-1> = "SERVERSTATUS=STATUS"
RESPONSE<-1> = "SERVERMESSAGE=MESSAGE"
RETURN
Would someone please be so kind as to point me in the right direction?
------------------------------
Elaine Litchfield
Owner
Elaine Litchfield Consulting
San Diego CA US
------------------------------