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 :

problème d'appel d'un WS via le naviguateur


Sujet :

Services Web Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    47
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 47
    Par défaut problème d'appel d'un WS via le naviguateur
    Bonjour,
    je suis en train de développer un web service. quelque chose m'échappe car il est fonctionnel sous soapui mais quand j'essaye de l'appeler avec une url j'ai un message d'erreur.

    si quelqu'un à une idée

    mon wsdl :
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://impl.boinc" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.boinc">
        <wsdl:documentation>
    		Please Type your service description here
    	</wsdl:documentation>
        <wsdl:types>
            <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.boinc">
                <xs:element name="importXmlFile">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="url" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="path" nillable="true" type="xs:string"/>
                            <xs:element minOccurs="0" name="nameFile" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="importXmlFileResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:schema>
        </wsdl:types>
        <wsdl:message name="importXmlFileRequest">
            <wsdl:part name="parameters" element="ns:importXmlFile"/>
        </wsdl:message>
        <wsdl:message name="importXmlFileResponse">
            <wsdl:part name="parameters" element="ns:importXmlFileResponse"/>
        </wsdl:message>
        <wsdl:portType name="InternetUtilsPortType">
            <wsdl:operation name="importXmlFile">
                <wsdl:input message="ns:importXmlFileRequest" wsaw:Action="urn:importXmlFile"/>
                <wsdl:output message="ns:importXmlFileResponse" wsaw:Action="urn:importXmlFileResponse"/>
            </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="InternetUtilsSoap11Binding" type="ns:InternetUtilsPortType">
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
            <wsdl:operation name="importXmlFile">
                <soap:operation soapAction="urn:importXmlFile" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:binding name="InternetUtilsSoap12Binding" type="ns:InternetUtilsPortType">
            <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
            <wsdl:operation name="importXmlFile">
                <soap12:operation soapAction="urn:importXmlFile" style="document"/>
                <wsdl:input>
                    <soap12:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap12:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:binding name="InternetUtilsHttpBinding" type="ns:InternetUtilsPortType">
            <http:binding verb="POST"/>
            <wsdl:operation name="importXmlFile">
                <http:operation location="InternetUtils/importXmlFile"/>
                <wsdl:input>
                    <mime:content type="text/xml" part="importXmlFile"/>
                </wsdl:input>
                <wsdl:output>
                    <mime:content type="text/xml" part="importXmlFile"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="InternetUtils">
            <wsdl:port name="InternetUtilsHttpSoap11Endpoint" binding="ns:InternetUtilsSoap11Binding">
                <soap:address location="http://localhost:8080/BoincWS/services/InternetUtils.InternetUtilsHttpSoap11Endpoint/"/>
            </wsdl:port>
            <wsdl:port name="InternetUtilsHttpSoap12Endpoint" binding="ns:InternetUtilsSoap12Binding">
                <soap12:address location="http://localhost:8080/BoincWS/services/InternetUtils.InternetUtilsHttpSoap12Endpoint/"/>
            </wsdl:port>
            <wsdl:port name="InternetUtilsHttpEndpoint" binding="ns:InternetUtilsHttpBinding">
                <http:address location="http://localhost:8080/BoincWS/services/InternetUtils.InternetUtilsHttpEndpoint/"/>
            </wsdl:port>
        </wsdl:service>
    </wsdl:definitions>
    ma requête soapui :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:impl="http://impl.boinc">
       <soapenv:Header/>
       <soapenv:Body>
          <impl:importXmlFile>
             <!--Optional:-->
             <impl:url>www.froggy.net</impl:url>
             <!--Optional:-->
             <impl:path>panzani</impl:path>
             <!--Optional:-->
             <impl:nameFile>toto.xml</impl:nameFile>
          </impl:importXmlFile>
       </soapenv:Body>
    </soapenv:Envelope>
    la réponse soapui :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <ns:importXmlFileResponse xmlns:ns="http://impl.boinc">
             <ns:return>www.froggy.net:panzani:toto.xml</ns:return>
          </ns:importXmlFileResponse>
       </soapenv:Body>
    </soapenv:Envelope>
    l'attaque de mon web service via une url :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://localhost:8080/BoincWS/services/InternetUtils?method=importXmlFile&url=www.froggy.net&path=panzani&nameFile=toto.xml
    et la réponse :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    <soapenv:Reason>
     
    <soapenv:Text xml:lang="en-US">
    The endpoint reference (EPR) for the Operation not found is /BoincWS/services/InternetUtils?method=importXmlFile&url=www.froggy.net&path=panzani&nameFile=toto.xml and the WSA Action = null
    </soapenv:Text>
    </soapenv:Reason>
    avec les logs d'erreurs :
    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
    [ERROR] The endpoint reference (EPR) for the Operation not found is /BoincWS/services/InternetUtils?method=importXmlFile&url=www.froggy.net&path=panzani&nameFile=toto.xml and the WSA Action = null
    org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /BoincWS/services/InternetUtils?method=importXmlFile&url=www.froggy.net&path=panzani&nameFile=toto.xml and the WSA Action = null
    	at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:89)
    	at org.apache.axis2.engine.Phase.invoke(Phase.java:334)
    	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:254)
    	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:160)
    	at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:135)
    	at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
    	at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:817)
    	at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:267)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	at java.lang.Thread.run(Unknown Source)

  2. #2
    Membre éclairé 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
    Par défaut
    Salut

    Avant tout je ne connais pas soapiu.

    Si j'ai bien compris, tu développe un service web.
    Je sais que soapiu permet de tester ce que tu a crée. Mais te permet-il de déployer ton service ?

    Pour pouvoir appeler ton service web, il faut qu'il soit déployé sur un serveur.
    Si non l'url ne passe pas. En un mot, TOMCAT.

    Je te parle de ça, car tu à
    org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /BoincWS/services/InternetUtils?method=importXmlFile&url=www.froggy.net&path=panzani&nameFile=toto.xml and the WSA Action = null

    Le endpoint est l'adresse de ton service web.
    Si le endpoint n'est pas bon :
    - Ton service n'est pas déployé
    - Ton URL n'est pas bon
    - le endpoint doit ressembler à "http://www. ... " ou alors à "http://localhost:8080 ... "

  3. #3
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    47
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 47
    Par défaut
    Citation Envoyé par rockley Voir le message
    Salut

    Avant tout je ne connais pas soapiu.
    c'est un logiciel qui permet d'interroger un web service. il faut lui fournir le wsdl (que j'ai récupéré via le serveur).
    Citation Envoyé par rockley Voir le message
    Si j'ai bien compris, tu développe un service web.
    Je sais que soapiu permet de tester ce que tu a crée. Mais te permet-il de déployer ton service ?

    Pour pouvoir appeler ton service web, il faut qu'il soit déployé sur un serveur.
    Si non l'url ne passe pas. En un mot, TOMCAT.
    il permet juste d'interroger avec succès le web service. il est donc déjà déployé et fonctionne correctement. Pour utiliser soapui il faut le wsdl que j'ai récupéré en appellant le serveur via le naciguateur. donc le début de l'url doit être bon.
    Citation Envoyé par rockley Voir le message
    Je te parle de ça, car tu à



    Le endpoint est l'adresse de ton service web.
    Si le endpoint n'est pas bon :
    - Ton service n'est pas déployé
    - Ton URL n'est pas bon
    - le endpoint doit ressembler à "http://www. ... " ou alors à "http://localhost:8080 ... "
    c'est ce qui est étrange l'url commence bien par "http://localhost:8080", le nom du projet est "BoincWS" donc il faut bien écrire "http://localhost:8080/BoincWS/" suivi de "services/InternetUtils" d'après ce que j'ai pus lire et que je vois dans le wsdl. Pour le reste j'ai suivi mes lecture sur le net. cela me laisse perplexe

  4. #4
    Membre éclairé 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
    Par défaut
    mais c'est là que je comprend pas.

    Tu me dit que les service est déployé sur un serveur d'où t'a récupéré le WSDL.

    Donc si tu veux faire les appelles au service web, tu dois avoir
    endpoint = "http://www. ... "


    c'est ce qui est étrange l'url commence bien par "http://localhost:8080", le nom du projet est "BoincWS" donc il faut bien écrire "http://localhost:8080/BoincWS/" suivi de "services/InternetUtils" d'après ce que j'ai pus lire et que je vois dans le wsdl. Pour le reste j'ai suivi mes lecture sur le net. cela me laisse perplexe
    à moins que soapui fasse serveur, je voie pas comment tu peux le tester avec
    "http://localhost:8080 ..."

  5. #5
    Membre actif
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    47
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 47
    Par défaut
    Citation Envoyé par rockley Voir le message
    mais c'est là que je comprend pas.

    Tu me dit que les service est déployé sur un serveur d'où t'a récupéré le WSDL.

    Donc si tu veux faire les appelles au service web, tu dois avoir
    endpoint = "http://www. ... "




    à moins que soapui fasse serveur, je voie pas comment tu peux le tester avec
    "http://localhost:8080 ..."
    c'est un serveur local, via eclipse pour être plus précis d'où le "http://localhost:8080/...". avoir une ip externe ou local, un nom de domaine ou non ne doit pas changer le problème

  6. #6
    Membre éclairé 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
    Par défaut
    Mais comprend bien qu'à aucun moment, tu me dis que tu intègre ton service web sur un serveur.


    Pour moi, par exemple :
    Je crée un dynamic web project sous eclipse
    Je génère les classes via ma WSDL
    J'écris le code pour faire l'appelle.

    Je crée un serveur local ( comme toi ).
    J'intègre mon "dynamic web project" dans le serveur.
    Enfin je peux tester.

    J'espère t'avoir aidé.

Discussions similaires

  1. Problème d'appel de module.
    Par TomPad dans le forum Access
    Réponses: 2
    Dernier message: 23/06/2005, 10h24
  2. Appel d'une routine via IRQ_9
    Par mickael777 dans le forum C
    Réponses: 15
    Dernier message: 10/01/2005, 10h08
  3. Autre contexte mais tjs problème d'appel fct interne
    Par Neilos dans le forum C++Builder
    Réponses: 1
    Dernier message: 28/08/2004, 13h51
  4. [DLL] problème pour appeler une fonction d'une DLL
    Par bigboomshakala dans le forum MFC
    Réponses: 34
    Dernier message: 19/07/2004, 11h30
  5. Réponses: 4
    Dernier message: 19/04/2004, 13h41

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