.NET and AppServer - Forum - OpenEdge General - Progress Community
 Forum

.NET and AppServer

  • Hello Everyone,

    Lately I was checking how to control AppServer using C#. I would like to say that I am disappointed, the documentation from this website is very poor and even contains multiple mistakes in examples (logic and how it should be used). I even have used JAVA documentation writing C# code because JAVA documentation was in a lot better quality comparing to .NET one. And ProxyGen has some problems with how it compiles everything to .NET assembly. When I put any code which uses Temp-Table as parameter it will not be able to generate me assembly files, while still it will be able to do it with JAVA. (Still looking for any ways how to accomplish it). Here is even such this as Progress.Java (namespace). It looks that they had support for JAVA and decided to port in to .NET, but did not but a lot of effort doing this resulting in poor quality .NET support. Isn't that strange? I was not expecting that poor quality.

  • Hi David,

    the Java and the .NET Proxy are fundamentally different. The Progress.Java Namespace in the assemblies deployed from Progress (containing the AppServer communication protocol) seem the contain internal functionality required for the Name Server or AppServer Broker communication - all java processes running on the server.

    I personally had good success in working through the documentation. I think it's pretty good step-by-step. But I must admit, that I never tried the sample code...

    Also, when following the various proxy types over the years, it get's clear, that the .NET proxy has a certain preference at OE development: New features like the new data types/prodatasets been added to the .NET proxy before all the other proxy options.

    it compiles everything to .NET assembly. When I put

    any code which uses Temp-Table as parameter it will

    not be able to generate me assembly files, while

    still it will be able to do it with JAVA. (Still

    Do you have details on the errors you are receiving? They should be in the log file generated by proxygen.

    The two most common cases are:

    1.) Wrong .NET SDK. The ProxyGen needs the xsd.exe utility of the .NET SDK to generate the c# source code for a typed dataset/temp-table in the proxy assembly. There are some dependencies between the SDK version and the OpenEdge version.

    What version of OpenEdge are you using and which SDK do you have installed?

    2.) Missing .NET SDK / Unable to find SDK if more than one version installed.

    Specifying the compiler (csc and xsd path) to the right version helps here. That's an option in the generate proxy dialog.

    Besides than this there have been some issues or limitations when more than one temp-table had the same name but different schema. The K-Base has o number of articles here that should describe the problem and workarounds.

    From an architectural point of view (and not because you had some issues) it might be a good advice to use dynamic temp-table (TABLE-HANDLE) parameters instead of static ones. This increases the flexibility a lot.

    Any more detail on your issues might help in giving you additional help!

    Mike

  • I am quite new to progress so I am sorry if I don not know many things. The examples are really faulty, that is for sure. Talking about the ProxyLog I do not have it at this time, but the problem was related with the syntax. There was a few wrong tokens, trying to compile everything myself I got error that ttTabeDataTable is missing in namespace, while still ttTableDataTable.cs being included in compile command, but error about wrong tokens.

    For this testing I am using Visual C# 2008 with SP1 and latest .NET Framework SDK (v2.0). To be more specific you will have to wait till tomorrow. Right now I am using 9.0E, 10.1C and 10.2A OpenEdnge versions. I was using 10.1C for this test. The .NET version wtih SP1 update should be 3.5 now. But ProxyGen as I noted is using 2.0XXX version of .NET.

    Update

    Here is the small example procedure:

    DEF TEMP-TABLE ttTestas

    FIELD num AS INT.

    DEF INPUT PARAM pPirmas AS INT.

    DEF OUTPUT PARAM TABLE FOR ttTestas.

    CREATE ttTestas.

    ASSIGN ttTestas.num = pPirmas.

    Here is the log:

      • ProxyGen, Progress Version 10.1C

      • Checking for existence of .r files ...

      • Processing non-persistent procedures ...

      • Processing: C:\Documents and Settings\DAbdurachmanov.BALTIC-AMADEUS\Desktop\ketvirtas.r ...

    -- Parsing r-code ...

    MAIN ketvirtas.p

    INPUT pPirmas INTEGER

    OUTPUT ttTestas TABLE

    TABLE: ttTestas

    num integer

    -- No customizations; Validation not necessary

      • Processing persistent procedures ...

      • Checking method and parameter names ...

      • Generating .NET proxies ...

    Creating AssemblyInfo.cs ...

    Creating ttTestasSchema.cs ...

    Creating ManoTrys.cs ...

    Creating strongly typed datatable classes ...

    C:\pro\10.1C\OpenEdge\dotnet\bin\PathFinder /csc

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc /t:exe /out:C:\tmp\ManoTrys\BA\StrongTypesNS\ttTestas.exe C:\tmp\ManoTrys\BA\StrongTypesNS\ttTestasSchema.cs

    C:\tmp\ManoTrys\BA\StrongTypesNS\ttTestas.exe

    C:\pro\10.1C\OpenEdge\dotnet\bin\PathFinder /xsd

    C:\Program Files\Microsoft.NET\SDK\v2.0\Bin\xsd /d /n:BA.StrongTypesNS C:\tmp\ManoTrys\BA\StrongTypesNS\ttTestas.xsd

    Compiling .NET proxies and creating .dll ...

    C:\pro\10.1C\OpenEdge\dotnet\bin\PathFinder /csc

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc /t:library "/r:C:\pro\10.1C\OpenEdge\dotnet\deploy\signed\Progress.o4glrt.dll" /out:C:\tmp\ManoTrys\BA\ManoTrys.dll C:\tmp\ManoTrys\BA\StrongTypesNS\ttTestas.cs C:\tmp\ManoTrys\BA\ManoTrys.cs C:\tmp\ManoTrys\BA\AssemblyInfo.cs

    >>ERROR compiling .NET classes

    Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053

    for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

    Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

    StrongTypesNS\ttTestas.cs(255,1): error CS1519: Invalid token '*' in class, struct, or interface member declaration

    StrongTypesNS\ttTestas.cs(255,18): error CS1002: ; expected

    StrongTypesNS\ttTestas.cs(255,30): error CS1002: ; expected

    StrongTypesNS\ttTestas.cs(255,37): error CS1519: Invalid token '/' in class, struct, or interface member declaration

    StrongTypesNS\ttTestas.cs(561,6): error CS1513: } expected

    Deleting intermediate files ...

      • Generation failed

    Search for '>>ERROR' and '>>WARNING' in this log to find any problems.

    Message was edited by:

    David Abdurachmanov

  • I used synchronize program to capture ProxyGen generated file and tried to compile myself using the same command-line commands as is in log. And again it did not compile and with the last command. This time resulting in:

    ManoTrys.cs(176,66): error CS0234: The type or namespace name 'ttTestasDataTable' does not exist in the namespace

    'BA.StrongTypesNS' (are you missing an assembly reference?)

    It looks really strange, all files are given to compiler. BA.StrongTypesNS namespace does exist and it does have ttTestasDataTable and it looks that there are no conditional compiler directives stopping it from compiling.

  • Hi,

    this is a error I have me too.

    Using the OpenEdge 10.1B everything works very vell because the ProxyGenerator

    use the Framework .Net 1.

    When I installed the OpenEdge 10.2A this versionn install Framework .Net 2

    and I have the same error like you.

    A solution is to use a clean desktop with Framework .Net 1. and OpenEdge 10.1C.

    Another solution is to use an LONGCHAR and a xml OUTPUT file or:

    DEF OUTPUT PARAM TABLE-HANDLE ttTestas.

    I give you some examples in attachement

    DynTT.p

    getDynamicTempTable.p

  • Then the solution should be to had the 1.1 SDK (and framework) on your PC as well and use the custom compiler settings and use the xsd.exe and csc.exe from .NET 1.1.

    One is part of the framework and one of the SDK (I guess xsd.exe is part of the SDK).

  • You know the problem was solved by using XSD tool from 1.1 SDK and CSC from 2.0. Basically you can not use 1.1 CSC for compiling because Progress .NET Assemblies are compiled with the second version. So, only second and higher version is required. But for class generator you can use XSD 1.1.

    I have noticed that you should be using the same .NET version for client too, but tried writting application with 3.5 SP1 and it worked flawlessly.