bonjour,

Nous interrogeons un web service mis à disposition par une société. Lorsque sa réponse revient nous avons une erreur dans notre application Java
Caused by: org.apache.cxf.interceptor.Fault: Unexpected wrapper element root found. Expected {http://host:8100/eai/request/statutChorus/v1}Response.

Voici le WSDL que cette société nous a fourni :
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
 
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="ESV2_StatutChorus" targetNamespace="http://host:8100/eai/request/statutChorus/v1" xmlns="http://schemas.xmlsoap.org/wsdl/"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://host:8100/eai/request/statutChorus/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<types>
		<schema elementFormDefault="qualified" targetNamespace="http://host:8100/eai/request/statutChorus/v1" xmlns="http://www.w3.org/2001/XMLSchema"
			xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://host:8100/eai/request/statutChorus/v1"
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<element name="emissionStatutChorus" type="tns:emissionStatutChorus" />
			<element name="Response">
				<complexType>
					<sequence />
				</complexType>
			</element>
			<complexType name="emissionStatutChorus">
				<sequence>
					<element minOccurs="0" name="pivotCPPStaut" type="base64Binary" />
				</sequence>
			</complexType>
		</schema>
	</types>
	<message name="ESV2_StatutChorus_envoiResponse">
		<part element="tns:Response" name="Response" />
	</message>
	<message name="ESV2_StatutChorus_envoiParameter">
		<part element="tns:emissionStatutChorus" name="Parameter" />
	</message>
	<portType name="ESV2_StatutChorus">
		<operation name="emissionStatutChorus">
			<input message="tns:ESV2_StatutChorus_envoiParameter" />
			<output message="tns:ESV2_StatutChorus_envoiResponse" />
		</operation>
	</portType>
	<binding name="ESV2_StatutChorusBinding" type="tns:ESV2_StatutChorus">
		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
		<operation name="emissionStatutChorus">
			<soap:operation soapAction="emissionStatutChorus" />
			<input>
				<soap:body use="literal" />
			</input>
			<output>
				<soap:body />
			</output>
		</operation>
	</binding>
	<service name="ESV2_StatutChorus">
		<port binding="tns:ESV2_StatutChorusBinding" name="ESV2_StatutChorusPort">
			<soap:address location="http://host:8000/eai/request/statutChorus" />
		</port>
	</service>
</definitions>
Voici la réponse qu'elle nous envoie après que nous l'ayons interrogé :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
                <root>ok</root>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Si je comprends bien le WSDL, le xml en retour doit être une balise <Response> sans fils. Ce qui correspondrait plus à :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
                <Response />
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Quelqu'un peut affirmer ou contredire svp ?

Cordialement,
Nicolas