Axis WSDL

Résolu/Fermé
unreachable Messages postés 65 Date d'inscription lundi 18 mai 2009 Statut Membre Dernière intervention 7 janvier 2012 - 13 mai 2010 à 19:28
mamiemando Messages postés 33076 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 17 avril 2024 - 16 mai 2010 à 12:26
Bonjour,
Encore une fois j'ai une question speciale axis :)
Je voudrais générer des classes proxy a partir d'un fichier WSDL et je suis bloqué :s ( je travaille sous linux )
Alors voici les etapes que j'ai suivi:
1) Creation de mon fichier.JWS mis dans tomcat/webapps/axis
2) Creation de monfichier.WSDL a partir de l'url
3) je tape la commande suivante:
java org.apache.axis.wsdl.WSDL2Java -p repertoire monfichier.wsdl

Et voici le message d'erreur que j'obtiens:
Fatal Error: URI=file:///usr/local/apache-tomcat-6.0.26/webapps/axis/Carre.wsdl Line=1: The prefix "wsdl" for element "wsdl:definitions" is not bound.
at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:723)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:420)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:482)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Threadrer 7.0</config>

Quelqu'un sait il d'où vient le problème s'il vous plait??
Merci
A voir également:
  • Axis WSDL
  • Axis merge - Télécharger - Gestion de fichiers

1 réponse

mamiemando Messages postés 33076 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 17 avril 2024 7 748
Modifié par mamiemando le 14/05/2010 à 10:33
Peux-tu nous donner le contenu de /usr/local/apache-tomcat-6.0.26/webapps/axis/Carre.wsdl, je pense qu'il comporte une erreur de syntaxe.

Pendant que j'y suis pour tester un webservice, tu as des outils comme soapui qui pourraient t'aider.

Bonne chance
0
unreachable Messages postés 65 Date d'inscription lundi 18 mai 2009 Statut Membre Dernière intervention 7 janvier 2012 9
14 mai 2010 à 14:31
En fait j'ai réussi la génération des classes de carre.wsdl en le deplaçant vers un autre dossier ( je l'avais mis avec les jws d'axis).
J'ai réessayé avec ce carre.wsdl plusieurs ça marche bien.
Mais avec un autre fichier .wsdl j'ai la fameuse erreur "prefix "wsdl" for element "wsdl:definitions" is not bound. " :(
Merci pour ta réponse .
0
mamiemando Messages postés 33076 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 17 avril 2024 7 748
14 mai 2010 à 19:11
Ben je suppose que c'est le même genre de problème... et donc de solution ?
0
unreachable Messages postés 65 Date d'inscription lundi 18 mai 2009 Statut Membre Dernière intervention 7 janvier 2012 9
14 mai 2010 à 19:34
ben non :(
rien a faire cette fois !
0
unreachable Messages postés 65 Date d'inscription lundi 18 mai 2009 Statut Membre Dernière intervention 7 janvier 2012 9
16 mai 2010 à 00:58
J'ai trouvé la solution:
j'ajoute l'entete suivant :
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:CalculService2" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:CalculService2" xmlns:intf="urn:CalculService2" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

NB:
il faut changer l'urn pour chaque fichier wsdl par le nom tout simplement!
0
mamiemando Messages postés 33076 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 17 avril 2024 7 748
16 mai 2010 à 12:26
Merci pour ces précisions et bonne continuation !
0