OpenEdge.Net.pl

Posted by Giancarlo Alberto Somma on 09-May-2018 10:54

Hi,

I am trying to use OpenEdge.Net.pl. The propath is C:/JCA/OpenEdge.Net.pl and I have include the libray, compiler is giving below error messages:

Impossibile trovare la classe o interfaccia OpenEdge.Net.HTTP.RequestBuilder. (12886)

** Impossibile interpretare linea 1. (196)
Impossibile trovare la classe o interfaccia OpenEdge.Net.HTTP.IHttpRequest. (12886)
** Impossibile interpretare linea 2. (196)
Tipo di dati specificato non valido: IHttpRequest. Specificare un tipo di dati come 'character' o il nome di una classe. (5638)
** Impossibile interpretare linea 5. (196)

OpenEdge V. 11.7 and OS - Windows.

Thanks in advance,

G.

All Replies

Posted by Mike Fechner on 09-May-2018 11:06

This works for me, 11.7.2 – what‘s the output of the Message-Statement? Mind sharing your source code?
 
DEFINE VARIABLE o AS OpenEdge.Net.HTTP.RequestBuilder NO-UNDO .
 
MESSAGE SEARCH ("OpenEdge/Net/HTTP/RequestBuilder.r")
    VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Mittwoch, 9. Mai 2018 17:55
An: TU.OE.Development@community.progress.com
Betreff: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 

Hi,

I am trying to use OpenEdge.Net.pl. The propath is C:/JCA/OpenEdge.Net.pl and I have include the libray, compiler is giving below error messages:

Impossibile trovare la classe o interfaccia OpenEdge.Net.HTTP.RequestBuilder. (12886)

** Impossibile interpretare linea 1. (196)
Impossibile trovare la classe o interfaccia OpenEdge.Net.HTTP.IHttpRequest. (12886)
** Impossibile interpretare linea 2. (196)
Tipo di dati specificato non valido: IHttpRequest. Specificare un tipo di dati come 'character' o il nome di una classe. (5638)
** Impossibile interpretare linea 5. (196)

OpenEdge V. 11.7 and OS - Windows.

Thanks in advance,

G.

View online

 

You received this notification because you subscribed to the forum.  To stop receiving updates from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

Posted by Giancarlo Alberto Somma on 09-May-2018 11:15

is a simple code from Progress documentation. I copy openedge.net.pl from  C:\JCA\OpenEdge\gui\netlib

USING OpenEdge.Net.HTTP.RequestBuilder.

USING OpenEdge.Net.HTTP.IHttpRequest.

DEFINE VARIABLE httpUrl AS CHARACTER NO-UNDO.

DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO.

httpUrl = "http://www.progress.com".

oRequest = RequestBuilder:Get(httpUrl)

                  :Request.

Posted by Mike Fechner on 09-May-2018 11:42

What does the message statement from my previous sample say? When that says ? your PROPATH setting is not correct.

Posted by Stefan Drissen on 09-May-2018 11:44

And for some confirmation that it really does work see: abldojo.services.progress.com:443/

Posted by Giancarlo Alberto Somma on 09-May-2018 12:01

I found the problem. It's not enough to save library on propath folder, but insert it in the propath string (PROPATH=c:\jca,c:\jca\xml,c:\jca\OpenEdge.Net.p)

Many thanks.

Posted by Giancarlo Alberto Somma on 09-May-2018 12:27

Hi,

I run this program:

USING Progress.Json.ObjectModel.JsonObject.

USING Progress.Json.ObjectModel.ObjectModelParser.

USING Progress.Lang.Object.

USING OpenEdge.Core.WidgetHandle.

USING OpenEdge.Core.String.

USING OpenEdge.Net.HTTP.IHttpRequest.

USING OpenEdge.Net.HTTP.IHttpResponse.

USING OpenEdge.Net.HTTP.ClientBuilder.

USING OpenEdge.Net.HTTP.RequestBuilder.

DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO.

DEFINE VARIABLE oResponse AS IHttpResponse NO-UNDO.

DEFINE VARIABLE oEntity AS Object NO-UNDO.

DEFINE VARIABLE lcHTML AS LONGCHAR NO-UNDO.

DEFINE VARIABLE hXmlDoc AS HANDLE NO-UNDO.

oRequest = RequestBuilder:Get('obsv:5493/.../Clients')

               :Request.

oResponse = ClientBuilder:Build():Client:Execute(oRequest).

oEntity = oResponse:Entity.

MESSAGE

   oResponse:StatusCode SKIP

   oResponse:StatusReason SKIP    

VIEW-AS ALERT-BOX.

IF TYPE-OF(oEntity, JsonObject) THEN

   CAST(oEntity, JsonObject):WriteFile('temp/entity.json', true).

ELSE

IF TYPE-OF(oEntity, WidgetHandle) THEN

DO:

   hXmlDoc = CAST(oEntity, WidgetHandle):Value.

   hXmlDoc:save('file', 'temp/entity.xml').

END.

ELSE

DO:

   IF TYPE-OF(oEntity, String) THEN

      lcHTML = CAST(oEntity, String):Value.

   ELSE

      lcHTML = oEntity:ToString().

   /* Change extension per the Response's ContentType */

       CASE oResponse:ContentType:

       WHEN 'application/json' THEN

           COPY-LOB lcHTML TO FILE 'temp/entity.json'.

       WHEN 'text/html' THEN

           COPY-LOB lcHTML TO FILE 'temp/entity.html'.

       OTHERWISE

           COPY-LOB lcHTML TO FILE 'temp/entity.txt'.

    END CASE.

This string return a correct XML but OE cannot save as 'temp/entity.xml" but a simple txt file that contain "OpenEdge.Core.ByteBucket_7196".

May can help me?

Posted by Peter Judge on 09-May-2018 12:41

You will want to replace

IF TYPE-OF(oEntity, String) THEN
      lcHTML = CAST(oEntity, String):Value.
   ELSE
      lcHTML = oEntity:ToString().

With something like

case true:
  when type-of(oEntity, String) then
    lcHTML = cast(oEntity, String):Value.
  
   when type-of(oEntity, Memptr) then 
     lcHTML = cast(oEntity, Memptr):GetString(1).

   when type-of(oEntity, ByteBucket) then 
     lcHTML = cast(oEntity, ByteBucket):GetString().

   otherwise
     lcHTML = oEntity:ToString().
end case.

That should get you want you're after/

Posted by Giancarlo Alberto Somma on 09-May-2018 13:01

Thanks Peter. I replaced but I found error for Memprt:

Impossibile trovare la classe o interfaccia Memptr. (12886)

TYPE-OF 'Memptr' non consentito. TYPE-OF di destinazione deve essere di tipo definito dall'utente. (14447)

**  Impossibile interpretare linea 47. (196)

Thanks  a lot.

Posted by Mike Fechner on 09-May-2018 13:12

Did you add
 
USING OpenEdge.Core.* .
 
?
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Mittwoch, 9. Mai 2018 20:03
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 

Thanks Peter. I replaced but I found error for Memprt:

Impossibile trovare la classe o interfaccia Memptr. (12886)

TYPE-OF 'Memptr' non consentito. TYPE-OF di destinazione deve essere di tipo definito dall'utente. (14447)

**  Impossibile interpretare linea 47. (196)

Thanks  a lot.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

Posted by Giancarlo Alberto Somma on 09-May-2018 13:23

USING OpenEdge.Core.* .

now work fine. Create entity.txt that contains XML structure data.

Why do not create direcly entity.xml?

Thx.

Posted by Peter Judge on 09-May-2018 13:27

Because of this CASE statement
    /* Change extension per the Response's ContentType */

       CASE oResponse:ContentType:

       WHEN 'application/json' THEN

           COPY-LOB lcHTML TO FILE 'temp/entity.json'.

       WHEN 'text/html' THEN

           COPY-LOB lcHTML TO FILE 'temp/entity.html'.

       OTHERWISE

           COPY-LOB lcHTML TO FILE 'temp/entity.txt'.

    END CASE.

