IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

BIRT Discussion :

[2.3] Datasource XML avec authentification


Sujet :

BIRT

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    104
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 104
    Points : 52
    Points
    52
    Par défaut [2.3] Datasource XML avec authentification
    Bonjour,

    Je souhaiterais utiliser une datasource XML HTTP qui nécessite une authentification HTTP standard du type http://login:password@server/monfichier.xml.

    Le problème c'est que dans Birt 2.3 il ne semble pas possible d'utiliser login:password dans l'url. La datasource se créé et est pingable mais lors de la création du dataset on obtient l'exception suivante :
    org.eclipse.datatools.connectivity.oda.OdaException: XML data source cannot be retrieved.XML data source file is invalid or the file doesn't exist.
    at org.eclipse.datatools.enablement.oda.xml.ui.wizards.XPathChoosePage.populateXMLTree(XPathChoosePage.java:320)
    at org.eclipse.datatools.enablement.oda.xml.ui.wizards.XPathChoosePage.createPageCustomControl(XPathChoosePage.java:98)
    at org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage.createControl(DataSetWizardPage.java:123)
    at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:669)
    at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1083)
    at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1142)
    at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1139)
    at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:1128)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1126)
    at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:820)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.birt.report.designer.ui.actions.NewDataSetAction.createNewDataSet(NewDataSetAction.java:200)
    at org.eclipse.birt.report.designer.ui.actions.NewDataSetAction.run(NewDataSetAction.java:185)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.birt.report.designer.ui.rcp.DesignerApplication.run(DesignerApplication.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    Savez-vous s'il existe une solution pour traiter ce type de requêtes ou faut il faire une datasource ODA pour supporter l'authentification. Dans ce cas, savez vous où récupérer les sources de la construction des datasources XML ?

    Blured.

  2. #2
    Membre expérimenté

    Profil pro
    Inscrit en
    Avril 2008
    Messages
    1 143
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 1 143
    Points : 1 353
    Points
    1 353
    Par défaut Autre moyen
    Vous pouvez également filter le dataset XML avec des paramètres cachés venant d'une BDD / AD / LDAP. ce serait peut être plus simple que de faire un ODA.

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Mai 2007
    Messages
    104
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2007
    Messages : 104
    Points : 52
    Points
    52
    Par défaut
    Filtrer avec un paramètre caché ? Auriez vous un exemple de ce type de filtre ?

  4. #4
    Membre expérimenté

    Profil pro
    Inscrit en
    Avril 2008
    Messages
    1 143
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2008
    Messages : 1 143
    Points : 1 353
    Points
    1 353
    Par défaut Filtre
    Un paramètre session ( user loggé ) dans votre appli. Stocké dans ce que vous souhaitez. Cookie c'est facile.

    1 Dataset BDD/LDAP/AD ( ya des pilotes pour ces sources ) qui prend en paramètre le user et retourne les droits.

    1 Dataset XML

    1 Dataset Joint sur XML et BDD pour filtrer.

    La même chose peut être obtenue avec un peu de Java en plus fin mais je ne suis nullement expert dans la matière :-)

  5. #5
    Membre éprouvé
    Avatar de lazarel
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Mai 2007
    Messages
    893
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Mai 2007
    Messages : 893
    Points : 1 164
    Points
    1 164
    Par défaut
    Bonjour,


    Si tu veux utiliser des fichiers XML avec BIRT je te conseille d'utiliser un Web Service pour gérer les profils ça marche très bien et cette couche te permet de simplifier pas mal de chose.


    Cdt, Lazarel

Discussions similaires

  1. Réponses: 1
    Dernier message: 31/10/2013, 20h41
  2. Récupérer un fichier XML avec authentification HTTP
    Par vichenze dans le forum Langage
    Réponses: 4
    Dernier message: 02/12/2009, 17h08
  3. Réponses: 15
    Dernier message: 23/03/2009, 16h07
  4. problème de connexion avec datasource xml
    Par Flash31186 dans le forum iReport
    Réponses: 4
    Dernier message: 25/10/2007, 09h38
  5. Contenu DataSource.xml avec base Mysql
    Par PrinceMaster77 dans le forum XMLRAD
    Réponses: 3
    Dernier message: 11/03/2004, 12h59

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo