Hi,
I am able to compile the below code successfully, when I am calling this program I am getting the below run time error.
Could not access element 'GetHash' of class 'OpenEdge.Core.ByteBucket' using object of type 'OpenEdge.Core.ByteBucket' - caller compilation is out of sync with class compilation. (12882)
USING Progress.Lang.Object.
USING OpenEdge.Core.WidgetHandle.
USING OpenEdge.Core.String.
USING Progress.Json.ObjectModel.*.
USING OpenEdge.Net.HTTP.IHttpRequest.
USING OpenEdge.Net.HTTP.RequestBuilder.
USING OpenEdge.Net.HTTP.IHttpClientLibrary.
USING OpenEdge.Net.HTTP.lib.ClientLibraryBuilder.
USING OpenEdge.Net.HTTP.IHttpResponse.
USING OpenEdge.Net.HTTP.ClientBuilder.
USING OpenEdge.Net.HTTP.ResponseBuilder.
IF (ipc_Action = "Create") THEN
DO:
PUT "CREATE - POST" SKIP.
PUT "gc_URL:" SKIP.
PUT gc_URL FORMAT "x(1000)" SKIP.
http_Request = RequestBuilder:POST( gc_URL, obj_Json )
:ContentType('application/json')
:AcceptJson()
:Request
NO-ERROR.
END.
/* PUT (Update) to CRM */
IF (ipc_Action = "Update") THEN
DO:
PUT "UPDATE - PUT" SKIP.
PUT "gc_URL:" SKIP.
PUT gc_URL FORMAT "x(1000)" SKIP.
http_Request = RequestBuilder:PUT( gc_URL, obj_Json )
:ContentType('application/json')
:AcceptJson()
:Request
NO-ERROR.
END.
ASSIGN
http_Lib = ClientLibraryBuilder:Build():sslVerifyHost(NO):library
http_Client = ClientBuilder:Build():UsingLibrary(http_Lib):Client
http_Response = ResponseBuilder:Build():Response
.
http_Client:Execute(http_Request, http_Response) /* NO-ERROR */.
I am getting the error while running this line - http_Client:Execute(http_Request, http_Response) /* NO-ERROR */.
Thanks,
Sivarami Reddy
Openedge version is 11.5.1
Hi Mike,
for the below USING lines, I am compiling the program adding this pl - OpenEdge.Net.pl, so i have mentioned as .Net classes.
USING Progress.Lang.Object.
USING OpenEdge.Core.WidgetHandle.
USING OpenEdge.Core.String.
USING Progress.Json.ObjectModel.*.
USING OpenEdge.Net.HTTP.IHttpRequest.
USING OpenEdge.Net.HTTP.RequestBuilder.
USING OpenEdge.Net.HTTP.IHttpClientLibrary.
USING OpenEdge.Net.HTTP.lib.ClientLibraryBuilder.
USING OpenEdge.Net.HTTP.IHttpResponse.
USING OpenEdge.Net.HTTP.ClientBuilder.
USING OpenEdge.Net.HTTP.ResponseBuilder.
Hi Mike,
I am not using the OpenEdge.core.pl, Do I need to add this to my propath?
Thanks,
Sivarami Reddy M
Hi Mike,
I found the pl in three places and I have added gui and src pl , but there is no luck.
Path is - c:\Progress\OpenEdge11\gui\OpenEdge.Core.pl,c:\Progress\OpenEdge11\gui\OpenEdge.ServerAdmin.pl,c:\Progress\OpenEdge11,c:\Progress\OpenEdge11\bin,C:\Progress\OpenEdge11\tty\netlib\OpenEdge.Net.pl,C:\Progress\OpenEdge11\gui\netlib\OpenEdge.Net.pl,C:\Progress\OpenEdge11\src\OpenEdge.Core.pl.
Thanks,
Sivarami Reddy M
You need the one in C:\Progress\OpenEdge11\gui, because that is where you pick up the other one.
Hi Simon,
I have checked that also, there is no luck. Hope sequence of propath is fine.
c:\Progress\OpenEdge11\gui\OpenEdge.Core.pl,c:\Progress\OpenEdge11\gui\OpenEdge.ServerAdmin.pl,c:\Progress\OpenEdge11,c:\Progress\OpenEdge11\bin,C:\Progress\OpenEdge11\tty\netlib\OpenEdge.Net.pl,C:\Progress\OpenEdge11\gui\netlib\OpenEdge.Net.pl,
Thanks,
Sivarami Reddy
When I compiled it's compiles successfully and When I am trying to execute from DB write trigger I have this issue.
Thanks,
Sivarami Reddy
This is not a rest service, I have over written the environment propath through program and then I am calling this program. The below is the path - C:\Progress\OpenEdge11\gui,C:\Progress\OpenEdge11\gui\adecomm.pl,C:\Progress\OpenEdge11\gui\adecomp.pl,C:\Progress\OpenEdge11\gui\adedesk.pl,C:\Progress\OpenEdge11\gui\adedict.pl,C:\Progress\OpenEdge11\gui\adeedit.pl,C:\Progress\OpenEdge11\gui\adeicon.pl,C:\Progress\OpenEdge11\gui\aderes.pl,C:\Progress\OpenEdge11\gui\adeshar.pl,C:\Progress\OpenEdge11\gui\adeuib.pl,C:\Progress\OpenEdge11\gui\adeweb.pl,C:\Progress\OpenEdge11\gui\adexml.pl,C:\Progress\OpenEdge11\gui\prodict.pl,C:\Progress\OpenEdge11\gui\protools.pl,C:\Progress\OpenEdge11\,C:\Progress\OpenEdge11\\bin,c:\Progress\OpenEdge11\gui\ablunit.pl,c:\Progress\OpenEdge11\gui\dataadmin.pl,c:\Progress\OpenEdge11\gui\OpenEdge.BusinessLogic.pl,c:\Progress\OpenEdge11\gui\OpenEdge.ServerAdmin.pl,c:\Progress\OpenEdge11,c:\Progress\OpenEdge11\bin,C:\Progress\OpenEdge11\gui\OpenEdge.Core.pl,C:\Progress\OpenEdge11\gui\netlib\OpenEdge.Net.pl
Thanks,
Sivarami Reddy M
We have another program same like this it is running, now I have added some libraries and I have changed the building response part to below with USING componenets.
IF (ipc_Action = "Create") THEN
DO:
http_Request = RequestBuilder:POST( gc_URL, obj_Json )
:ContentType('application/json')
:AcceptJson()
:Request
NO-ERROR.
END.
IF (ipc_Action = "Update") THEN
DO:
http_Request = RequestBuilder:PUT( gc_URL, obj_Json )
:ContentType('application/json')
:AcceptJson()
:Request
NO-ERROR.
END.
ASSIGN
http_Lib = ClientLibraryBuilder:Build():sslVerifyHost(NO):library
http_Client = ClientBuilder:Build():UsingLibrary(http_Lib):Client
http_Response = ResponseBuilder:Build():Response
.
http_Client:Execute(http_Request, http_Response) /* NO-ERROR */.
Earlier Code
IF create-update = "Create" THEN
oRequest = RequestBuilder:POST("http://" + vcHost + ":" + vcPort + "/crmcreatecontact", oJson)
:ContentType('application/json')
:AcceptJson()
:Request NO-ERROR.
ELSE
oRequest = RequestBuilder:PUT("http://" + vcHost + ":" + vcPort + "/crmupdatecontact/" + STRING(tdid), oJson)
:ContentType('application/json')
:AddHeader("Accept","application/json;odata=verbose")
:AcceptJson()
:Request NO-ERROR.
oResponse = ClientBuilder:Build():Client:Execute(oRequest) NO-ERROR.
Thanks,
Sivarami Reddy M
I got the answer we need to add both the CHUI and GUI .pl to propath.