MultiValue Tools

 View Only
  • 1.  WebDE help with .net

    Posted 01-25-2023 22:05
    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
    ------------------------------


  • 2.  RE: WebDE help with .net

    ROCKETEER
    Posted 01-26-2023 12:04
    Elaine,

    There appears to be a lot of moving parts on this issue.   Opening a support case would be the best action to identify what is happening, and best course of action.

    ------------------------------
    Mike Rajkowski
    MultiValue Product Evangelist
    Rocket Internal - All Brands
    DENVER CO US
    ------------------------------



  • 3.  RE: WebDE help with .net

    Posted 01-26-2023 16:05
    Thanks Mike. They have support through a VAR who probably isn't interested in supporting projects other than their product, so I'm not sure if I can open one with Rocket directly, but I'll give it a shot. I feel like I'm probably on my own here, though.

    Do you have any comments on the documentation question? I seem to remember finding a site with examples at some point, but my memory is failing me.


    ------------------------------
    Elaine Litchfield
    Owner
    Elaine Litchfield Consulting
    San Diego CA US
    ------------------------------



  • 4.  RE: WebDE help with .net

    PARTNER
    Posted 01-26-2023 15:46
    Since you are using UniObjects it looks like what I use in Java (UOJ) for our connection to Universe or Unidata should work for you as well.

    .setSessionEncoding("ISO-8859-1");

    Posted: 01-26-2023 10:45



    ------------------------------
    Doug Averch
    Owner
    U2 Logic
    www.u2logic.com
    ------------------------------