Bonjour,
Je travaille actuellement sur la création d'un fichier WSDL en lien avec un webservice Python.
J'ai bien réussi à exécuter la requête (passage de paramètres d'entrée OK), par contre en sortie j'attends une liste de Personne (Personne est une classe contenant nom, prenom et date_naissance). Ca me retourne bien ce que je veux, mais je n'arrive pas à le structure correctement en sortie. Voilà ce que j'obtiens :
Alors que je voudrais un truc du style :
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 <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <getPersonneResponse id="i1" SOAP-ENC:root="1"> <Result href="#i2"/> </getPersonneResponse> <Result SOAP-ENC:arrayType="xsd:instance[1]" xsi:type="SOAP-ENC:Array" SOAP-ENC:root="0" id="i2"> <item href="#i3"/> </Result> <item id="i3" SOAP-ENC:root="0"> <nom href="#i4"/> <prenom href="#i5"/> <date_naissance href="#i6"/> </item> <nom xsi:type="xsd:string" id="i4" SOAP-ENC:root="0">TEST</nom> <prenom xsi:type="xsd:string" id="i5" SOAP-ENC:root="0">Chantal</prenom> <date_naissance xsi:type="xsd:string" id="i6" SOAP-ENC:root="0">01/01/1900</date_naissance> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Si quelqu'un à la moindre idée, je suis preneur...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <getPersonneResponse SOAP-ENC:root="1"> <Personnes> <Personne> <nom xsi:type="xsd:string" SOAP-ENC:root="0">TEST</nom> <prenom xsi:type="xsd:string" SOAP-ENC:root="0">Chantal</prenom> <date_naissance xsi:type="xsd:string" SOAP-ENC:root="0">01/01/1900</date_naissance> </Personne> </Personnes> </getPersonneResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Pour info, mon WSDL :
Merci.
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
86
87
88 <?xml version="1.0" encoding="ISO-8859-1"?> <wsdl:definitions name="webservice" targetNamespace="namespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="namespace"> <xsd:element name="getPersonne"> <xsd:complexType> <xsd:sequence> <xsd:element name="in" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="getPersonneResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="Personnes" type="tns:Personnes" minOccurs="1" maxOccurs="1"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="Personnes"> <xsd:sequence> <xsd:element name="result" type="tns:ListOf_Personnes"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:element name="PersonneListe"> <xsd:complexType> <xsd:sequence> <xsd:element name="Personnes" type="tns:Personnes" minOccurs="0" maxOccurs="unbounded"> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType> <xsd:sequence> <xsd:element ref="tns:getPersonne"></xsd:element> </xsd:sequence> </xsd:complexType></xsd:element> <xsd:complexType name="ListOf_Personnes"> <xsd:sequence> <xsd:element name="Personne" type="tns:Personne" maxOccurs="unbounded" minOccurs="0"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="Personne"> <xsd:sequence> <xsd:element name="nom" type="xsd:string"></xsd:element> <xsd:element name="prenom" type="xsd:string"></xsd:element> <xsd:element name="date_naissance" type="xsd:string"> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="WsPersonne"></xsd:complexType> </xsd:schema> </wsdl:types> <wsdl:message name="getPersonneRequest"> <wsdl:part name="ID" type="xsd:string"></wsdl:part> </wsdl:message> <wsdl:message name="getPersonneResponse"> <wsdl:part name="liste_personne" type="tns:ListOf_Personnes"></wsdl:part> </wsdl:message> <wsdl:portType name="namespace"> <wsdl:operation name="getPersonne"> <wsdl:input message="tns:getPersonneRequest" name="getPersonneRequest"></wsdl:input> <wsdl:output message="tns:getPersonneResponse" name="getPersonneResponse"></wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="Binding" type="tns:namespace"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="getPersonne"> <soap:operation soapAction="namespace/getPersonne" /> <wsdl:input name="getPersonneRequest"> <soap:body use="encoded" namespace="namespace" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output name="getPersonneResponse"> <soap:body use="encoded" namespace="namespace" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="namespace"> <wsdl:port name="Port" binding="tns:Binding"> <soap:address location="http://localhost:8080" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
Partager