Calling Yellowfin webservices from OpenEdge
Answered
Has anyone successfully connected to Yellowfin Webservices using Openedge and would be willing to share some sample code to get us started please? The end objective is to run a report passing some criteria to it and get an XLS or PDF a file as a result.
many thanks
Jon
Hi Jon,
I have attached a working Yellowfin Web service sample you can use from OpenEdge ABL.
Just a note that the objectName in the ReportServiceRequest works for both Report Web Service Name and the Report UUID.
Hope this solves your problem, give me a shout if you need additional information. Regards,
Jaun Sachs
Hi Jon,
I have attached a working Yellowfin Web service sample you can use from OpenEdge ABL.
Just a note that the objectName in the ReportServiceRequest works for both Report Web Service Name and the Report UUID.
Hope this solves your problem, give me a shout if you need additional information. Regards,
Jaun Sachs
Hello Jon,
Thanks for reaching out with your question. I'd like to start by guiding you towards our Yellowfin Wiki, where we have documented some of the more common web services, along with examples of code to leverage them.
Yellowfin Wiki: Web Services
In particular, it sounds like you'd be interested in a Report Service web service.
In addition, if you look inside the Yellowfin installation folder at <YellowfinInstall>/development/examples/webservices you can find some example .jsp files containing sample code for some of these services.
Unfortunately, offering assistance in the actual coding of web services is outside of the Yellowfin support contract. If you find that the information provided herein isn't sufficient for what you're after please let me know. We do have consulting options available through your Account Manager if further assistance is needed.
Does this help?
Thanks,
Ryan
Hello Jon,
Thanks for reaching out with your question. I'd like to start by guiding you towards our Yellowfin Wiki, where we have documented some of the more common web services, along with examples of code to leverage them.
Yellowfin Wiki: Web Services
In particular, it sounds like you'd be interested in a Report Service web service.
In addition, if you look inside the Yellowfin installation folder at <YellowfinInstall>/development/examples/webservices you can find some example .jsp files containing sample code for some of these services.
Unfortunately, offering assistance in the actual coding of web services is outside of the Yellowfin support contract. If you find that the information provided herein isn't sufficient for what you're after please let me know. We do have consulting options available through your Account Manager if further assistance is needed.
Does this help?
Thanks,
Ryan
Hi Ryan
Thanks for your input - I was hoping someone in the YF community who also use OpenEdge could help.
Trying to get my head around calling the webservice from within OpenEdge is proving to be a bit tricky.
Thanks.
Jon
Hi Ryan
Thanks for your input - I was hoping someone in the YF community who also use OpenEdge could help.
Trying to get my head around calling the webservice from within OpenEdge is proving to be a bit tricky.
Thanks.
Jon
Hi Jon,
Thanks for the update. I'll leave this question open in the meantime, in case anyone has additional input. It may help if you can provide a link to the OpenEdge product to which you're referring in particular. I've done a bit of searching and have found a handful of products under that name.
Thanks,
Ryan
Hi Jon,
Thanks for the update. I'll leave this question open in the meantime, in case anyone has additional input. It may help if you can provide a link to the OpenEdge product to which you're referring in particular. I've done a bit of searching and have found a handful of products under that name.
Thanks,
Ryan
I'm simply referring to the OpenEdge ABL (formerly known as Progress 4GL).
Thanks Jon
I'm simply referring to the OpenEdge ABL (formerly known as Progress 4GL).
Thanks Jon
Hi Jon,
Thanks for the clarification. This clears up my confusion, as OpenEdge has application servers, RDBMS types, and as you've shown me a programming language. As mentioned, I'll leave this open for a time to see if anyone on the Community has input on writing web services using OpenEdge ABL.
Thanks,
Ryan
Hi Jon,
Thanks for the clarification. This clears up my confusion, as OpenEdge has application servers, RDBMS types, and as you've shown me a programming language. As mentioned, I'll leave this open for a time to see if anyone on the Community has input on writing web services using OpenEdge ABL.
Thanks,
Ryan
Jon.
I have coded extensively in Openedge, It is super great for fast business logic. Not so great for lower level services.
We have a current internal application written in Openedge that does lots of 3rd party integration, mainly to REST services.
the best, fastest and least headache way to achieve this is to use 3rd party COM objects
I recommend you try IpWorks from n/Software.. yes you have to pay for it, but really it provides an amazing value set of robust web connectors that manage all the low level call stuff and really just allow you to script the business logic together.
I have not personally used it to connect to Yellowfin's web services, however, i have used it to connect to several SOAP and REST services..
While i mentioned that OpenEdge is not great coding directly to REST or SOAP, the COM interface it supports does work very well ...
I have included some code below that shows how i used the IPWORKS activeX Object to connect to a REST service (we no longer use) , but shows the basics of how to use Openedge with COM and the IpWorks ACtiveX object
IPWorks allow a free trial, so you can get it working before you subscribe.
Hope this helps ....
def var CH1 as com-handle no-undo.
def var CH2 as com-handle no-undo.
def var CH3 as com-handle no-undo.
create "ipworksssl.https" CH1 no-error.
create "diCryptOCX.sha256" CH2 no-error.
create "Crypto.CryptoData" CH3.
def var xxx as raw.
def var zzz as character.
assign
xxx = md5-digest(string(now))
zzz = guid(xxx)
zzz = LC(zzz)
.
def var lc_oauth as character no-undo.
def var lc_datetime as character no-undo.
def var lc_post as character no-undo.
def var lc_jsonmsg as character no-undo.
def var lc_extraheader as character no-undo.
assign
lc_datetime = string(iso-date(now))
lc_datetime = replace(lc_datetime,"+10:00","z")
lc_datetime = LC(lc_datetime)
lc_jsonmsg = ""
.
input from c:\i4\work\ROI-PostContact-Message-20150623201333-0.json.
repeat:
import unformatted lc_jsonmsg.
end.
input close.
output to OAuth2.txt.
lc_oauth = caps("POST") +
(chr(13) + chr(10)) +
LC("/api/v1/tables/contacts/insert") +
(chr(13) + chr(10)) +
"?apiKey=921ba61136784211acda2064de9eced9" +
(chr(13) + chr(10)) +
"nonce=" + zzz + "×tamp=" + lc_datetime +
(chr(13) + chr(10)) +
lc_jsonmsg +
(chr(13) + chr(10)) +
"8f3bbb9126424c16ae4bfe4937927cc6"
.
put unformatted lc_oauth.
put unformatted
skip(1)
"SHA265 = " CH2:StringHexHash(lc_oauth)
skip(1)
.
/* B64 Transform */
CH3:fromstring(CH2:StringHexHash(lc_oauth),1). /* HEX */
lc_oauth = CH3:tostring(2). /* base64 */
put unformatted
skip(1)
"BASE64 = " lc_oauth
skip(1)
.
assign
lc_extraheader = "nonce:" + string(zzz) +
(chr(13) + chr(10)) +
"timestamp:" + lc_datetime
.
put unformatted
skip(1)
.
put unformatted lc_extraheader.
CH1:Authorization = "ROI " + lc_oauth.
put unformatted
skip(1).
put unformatted
("ROI " + lc_oauth)
skip.
output close.
CH1:contenttype = "application/json; charset=utf-8".
CH1:postdata = lc_jsonmsg.
CH1:otherheaders = lc_extraheader.
assign
lc_post = "http://api.rightonin.com/api/v1/Tables/Contacts/Insert?apiKey=921ba61136784211acda2064de9eced9"
.
CH1:POST(lc_post).
output to c:\i4\Header.html.
export CH1:Transferreddata.
output close.
Jon.
I have coded extensively in Openedge, It is super great for fast business logic. Not so great for lower level services.
We have a current internal application written in Openedge that does lots of 3rd party integration, mainly to REST services.
the best, fastest and least headache way to achieve this is to use 3rd party COM objects
I recommend you try IpWorks from n/Software.. yes you have to pay for it, but really it provides an amazing value set of robust web connectors that manage all the low level call stuff and really just allow you to script the business logic together.
I have not personally used it to connect to Yellowfin's web services, however, i have used it to connect to several SOAP and REST services..
While i mentioned that OpenEdge is not great coding directly to REST or SOAP, the COM interface it supports does work very well ...
I have included some code below that shows how i used the IPWORKS activeX Object to connect to a REST service (we no longer use) , but shows the basics of how to use Openedge with COM and the IpWorks ACtiveX object
IPWorks allow a free trial, so you can get it working before you subscribe.
Hope this helps ....
def var CH1 as com-handle no-undo.
def var CH2 as com-handle no-undo.
def var CH3 as com-handle no-undo.
create "ipworksssl.https" CH1 no-error.
create "diCryptOCX.sha256" CH2 no-error.
create "Crypto.CryptoData" CH3.
def var xxx as raw.
def var zzz as character.
assign
xxx = md5-digest(string(now))
zzz = guid(xxx)
zzz = LC(zzz)
.
def var lc_oauth as character no-undo.
def var lc_datetime as character no-undo.
def var lc_post as character no-undo.
def var lc_jsonmsg as character no-undo.
def var lc_extraheader as character no-undo.
assign
lc_datetime = string(iso-date(now))
lc_datetime = replace(lc_datetime,"+10:00","z")
lc_datetime = LC(lc_datetime)
lc_jsonmsg = ""
.
input from c:\i4\work\ROI-PostContact-Message-20150623201333-0.json.
repeat:
import unformatted lc_jsonmsg.
end.
input close.
output to OAuth2.txt.
lc_oauth = caps("POST") +
(chr(13) + chr(10)) +
LC("/api/v1/tables/contacts/insert") +
(chr(13) + chr(10)) +
"?apiKey=921ba61136784211acda2064de9eced9" +
(chr(13) + chr(10)) +
"nonce=" + zzz + "×tamp=" + lc_datetime +
(chr(13) + chr(10)) +
lc_jsonmsg +
(chr(13) + chr(10)) +
"8f3bbb9126424c16ae4bfe4937927cc6"
.
put unformatted lc_oauth.
put unformatted
skip(1)
"SHA265 = " CH2:StringHexHash(lc_oauth)
skip(1)
.
/* B64 Transform */
CH3:fromstring(CH2:StringHexHash(lc_oauth),1). /* HEX */
lc_oauth = CH3:tostring(2). /* base64 */
put unformatted
skip(1)
"BASE64 = " lc_oauth
skip(1)
.
assign
lc_extraheader = "nonce:" + string(zzz) +
(chr(13) + chr(10)) +
"timestamp:" + lc_datetime
.
put unformatted
skip(1)
.
put unformatted lc_extraheader.
CH1:Authorization = "ROI " + lc_oauth.
put unformatted
skip(1).
put unformatted
("ROI " + lc_oauth)
skip.
output close.
CH1:contenttype = "application/json; charset=utf-8".
CH1:postdata = lc_jsonmsg.
CH1:otherheaders = lc_extraheader.
assign
lc_post = "http://api.rightonin.com/api/v1/Tables/Contacts/Insert?apiKey=921ba61136784211acda2064de9eced9"
.
CH1:POST(lc_post).
output to c:\i4\Header.html.
export CH1:Transferreddata.
output close.
Hi Jon,
It sounds like there's been some good feedback so far on this Question. I'm going to go ahead and leave this open in case we have any further input from our Community.
Thanks,
Ryan
Hi Jon,
It sounds like there's been some good feedback so far on this Question. I'm going to go ahead and leave this open in case we have any further input from our Community.
Thanks,
Ryan
Hi Jon,
I have attached a working Yellowfin Web service sample you can use from OpenEdge ABL.
Just a note that the objectName in the ReportServiceRequest works for both Report Web Service Name and the Report UUID.
Hope this solves your problem, give me a shout if you need additional information. Regards,
Jaun Sachs
Hi Jon,
I have attached a working Yellowfin Web service sample you can use from OpenEdge ABL.
Just a note that the objectName in the ReportServiceRequest works for both Report Web Service Name and the Report UUID.
Hope this solves your problem, give me a shout if you need additional information. Regards,
Jaun Sachs
Hi Jaun,
Thanks for providing this sample to the Community!
- Ryan
Hi Jaun,
Thanks for providing this sample to the Community!
- Ryan
Replies have been locked on this page!