Release 10.1A: OpenEdge Development:
.NET Open Clients

> ## Remote 4GL methods

> ProxyGen maps each Progress 4GL non-persistent procedure, internal procedure, and user-defined function exposed on the AppServer to a remote 4GL method. These methods are part of an AppObject, SubAppObject, or ProcObject. ProxyGen generates method names using automatic conversion and conventions. For more information on proxy generation, see OpenEdge Development: Open Client Introduction and Programming .

> A sample non-persistent procedure follows:

>     AddCustomer.p:
>     DEFINE INPUT PARAMETER name AS CHARACTER.
>     DEFINE INPUT PARAMETER phone AS CHARACTER.
>     DEFINE INPUT PARAMETER email AS CHARACTER.
>     DEFINE OUTPUT PARAMETER CustomerNumber AS INTEGER.
>          .
>          .
>          .

> ProxyGen generates the following .NET proxy method:

>     public void AddCustomer(string name, string phone, string email,
>          out int CustomerNumber)

> ##### Passing parameters

> ProxyGen maps 4GL data types to equivalent data types in .NET for 4GL `INPUT`, `OUTPUT`, and `INPUT-OUTPUT` parameters. For details, see Chapter 4, " Passing Parameters."

> ##### Handling return values

> When using ProxyGen, you optionally can specify whether the 4GL `RETURN-VALUE` should be added to the proxy method, for each non-persistent procedure and internal procedure. (User-defined functions always return a value.) If you specify this, the method returns `string`; otherwise, the method returns `void`. If specified for the non-persistent procedure above, ProxyGen generates the following .NET proxy method:

>     public string AddCustomer(string name, string phone, string email,
>       out int CustomerNumber)

> Also, if you did not specify that the 4GL `RETURN-VALUE` should be returned, the client can access the current value of the 4GL `RETURN-VALUE` function by calling the `_GetProcReturnString` common method on the Open Client object. See the "Common methods" section for additional information.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095