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