Home
Analytics
Basic Authentication wsdl service
vraaijmakers
<p>Hi, I'm wondering what the current implementation is to support basic authentication when using wsdl data services. </p>
<p>I can only find old posts from 2015 but do not see solutions.</p>
<p> </p>
<p>For our new reports we would like to use FlightAware web services and it requires username and password.</p>
<p>The calls we want to use work fine when using SoapUI but we unfortunately have no idea how to set the username and password in a Birt datasource. </p>
<p> </p>
<p>Thanks!<br>
Vincent</p>
Find more posts tagged with
Comments
Clement Wong
<p>After looking at FlightAware's API (<a data-ipb='nomediaparse' href='
https://flightaware.com/commercial/flightxml/documentation2.rvt'>https://flightaware.com/commercial/flightxml/documentation2.rvt</a>)
, I see that it's not out of the ordinary and BIRT can handle this authentication mechanism.</p>
<p> </p>
<p>You can add a basic authentication to BIRT's Web Service ODA's request header. For example, in this previous post, we're adding a custom authentication header:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/39023-add-custom-authentication-header-to-soap-webservice/?p=142927'>http://developer.actuate.com/community/forum/index.php?/topic/39023-add-custom-authentication-header-to-soap-webservice/?p=142927</a></p>
;
<p> </p>
<p>The same call that you have in SOAP UI can be parameterized (or hardcoded) in BIRT's Web Service Data Set.</p>
<p> </p>
<p> </p>
<p>Also, it appears that FlightAware has a REST/JSON API. If you decide to use this instead, you can follow this example @ <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/36913-birt-web-service-rest-json/?p=138062'>http://developer.actuate.com/community/forum/index.php?/topic/36913-birt-web-service-rest-json/?p=138062</a>which
is a scripted data source / data set with basic authentication. </p>
<p> </p>
<p>If you are using BIRT 4.5.0, it has built-in JSON support so you won't need the helper JavaScript file, "json.js", in the root of your project folder.</p>
vraaijmakers
<p>Thanks for the quick response Clement!</p>
<p>I already noticed your custom authentication header example and tried to et it up and running. Unfortunately I couldn't.</p>
<p>This is what I came up with as an attempt to get something working.</p>
<p> </p>
<p><span style="font-family:Monaco;font-size:11px;"><?xml version="1.0"?></span></p>
<p style="font-size:11px;font-family:Monaco;"><SOAP-ENV:Envelope</p>
<p style="font-size:11px;font-family:Monaco;">xmlns:xsd="<a data-ipb='nomediaparse' href='
http://www.w3.org/2001/XMLSchema'>http://www.w3.org/2001/XMLSchema"</a></p>
;
<p style="font-size:11px;font-family:Monaco;">xmlns:SOAP-ENC="<a data-ipb='nomediaparse' href='
http://schemas.xmlsoap.org/soap/encoding/'>http://schemas.xmlsoap.org/soap/encoding/"</a></p>
;
<p style="font-size:11px;font-family:Monaco;">xmlns:xsi="<a data-ipb='nomediaparse' href='
http://www.w3.org/2001/XMLSchema-instance'>http://www.w3.org/2001/XMLSchema-instance"</a></p>
;
<p style="font-size:11px;font-family:Monaco;">xmlns:SOAP-ENV="<a data-ipb='nomediaparse' href='
http://schemas.xmlsoap.org/soap/envelope/'>http://schemas.xmlsoap.org/soap/envelope/"></a></p>
;
<p style="font-size:11px;font-family:Monaco;"><SOAP-ENV:Header></p>
<p style="font-size:11px;font-family:Monaco;"> <Username>&?UserName?&</Username></p>
<p style="font-size:11px;font-family:Monaco;"> <Password>&?Password?&</Password></p>
<p style="font-size:11px;font-family:Monaco;"> </SOAP-ENV:Header> </p>
<p style="font-size:11px;font-family:Monaco;"><SOAP-ENV:Body></p>
<p style="font-size:11px;font-family:Monaco;"><m:AirlineInfoRequest xmlns:m="<a data-ipb='nomediaparse' href='
http://flightxml.flightaware.com/soap/FlightXML2'>http://flightxml.flightaware.com/soap/FlightXML2"></a></p>
;
<p style="font-size:11px;font-family:Monaco;"><m:airlineCode>PVO</m:airlineCode></p>
<p style="font-size:11px;font-family:Monaco;"></m:AirlineInfoRequest></p>
<p style="font-size:11px;font-family:Monaco;"></SOAP-ENV:Body></p>
<p style="font-size:11px;font-family:Monaco;"></SOAP-ENV:Envelope></p>
<p style="font-size:11px;font-family:Monaco;"> </p>
<p style="font-size:11px;font-family:Monaco;">Let me look at your JSON example as well. I have no preference as long as it will work with iHub later. Plan is to have scheduled reports running.</p>
<p style="font-size:11px;font-family:Monaco;"> </p>
<p style="font-size:11px;font-family:Monaco;">Thanks!!</p>
<p style="font-size:11px;font-family:Monaco;">Vincent</p>
vraaijmakers
<p>Clement, is there a 4.5 version available for Mac? I just dowloaded again to make sure I have the latest but it is still 4.4.</p>
<p> </p>
<p>Vincent</p>
Clement Wong
<p>From here (<a data-ipb='nomediaparse' href='
http://www.eclipse.org/downloads/packages/release/Mars/2'>http://www.eclipse.org/downloads/packages/release/Mars/2</a>)
, I see the link <a>(
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/2/eclipse-reporting-mars-2-macosx-cocoa-x86_64.tar.gz)</a>
; for the download. </p>