Resolved .net Openclient

Aivaras

New Member
Hello,

I've been trying to build a .Net OpenClient to connect to Progress Pacific server using a Proxy. It's working fine, but it seems like it wouldn't be efficient when deployed, since i have to regenerate and reinstal .Net assemblies for all the clients on every server-side change. Is there any way to automatise this process or use a different aproach altogether?

I'm running OpenEdge 11.5 and Visual Studio 2015 on a Windows 10 64bit machine.

Thanks.
 
Last edited:

TheMadDBA

Active Member
Use the Open API instead of Proxygen... in my opinion it is much easier for deployments and changes. At first it makes the creation a little harder but you can create your own connection class to handle most of the common functions.

OpenEdge 11.5 Documentation
 

RealHeavyDude

Well-Known Member
I have no experience with the .NET open client - but I have lots of experience with the Java open client. Basically with the Java open client I use both: One one hand I have built a generic data access layer in Java. On the other hand there is always a need for additional functionaly not part of the core that we access dynamically.

The generic data access layer is based on ProDataSets ( Progress ABL ) which end up being JavaSDOs ( service data objects ) in the Java world. Our data access layer converts the JavaSDO into collections of Java beans used by the Java client.

In Java it isn't either/or it is and.

Heavy Regards, RealHeavyDude.
 

TheMadDBA

Active Member
Interesting.... when you say the functionality isn't handled you mean with your core API? Or is there something missing from the Java Open Client that only proxygen does?
 

RealHeavyDude

Well-Known Member
There is nothing missing from the Java Open Client.

Maybe I was not clear: The generic data access layer provides the standard functionality for fetching data and supports the CRUD operations. For this generic data access layer, which API is pretty stable, we generated the static Java proxy. Of course that does not cover everything so that there will always be a need to use functionality provided by the AppServer that is not part of _OUR_ standard API. In such cases we use the dynamic invocation that the Java Open Client offers.

Heavy Regards, RealHeavyDude.
 

Aivaras

New Member
Sorry to bring this back up, but i'm having problems with OpenApi client. When trying to build .Net client is there a sepcific set of assemblies i need to use? When i'm using Progress.o4glrt.dll and Progress.Messages.dll (provided with proxy sample) the code compiles, but throws an exception during the runtime:

An unhandled exception of type 'System.BadImageFormatException' occurred in System.Windows.Forms.dll

Additional information: Could not load file or assembly 'Progress.o4glrt, Version=11.5.0.1114, Culture=neutral, PublicKeyToken=1a0c0a15bd34807c' or one of its dependencies. An attempt was made to load a program with an incorrect format.
So, yeah..
 
Last edited:

TheMadDBA

Active Member
Did you put the DLLs into the Global Assembly Cache or just into the project?

Do you have some smallish sample code you can upload or post?
 

Aivaras

New Member
Right now i put DLLs only into my .Net project. Code sample is really simpe, similar to one you showed me earlier.

Trying to run this procedure:

DEFINE INPUT PARAMETER Number AS INTEGER.
DEFINE OUTPUT PARAMETER ReturnNumber AS INTEGER.

ReturnNumber = Number * Number.

RETURN.

Client:

Connection myConn = new Connection
("AppServer://localhost/asbroker2", "", "", "");

// Set Session model for state-free
myConn.SessionModel = 1;

OpenAppObject openAO = new OpenAppObject(myConn, "mySvc");


// Create a place for RETURN-VALUE
int retVal;
int? temp = null;
// Create the ParamArray

ParamArray parms = new ParamArray(2);

// Set up input parameters
parms.AddInteger(0, 5, ParamArrayMode.INPUT);
// Set up Out parameters
parms.AddInteger(1, temp, ParamArrayMode.OUTPUT);

// Run the procedure
openAO.RunProc("GetCustOrds.p", parms);

// Get output parameters - use holder to handle unknown value
outValue = (int)parms.GetOutputParameter(1);

Though i'm still unsure if i'm using the right DLLs, any idea where i can get clean copies?

Thanks.
 

TheMadDBA

Active Member
The clean copies will be under your OE install directory.. %DLC%/dotnet/deploy

strongnamed-signed - strongly named and signed DLLs
signed - just signed
strongnamed - really low security
 
Top