There's no check for XML. Add a WHEN with the appropriate XML and you should be good.

Posted by Giancarlo Alberto Somma on 09-May-2018 13:41

I found WHEN 'application/atom+xml' THEN

           COPY-LOB lcHTML TO FILE 'temp/entity.xml'.

many thanks.

Posted by Peter Judge on 09-May-2018 13:50

You can also use the MimeTypeHelper
 
 
if OpenEdge.Net.MimeTypeHelper:IsXML(oResponse:ContentType) then
       copy-lob lcHTML to file 'temp/entity.xml'.
 
which will do the right thing for other XML types too.
 
 

Posted by Giancarlo Alberto Somma on 10-May-2018 07:49

Thanks Peter work fine.

I add in the code:

oCredentials = new Credentials('application', 'amministratore', 'Its@55!').

oRequest = RequestBuilder:Get('obsv:5493/.../Clients')

               :AcceptJson()

               :UsingBasicAuthentication(oCredentials)

               :Request.

But OE do not create an XML file but entity.txt with contains different data format as application/octet-stream.

I have to pass only user and password.

Thx.

Posted by Giancarlo Alberto Somma on 10-May-2018 15:32

Hi Peter,

resolved with these lines:

// Create credentials

oCredentials  = new Credentials('some-domain', 'amministratore', '123456').

oRequest = RequestBuilder:Get('obsv:5493/.../ClientDocuments')

       // Add credentials to the request

       :UsingBasicAuthentication(oCredentials)

       :Request.

This work fine. Now I have to PUT data into. DO you have some suggestion to give me?

Thx.

Posted by Peter Judge on 10-May-2018 15:50

Put is very similar.
 
RequestBuilder:Put(<uri>, <message-body>):Request.
 
The <message-body> will depends on what you’re sending. You can send a variety of data (JSON, XML, binary, etc).
 
 

Posted by Giancarlo Alberto Somma on 10-May-2018 16:38

Thanks. Sorry another question: and for POST?

Inviato dal mio dispositivo Huawei



-------- Messaggio originale --------
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
Da: Peter Judge
A: TU.OE.Development@community.progress.com
CC:


Update from Progress Community
Peter Judge

Put is very similar.
 
RequestBuilder:Put(<uri>, <message-body>):Request.
 
The <message-body> will depends on what you’re sending. You can send a variety of data (JSON, XML, binary, etc).
 
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Posted by Peter Judge on 10-May-2018 16:56

Same for Put(), Post(), Delete(), etc.
 
 

Posted by Giancarlo Alberto Somma on 11-May-2018 01:42

I Jason,
 
this is correct?
 
oJson = new JsonObject().
/* assume that there's some real data in this object */
oJson:Add('temp/entity.xml', new JsonObject()).
 
oRequest = RequestBuilder:POST(httpUrl, oJson)
                :AcceptJson() /* we want to get JSON back */
                :Request.
Thx
 
Da: Peter Judge [mailto:bounce-pjudge@community.progress.com]
Inviato: giovedì, 10. maggio 2018 22:52
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
Put is very similar.
 
RequestBuilder:Put(<uri>, <message-body>):Request.
 
The <message-body> will depends on what you’re sending. You can send a variety of data (JSON, XML, binary, etc).
 
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

 Mail priva di virus. www.avast.com

Posted by Giancarlo Alberto Somma on 11-May-2018 02:12

The previuos example is wrong. I need to send XML. maybe there is an example.

Thx

Posted by Giancarlo Alberto Somma on 11-May-2018 15:19

Hi Peter,

I tried a lot of solutions without success. My problem is to define object for XML data file. An help is appreciate. Thx a lot in advance.

xmlfile = "c:/jca/temp/entity.xml".

hXmlRequestData:LOAD("LONGCHAR", xmlfile, FALSE).

httpUrl = "obsv:5493/.../Clients".

oXmlRequestData = NEW WidgetHandle(hXmlRequestData).

oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")

                :AcceptXml()

                :Request.

Posted by Peter Judge on 11-May-2018 15:30

That the code you have there should work.

What’s failing? What errors do you see?
 

Posted by Giancarlo Alberto Somma on 11-May-2018 15:40

 
 
Da: Peter Judge [mailto:bounce-pjudge@community.progress.com]
Inviato: venerdì, 11. maggio 2018 22:32
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
That the code you have there should work.

What’s failing? What errors do you see?
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

 Mail priva di virus. www.avast.com

Posted by Giancarlo Alberto Somma on 11-May-2018 15:41

DEFINE VARIABLE hXmlRequestData AS HANDLE NO-UNDO.

DEFINE VARIABLE oXmlRequestData AS WidgetHandle NO-UNDO.

Posted by Peter Judge on 11-May-2018 15:46

You need to create the X-DOC handle first.

DEF VAR hXmlRequestData AS HANDLE.

CREATE X-DOCUMENT hXmlRequestData.

hXmlRequestData:LOAD(...)

Alternatively you can just try

DEF VAR lxXml AS LONGCHAR.

COPY-LOB FILE "c:/jca/temp/entity.xml" to lcXml.

oRequest = RequestBuilder:POST(httpUrl, NEW OpenEdge.Core.String(lcXml))

               :AcceptJson() /* we want to get JSON back */

               :Request.

Posted by Giancarlo Alberto Somma on 11-May-2018 16:06

With the first example:
After
 
I must to pass the credential as GET I think.
 
Da: Peter Judge [mailto:bounce-pjudge@community.progress.com]
Inviato: venerdì, 11. maggio 2018 22:47
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 

You need to create the X-DOC handle first.

DEF VAR hXmlRequestData AS HANDLE.

CREATE X-DOCUMENT hXmlRequestData.

hXmlRequestData:LOAD(...)

Alternatively you can just try

DEF VAR lxXml AS LONGCHAR.

COPY-LOB FILE "c:/jca/temp/entity.xml" to lcXml.

oRequest = RequestBuilder:POST(httpUrl, NEW OpenEdge.Core.String(lcXml))

               :AcceptJson() /* we want to get JSON back */

               :Request.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

 Mail priva di virus. www.avast.com

Posted by Giancarlo Alberto Somma on 11-May-2018 16:06

For the second example:
 
Da: Peter Judge [mailto:bounce-pjudge@community.progress.com]
Inviato: venerdì, 11. maggio 2018 22:47
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 

You need to create the X-DOC handle first.

DEF VAR hXmlRequestData AS HANDLE.

CREATE X-DOCUMENT hXmlRequestData.

hXmlRequestData:LOAD(...)

Alternatively you can just try

DEF VAR lxXml AS LONGCHAR.

COPY-LOB FILE "c:/jca/temp/entity.xml" to lcXml.

oRequest = RequestBuilder:POST(httpUrl, NEW OpenEdge.Core.String(lcXml))

               :AcceptJson() /* we want to get JSON back */

               :Request.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

 Mail priva di virus. www.avast.com

Posted by Mike Fechner on 11-May-2018 16:50

If xmlfile is a Character variable holding a file-name, the first parameter of the LOAD method should be “FILE”
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Freitag, 11. Mai 2018 22:21
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/380367.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/5430.image002.jpg
 

Hi Peter,

I tried a lot of solutions without success. My problem is to define object for XML data file. An help is appreciate. Thx a lot in advance.

xmlfile = "c:/jca/temp/entity.xml".

hXmlRequestData:LOAD("LONGCHAR", xmlfile, FALSE).

httpUrl = "obsv:5493/.../Clients".

oXmlRequestData = NEW WidgetHandle(hXmlRequestData).

oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")

                :AcceptXml()

                :Request.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

Posted by Giancarlo Alberto Somma on 12-May-2018 01:56

Thanks Mike. That’s right. But I have another error:
 
 
In both code.
 
oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")
                 :AcceptXml()
                 // Add credentials to the request
                 //:UsingBasicAuthentication(oCredentials)
                 :Request.  */
                
               
