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

Services Web Java Discussion :

Client Java pour un Web Service PHP


Sujet :

Services Web Java

  1. #1
    Membre à l'essai
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    25
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Mai 2012
    Messages : 25
    Points : 22
    Points
    22
    Par défaut Client Java pour un Web Service PHP
    bonjour
    j'aimerai créer un client en java pour consommer un web service qui est en php.

  2. #2
    Membre averti Avatar de rockley
    Homme Profil pro
    Inscrit en
    Décembre 2010
    Messages
    404
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Décembre 2010
    Messages : 404
    Points : 346
    Points
    346
    Par défaut
    Félicitation !!!

    T'as des questions plus précise ?

  3. #3
    Membre à l'essai
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    25
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Mai 2012
    Messages : 25
    Points : 22
    Points
    22
    Par défaut
    j'ai un lien d'un wsdl crée en php quand je le consomme en php ça fonctionne mais en java je ne sais pas comment faire.

  4. #4
    Membre averti Avatar de rockley
    Homme Profil pro
    Inscrit en
    Décembre 2010
    Messages
    404
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Décembre 2010
    Messages : 404
    Points : 346
    Points
    346
    Par défaut
    Le wsdl c'est du XML.
    Il n'y a pas de langage spécifique PHP ou JAVA.

    Tu trouves tout sur internet, après je ne sais pas ce que tu veux faire précisément.

    Il faut savoir pour le web service :
    - tu veux le faire en REST ou SOAP ?
    - L'IDE, (Eclipse, NetBeans, ...) ?
    - JDK 1.X ?
    - Pour générer le web service je te conseille AXIS 2

    Se sont des choses que tu dois définir.

    Si on considère que tu utilise Axis 2 et eclipse pour faire ton développement

    Voilà un lien qui peux t'aider. (surtout les point 18 à 24)
    http://www.eclipse.org/webtools/comm..._tutorial.html

    Si tu veux mieux comprendre comment marche le client en java lit le deuxième
    message, ça pourrais t'aider.

    http://www.developpez.net/forums/d12...-sous-eclipse/

  5. #5
    Membre à l'essai
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    25
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Mai 2012
    Messages : 25
    Points : 22
    Points
    22
    Par défaut
    donc d'après ce que vous dites il n’y a pas de différence entre un wsdl généré avec axis2 et un wsdl généré avec ZendStudio.

  6. #6
    Membre à l'essai
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    25
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Mai 2012
    Messages : 25
    Points : 22
    Points
    22
    Par défaut
    merci pour ces lien mais je les ai déjà consulté auparavant .
    Je développe encore plus mon blocage.
    sous eclipse avec axis2 quand je crée un webservice client et je lui passe l'url de mon fichier wsdl puis je clique sur finish je rencontre l'erreur suivante:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    Exception occurred during code generation for WSDL  : org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientCodegenCommand.execute(Axis2ClientCodegenCommand.java:222)
        at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
        at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
        at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)
        at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
        at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
        at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1029)
        at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
        at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
        at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:262)
        at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:382)
        at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
        at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
        at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
        at org.eclipse.jface.window.Window.open(Window.java:801)
        at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:257)
        at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277)
        at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
        at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
        at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
        at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
        at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
        at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
        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:1053)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        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:344)
        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:293)
        ... 61 more
        Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:246)
        ... 61 more
        Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
        ... 62 more
        Caused by: org.apache.axis2.schema.SchemaCompilationException: can not find type {http://schemas.xmlsoap.org/soap/encoding/}Array from the parent schema http://futureware.biz/mantisconnect
        at org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCompiler.java:1371)
        at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1333)
        at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1228)
        at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1172)
        at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1006)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:645)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:604)
        at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2069)
        at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1958)
        at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1156)
        at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1006)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:645)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:604)
        at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2069)
        at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1952)
        at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1156)
        at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:1055)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1009)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:645)
        at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:615)
        at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:423)
        at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:292)
        at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102)
        ... 67 more
    .

  7. #7
    Membre à l'essai
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    25
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Mai 2012
    Messages : 25
    Points : 22
    Points
    22
    Par défaut
    s'il vous plait j'ai besoin d'aide.

  8. #8
    Membre à l'essai
    Étudiant
    Inscrit en
    Mai 2012
    Messages
    25
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Mai 2012
    Messages : 25
    Points : 22
    Points
    22
    Par défaut
    j'ai pu résoudre mon problème, en fait il fallait le générer avec axis et non pas axis2.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Création d'un client java pour un web service
    Par legna986 dans le forum Services Web
    Réponses: 2
    Dernier message: 19/03/2013, 10h18
  2. applicatifs java pour tests web services
    Par godzizou dans le forum Services Web
    Réponses: 3
    Dernier message: 01/02/2008, 10h31
  3. Réponses: 2
    Dernier message: 20/11/2007, 16h00
  4. Réponses: 1
    Dernier message: 12/02/2007, 15h22
  5. [Axis]installation du client Axis pour les Web Services
    Par LESOLEIL dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 31/08/2005, 14h45

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