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 :

Erreur accés à un service SOAP


Sujet :

Services Web Java

  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    511
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 511
    Points : 514
    Points
    514
    Par défaut Erreur accés à un service SOAP
    Bonjour,

    J'essayer d'accéder à un service SOAP et voila l'erreur que j'obtiens

    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
    javax.xml.ws.soap.SOAPFaultException: Server was unable to process request. ---> String was not recognized as a valid Boolean.
    	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
    	at $Proxy35.receiveRespondentFromCAMIWithAuth(Unknown Source)
    	at com.myProject.ClientSoap.send(ClientSoap.java:76)
    	at com.myProject.tests.testSoap.testConnectionSoap(testSoap.java:55)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at junit.framework.TestCase.runTest(TestCase.java:154)
    	at junit.framework.TestCase.runBare(TestCase.java:127)
    	at junit.framework.TestResult$1.protect(TestResult.java:106)
    	at junit.framework.TestResult.runProtected(TestResult.java:124)
    	at junit.framework.TestResult.run(TestResult.java:109)
    	at junit.framework.TestCase.run(TestCase.java:118)
    	at junit.framework.TestSuite.runTest(TestSuite.java:208)
    	at junit.framework.TestSuite.run(TestSuite.java:203)
    	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
    	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Caused by: org.apache.cxf.binding.soap.SoapFault: Server was unable to process request. ---> String was not recognized as a valid Boolean.
    	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:70)
    	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
    	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
    	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:90)
    	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:179)
    	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
    	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
    	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:395)
    	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1932)
    	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1790)
    	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
    	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:576)
    	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
    	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
    	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
    	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
    	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
    	... 21 more
    Est ce que ce genre d'erreur vient d'un probléme client ou d'un probléme serveur ?

  2. #2
    Membre actif
    Inscrit en
    Juin 2008
    Messages
    207
    Détails du profil
    Informations forums :
    Inscription : Juin 2008
    Messages : 207
    Points : 215
    Points
    215
    Par défaut
    Citation Envoyé par Shivan Voir le message
    javax.xml.ws.soap.SOAPFaultException: Server was unable to process request. ---> String was not recognized as a valid Boolean.
    Bonjour,

    A priori, la requête SOAP envoyée ne plaît pas au serveur...

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Février 2007
    Messages
    69
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Février 2007
    Messages : 69
    Points : 76
    Points
    76
    Par défaut
    Je dirais même plus : Il semble que tu envoies une String à la place d'un Boolean.

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    511
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 511
    Points : 514
    Points
    514
    Par défaut
    Donc c'est le serveur qui attends un boolean et moi je lui envoie un String. Et le serveur me renvoie cette erreur.

    Comme le fichier WSDL decrit bien une fonction avec des string et des int (et pas de boolean)

    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
     <s:element name="ReceiveRespondentFromCAMIWithAuth">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="_username" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="_password" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="_context" type="s:string" />
                <s:element minOccurs="1" maxOccurs="1" name="_projectId" type="s:int" />
                <s:element minOccurs="0" maxOccurs="1" name="_respondentXMLData" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="ReceiveRespondentFromCAMIWithAuthResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="1" maxOccurs="1" name="ReceiveRespondentFromCAMIWithAuthResult" type="s:int" />
              </s:sequence>
            </s:complexType>
    Puis je en conclure que le probléme vient uniquement côté serveur ?

  5. #5
    Membre émérite
    Avatar de alexismp
    Homme Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 503
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 503
    Points : 2 777
    Points
    2 777
    Par défaut
    Génères-tu bien le client et le serveur à partir du même WSDL?

  6. #6
    Membre confirmé
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    511
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 511
    Points : 514
    Points
    514
    Par défaut
    Je ne génére que le client. Le serveur est généré par une autre équipe qui m'a ensuite fournie le WSDL pour que je me connecte à leur service. Donc je n'ai aucune garantie que le client et le serveur soit généré à partir du même WSDL

  7. #7
    Membre émérite
    Avatar de alexismp
    Homme Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 503
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 503
    Points : 2 777
    Points
    2 777
    Par défaut
    Tu sais donc ce qu'il te reste à faire...

    une pratique répandue est de publier son WSDL lors du déploiement (habituellement à l'adresse ?WSDL)

    Tu peux aussi générer un serveur de test à partir de ton WSDl et vérifier le bon fonctionnement.

  8. #8
    Membre confirmé
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    511
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 511
    Points : 514
    Points
    514
    Par défaut
    Merci Alexis. L'erreur venait en faites du serveur et à été corrigé. Merci pour ton aide

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

Discussions similaires

  1. Réponses: 1
    Dernier message: 27/05/2011, 21h22
  2. [SOAP] acces web service Authentification
    Par sebxid dans le forum XML/XSL et SOAP
    Réponses: 1
    Dernier message: 25/11/2010, 09h03
  3. [Web Service] Erreur 401.3 lors de l'accès à mon service web
    Par [DreaMs] dans le forum Bibliothèques et frameworks
    Réponses: 0
    Dernier message: 07/05/2010, 11h18
  4. [Web Service] Web Service SOAP : Accès au WSDL
    Par gui38 dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 02/03/2010, 16h15
  5. Erreur Accès BDD
    Par psyco2604 dans le forum ASP
    Réponses: 13
    Dernier message: 10/06/2004, 10h46

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