DEF VAR lcXml AS LONGCHAR.
COPY-LOB FILE "c:/jca/temp/entity.xml" to lcXml.
oRequest = RequestBuilder:POST(httpUrl, NEW OpenEdge.Core.String(lcXml))
               :AcceptJson() /* we want to get JSON back */
               // :UsingBasicAuthentication(oCredentials)
               :Request.
 
 
Da: Mike Fechner [mailto:bounce-mikefechner@community.progress.com]
Inviato: venerdì, 11. maggio 2018 23:52
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
If xmlfile is a Character variable holding a file-name, the first parameter of the LOAD method should be “FILE”
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Freitag, 11.
Mai 2018 22:21
An:
TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/380367.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/5430.image002.jpg
 

Hi Peter,

I tried a lot of solutions without success. My problem is to define object for XML data file. An help is appreciate. Thx a lot in advance.

xmlfile = "c:/jca/temp/entity.xml".

hXmlRequestData:LOAD("LONGCHAR", xmlfile, FALSE).

httpUrl = "obsv:5493/.../Clients".

oXmlRequestData = NEW WidgetHandle(hXmlRequestData).

oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")

                :AcceptXml()

                :Request.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

 Mail priva di virus. www.avast.com

Posted by Mike Fechner on 12-May-2018 02:00

Server not accessible? Server software not started?
 
(Personal) firewall active?
 
Try to open a web browser on that address:
 
 
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Samstag, 12. Mai 2018 08:58
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/81351.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/2746.image002.jpg
 
Thanks Mike. That’s right. But I have another error:
 
 
In both code.
 
oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")
                 :AcceptXml()
                 // Add credentials to the request
                 //:UsingBasicAuthentication(oCredentials)
                 :Request.  */
                
               
DEF VAR lcXml AS LONGCHAR.
COPY-LOB FILE "c:/jca/temp/entity.xml" to lcXml.
oRequest = RequestBuilder:POST(httpUrl, NEW OpenEdge.Core.String(lcXml))
               :AcceptJson() /* we want to get JSON back */
               // :UsingBasicAuthentication(oCredentials)
               :Request.
 
 
Da: Mike Fechner [mailto:bounce-mikefechner@community.progress.com]
Inviato: venerdì, 11. maggio 2018 23:52
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
If xmlfile is a Character variable holding a file-name, the first parameter of the LOAD method should be “FILE”
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Freitag, 11.
Mai 2018 22:21
An:
TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/380367.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/5430.image002.jpg
 

Hi Peter,

I tried a lot of solutions without success. My problem is to define object for XML data file. An help is appreciate. Thx a lot in advance.

xmlfile = "c:/jca/temp/entity.xml".

hXmlRequestData:LOAD("LONGCHAR", xmlfile, FALSE).

httpUrl = "obsv:5493/.../Clients".

oXmlRequestData = NEW WidgetHandle(hXmlRequestData).

oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")

                :AcceptXml()

                :Request.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 
 
Das Bild wurde vom Absender entfernt.
Mail priva di virus. www.avast.com

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

Posted by Giancarlo Alberto Somma on 12-May-2018 02:20

I disabled firewall and antivirus.
Working only with http not with https.
Besides sometimes OE shows another error:
 
Considering that http://obsv:5493/sdata/SageStart/SageStart/SAGE/Clients is internal resource on my PC.
 
Da: Mike Fechner [mailto:bounce-mikefechner@community.progress.com]
Inviato: sabato, 12. maggio 2018 09:02
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
Server not accessible? Server software not started?
 
(Personal) firewall active?
 
Try to open a web browser on that address:
 
 
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Samstag, 12. Mai 2018 08:58
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/81351.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/2746.image002.jpg
 
Thanks Mike. That’s right. But I have another error:
 
 
In both code.
 
oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")
                 :AcceptXml()
                 // Add credentials to the request
                 //:UsingBasicAuthentication(oCredentials)
                 :Request.  */
                
               
