I need to call a specific URL and then read and parse the XML-data returned by the server. As far as I know there isn't any built in way of doing this in ABL. Am I right?
I'm considering using a 3rd party program like for instance curl or wget. But that means calling the program, writing the data to disc and then reading the data and finally deleting the data. A bit of overhead.
Another solution could be to implement this using sockets, but since it's not 1992 I wan't to ask if I have any other options, clearly this has been done before!
OE10.2B on Suse Linux.
"input through" curl would work well
also have a look at the ipworks toolset for linux
Just discovered that the SAX-READER:SET-INPUT-SOURCE method does accept URL's as a file type so I could basically do
SAX-READER:SET-INPUT-SOURCE ("file","http://www.example.com/service.apsx?param=data¶m2=ddd"). I'll play around with it a little and if it works I'll stick to this. Otherwise I'll go for input through curl...
Well there is a nifty httpget.i routine that you can download from this KB:
But your SAX-READER-INPUT-SOURCE discovery sounds much better!
Let us know if that works for you.
I haven't really worked with the SAX-READER before but after some initial testing it seems to work. I call the URL, receive the XML and can extract data! That's about all I need to do.
Well that is really good to know. Thanks for the hint!
I checked the documentation and apparently the LOAD method of the x-document object does support the same syntax. Handy for us who haven't used SAX that much!