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 :

Axis2 Error 400 Bad Request


Sujet :

Services Web Java

  1. #1
    Membre à l'essai
    Inscrit en
    Août 2006
    Messages
    22
    Détails du profil
    Informations personnelles :
    Âge : 43

    Informations forums :
    Inscription : Août 2006
    Messages : 22
    Points : 17
    Points
    17
    Par défaut Axis2 Error 400 Bad Request
    Je travaille avec Axis2 et Hibernate, sous eclipse 3.1 équipé des plugins axis2 (code generator et aar generator).

    J'ai l'erreur suivante lors de l'envoi d'une requête par un client simple:

    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
     
    org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad Request'; nested exception is: 
    	org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad Request'; nested exception is: 
    	org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad Request'; nested exception is: 
    	org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad Request'
    	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:227)
    	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:674)
    	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
    	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
    	at com.company.service.pnf.ws.impl.PnfWebServiceServiceStub.getCommercant(PnfWebServiceServiceStub.java:164)
    	at com.company.tlc.test.Client.main(Client.java:35)
    Caused by: org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad Request'; nested exception is: 
    	org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad Request'
    	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:344)
    	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:204)
    	... 5 more
    Caused by: org.apache.axis2.AxisFault: HTTP Transport error : '400' - 'Bad Request'
    	at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:144)
    	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:335)
    	... 6 more
    J'imagine (peut-être à tort) que ça vient de l'enveloppe soap envoyée, qui ne doit pas être correcte... la voici :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
    <?xml version='1.0' encoding='utf-8'?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <soapenv:Header />
        <soapenv:Body>
          <getCommercant xmlns="http://impl.ws.pnf.service.company.com">
            <demandeCommercant>
              <codeBanque xmlns="http://obj.ws.pnf.service.company.com">18719</codeBanque>
            </demandeCommercant>
          </getCommercant>
        </soapenv:Body>
      </soapenv:Envelope>
    Le WSDL qui a servit à générer le client et le serveur :

    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
     
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" 
    				  xmlns:impl="http://impl.ws.pnf.service.company.com" 
    				  xmlns:intf="http://impl.ws.pnf.service.company.com" 
    				  xmlns:tns1="http://obj.ws.pnf.service.company.com" 
    				  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    				  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
    				  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    				  targetNamespace="http://impl.ws.pnf.service.company.com">
    	<wsdl:types>
    		<schema elementFormDefault="qualified" targetNamespace="http://impl.ws.pnf.service.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
    			<import namespace="http://obj.ws.pnf.service.company.com"/>
    			<element name="getCommercant">
    				<complexType>
    						<element name="demandeCommercant" type="tns1:getCommercantDemande"/>
    				</complexType>
    			</element>
    			<element name="getCommercantResponse">
    				<complexType>
    					<sequence>
    						<element maxOccurs="unbounded" name="getCommercantReturn" type="tns1:getCommercantReponse"/>
    					</sequence>
    				</complexType>
    			</element>
    		</schema>
    		<schema elementFormDefault="qualified" targetNamespace="http://obj.ws.pnf.service.company.com" xmlns="http://www.w3.org/2001/XMLSchema">
    			<complexType name="getCommercantDemande">
    					[...]
                            </complexType>
    				</sequence>
    			</complexType>
    		</schema>
    	</wsdl:types>
    	<wsdl:message name="getCommercantResponse">
    		<wsdl:part name="parameters" element="impl:getCommercantResponse"/>
    	</wsdl:message>
    	<wsdl:message name="getCommercantRequest">
    		<wsdl:part name="parameters" element="impl:getCommercant"/>
    	</wsdl:message>
    	<wsdl:portType name="PnfWebService">
    		<wsdl:operation name="getCommercant">
    			<wsdl:input name="getCommercantRequest" message="impl:getCommercantRequest"/>
    			<wsdl:output name="getCommercantResponse" message="impl:getCommercantResponse"/>
    		</wsdl:operation>
    	</wsdl:portType>
    	<wsdl:binding name="PnfWebServiceSoapBinding" type="impl:PnfWebService">
    		<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    		<wsdl:operation name="getCommercant">
    			<wsdlsoap:operation/>
    			<wsdl:input>
    				<wsdlsoap:body use="literal"/>
    			</wsdl:input>
    			<wsdl:output>
    				<wsdlsoap:body use="literal"/>
    			</wsdl:output>
    		</wsdl:operation>
    	</wsdl:binding>
    	<wsdl:service name="PnfWebServiceService">
    		<wsdl:port name="PnfWebService" binding="impl:PnfWebServiceSoapBinding">
    			<wsdlsoap:address location="http://127.0.0.1/axis2/services/pnfWs"/>
    		</wsdl:port>
    	</wsdl:service>
    	<!--WSDL created by Apache Axis version: 1.3
    Built on Oct 05, 2005 (05:23:37 EDT)-->
    </wsdl:definitions>
    Je ne vois vraiment pas d'où peut venir le problème. J'ai configuré le client SOAP pour utiliser un proxy sans authentification, peut-être que cette info sera utile...

    Merci d'avance, axis2 commence à me

  2. #2
    Membre à l'essai
    Inscrit en
    Août 2006
    Messages
    22
    Détails du profil
    Informations personnelles :
    Âge : 43

    Informations forums :
    Inscription : Août 2006
    Messages : 22
    Points : 17
    Points
    17
    Par défaut oups
    Ce genre de réponse c'est quand le target point est incorrect... une fois cela rectifié, j'ai l'erreur suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    org.apache.axis2.AxisFault: java.lang.NoClassDefFoundError: Lorg/apache/xmlbeans/SchemaTypeSystem;
    J'ai lu à droite, à gauche que cela pouvait provenir de problèmes de compatibilité ascendante de XmlBeans (utilisé pour générer le code, et l'exécuter...) des idées svp?

  3. #3
    Membre à l'essai
    Inscrit en
    Août 2006
    Messages
    22
    Détails du profil
    Informations personnelles :
    Âge : 43

    Informations forums :
    Inscription : Août 2006
    Messages : 22
    Points : 17
    Points
    17
    Par défaut
    Alors, rectification, au premier lancement, j'ai ça :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    org.apache.axis2.AxisFault: java.lang.ExceptionInInitializerError
    	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
    	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
    	at com.experian.service.pnf.ws.impl.PnfWebServiceServiceStub.getCommercant(PnfWebServiceServiceStub.java:141)
    	at com.experian.tlc.test.Client.main(Client.java:35)
    Puis, si je relance, j'ai ça :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    org.apache.axis2.AxisFault: java.lang.NoClassDefFoundError
    	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
    	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
    	at com.experian.service.pnf.ws.impl.PnfWebServiceServiceStub.getCommercant(PnfWebServiceServiceStub.java:141)
    	at com.experian.tlc.test.Client.main(Client.java:35)
    Cette dernière est lancée au niveau de la commande suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
            Session session = HibernateUtil.currentSession();
    Une idée siouplééé

Discussions similaires

  1. Réponses: 1
    Dernier message: 31/03/2010, 14h38
  2. Réponses: 1
    Dernier message: 09/03/2010, 13h47
  3. WebService HTTP 400 Bad Request
    Par mrkinfo dans le forum Services Web
    Réponses: 3
    Dernier message: 09/12/2009, 16h41
  4. IIS et HTTP 400 Bad Request
    Par cgone dans le forum IIS
    Réponses: 0
    Dernier message: 29/09/2009, 18h54
  5. C++ Requete GET Http Erreur 400 Bad Request
    Par gy0m76 dans le forum C++
    Réponses: 2
    Dernier message: 02/07/2008, 15h49

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