DEF VAR lcXml AS LONGCHAR.
COPY-LOB FILE "c:/jca/temp/entity.xml" to lcXml.
oRequest = RequestBuilder:POST(httpUrl, NEW OpenEdge.Core.String(lcXml))
               :AcceptJson() /* we want to get JSON back */
               // :UsingBasicAuthentication(oCredentials)
               :Request.
 
 
Da: Mike Fechner [mailto:bounce-mikefechner@community.progress.com]
Inviato: venerdì, 11. maggio 2018 23:52
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
If xmlfile is a Character variable holding a file-name, the first parameter of the LOAD method should be “FILE”
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Freitag, 11. Mai 2018 22:21
An:
TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/380367.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/5430.image002.jpg
 

Hi Peter,

I tried a lot of solutions without success. My problem is to define object for XML data file. An help is appreciate. Thx a lot in advance.

xmlfile = "c:/jca/temp/entity.xml".

hXmlRequestData:LOAD("LONGCHAR", xmlfile, FALSE).

httpUrl = "obsv:5493/.../Clients".

oXmlRequestData = NEW WidgetHandle(hXmlRequestData).

oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")

                :AcceptXml()

                :Request.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 
 
Das Bild wurde vom Absender entfernt.
Mail priva di virus. www.avast.com

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

Posted by Giancarlo Alberto Somma on 12-May-2018 02:30

This for https:
 
 
Da: Mike Fechner [mailto:bounce-mikefechner@community.progress.com]
Inviato: sabato, 12. maggio 2018 09:02
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
Server not accessible? Server software not started?
 
(Personal) firewall active?
 
Try to open a web browser on that address:
 
 
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Samstag, 12. Mai 2018 08:58
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/81351.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/2746.image002.jpg
 
Thanks Mike. That’s right. But I have another error:
 
 
In both code.
 
oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")
                 :AcceptXml()
                 // Add credentials to the request
                 //:UsingBasicAuthentication(oCredentials)
                 :Request.  */
                
               
DEF VAR lcXml AS LONGCHAR.
COPY-LOB FILE "c:/jca/temp/entity.xml" to lcXml.
oRequest = RequestBuilder:POST(httpUrl, NEW OpenEdge.Core.String(lcXml))
               :AcceptJson() /* we want to get JSON back */
               // :UsingBasicAuthentication(oCredentials)
               :Request.
 
 
Da: Mike Fechner [mailto:bounce-mikefechner@community.progress.com]
Inviato: venerdì, 11. maggio 2018 23:52
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
If xmlfile is a Character variable holding a file-name, the first parameter of the LOAD method should be “FILE”
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Freitag, 11. Mai 2018 22:21
An:
TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/380367.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/5430.image002.jpg
 

Hi Peter,

I tried a lot of solutions without success. My problem is to define object for XML data file. An help is appreciate. Thx a lot in advance.

xmlfile = "c:/jca/temp/entity.xml".

hXmlRequestData:LOAD("LONGCHAR", xmlfile, FALSE).

httpUrl = "obsv:5493/.../Clients".

oXmlRequestData = NEW WidgetHandle(hXmlRequestData).

oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")

                :AcceptXml()

                :Request.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 
 
Das Bild wurde vom Absender entfernt.
Mail priva di virus. www.avast.com

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

Posted by Giancarlo Alberto Somma on 14-May-2018 02:06

Hi Mike, Peter,
 
what I have to looking for this error.
Thx a lot.
 
Da: Mike Fechner [mailto:bounce-mikefechner@community.progress.com]
Inviato: sabato, 12. maggio 2018 09:02
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
Server not accessible? Server software not started?
 
(Personal) firewall active?
 
Try to open a web browser on that address:
 
 
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Samstag, 12. Mai 2018 08:58
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/81351.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/2746.image002.jpg
 
Thanks Mike. That’s right. But I have another error:
 
 
In both code.
 
oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")
                 :AcceptXml()
                 // Add credentials to the request
                 //:UsingBasicAuthentication(oCredentials)
                 :Request.  */
                
               
DEF VAR lcXml AS LONGCHAR.
COPY-LOB FILE "c:/jca/temp/entity.xml" to lcXml.
oRequest = RequestBuilder:POST(httpUrl, NEW OpenEdge.Core.String(lcXml))
               :AcceptJson() /* we want to get JSON back */
               // :UsingBasicAuthentication(oCredentials)
               :Request.
 
 
Da: Mike Fechner [mailto:bounce-mikefechner@community.progress.com]
Inviato: venerdì, 11. maggio 2018 23:52
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
If xmlfile is a Character variable holding a file-name, the first parameter of the LOAD method should be “FILE”
 
Von: Giancarlo Alberto Somma <bounce-obonelinux@community.progress.com>
Gesendet: Freitag, 11. Mai 2018 22:21
An:
TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
/cfs-file/__key/communityserver-discussions-components-files/19/380367.image001.png
Update from Progress Community
/cfs-file/__key/communityserver-discussions-components-files/19/5430.image002.jpg
 

Hi Peter,

I tried a lot of solutions without success. My problem is to define object for XML data file. An help is appreciate. Thx a lot in advance.

xmlfile = "c:/jca/temp/entity.xml".

hXmlRequestData:LOAD("LONGCHAR", xmlfile, FALSE).

httpUrl = "obsv:5493/.../Clients".

oXmlRequestData = NEW WidgetHandle(hXmlRequestData).

oRequest = RequestBuilder:POST(httpUrl, oXMLRequestData):ContentType("application/xml")

                :AcceptXml()

                :Request.

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 
 
Das Bild wurde vom Absender entfernt.
Mail priva di virus. www.avast.com

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Das Bild wurde vom Absender entfernt.
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

Immagine rimossa dal mittente.
 

Posted by Peter Judge on 14-May-2018 08:12

For HTTPS you will need to add the relevant certificate(s) to the OpenEdge certificate store using the certutil tool. There is more info in the documentation at https://documentation.progress.com/output/ua/OpenEdge_latest/gsins/managing-certificate-stores-for-openedge-clients.html#
 

Posted by Giancarlo Alberto Somma on 14-May-2018 15:36

Thanks Judge. But my error is also with http protocol. I don’t know what’s the problem now. What’s do you can suggest me? I’m locked. Many thanks.
 
Da: Peter Judge [mailto:bounce-pjudge@community.progress.com]
Inviato: lunedì, 14. maggio 2018 15:14
A: TU.OE.Development@community.progress.com
Oggetto: RE: [Technical Users - OE Development] OpenEdge.Net.pl
 
Update from Progress Community
 
For HTTPS you will need to add the relevant certificate(s) to the OpenEdge certificate store using the certutil tool. There is more info in the documentation at https://documentation.progress.com/output/ua/OpenEdge_latest/gsins/managing-certificate-stores-for-openedge-clients.html#
 

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

 

 Mail priva di virus. www.avast.com

Posted by marian.edu on 14-May-2018 23:58

This is a connection error, although that looks like an odd port for a web server you should still try to connect to the same URL (http://obsv:5493) in a web browser on the same machine where you try to connect from the Progress session. If it fails in the browser too then check the name resolution (DNS), doing a ping to 'obsv' does it at least translate the host name to an IP address (ping packages might not go through though). If the host name is resolved to an IP address then there might be other network related issues that makes the host unreachable, like being in a different network and no bridge set-up or simply a firewall on the server or somewhere in between (a router maybe). If the host name is not resolved to an IP address then you need to get the DNS setup fixed or obtain the server IP address and use that instead of the host name.


If it does work from the browser then the browser have a proxy set-up so it does not connects directly to the server but through a middle man that is allowed to pass through the firewall, you need to check what kind of proxy is that (http, socks) and then it might be possible to talk with the middle man although the dialect is a bit different... no idea if Peter's implementation supports proxies, if not .NET WebClient should work fine for you since you've started the thread with a .NET migration of some sort. 

 
Marian Edu

Acorn IT 
+40 740 036 212

This thread is closed