Bonjour à tous,
N'étant pas forcement un enorme tueur en XML, ça fait quelques jours que je m'echine à faire appel à un webservice.
Je dois y faire appel en PHP.
Lorsque je fais un __getFunctions(), je récupère ceci :
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Array ( [0] => ListOfEmployeeInterfaceTopElmt EmployeeQueryById(string $PrimaryRowId) [1] => ListOfEmployeeInterfaceTopElmt EmployeeQueryByExample(ListOfEmployeeInterfaceTopElmt $Message) ... )
Pour la premiere fonction, pas de problème vu que c'est un string. Par contre pour le deuxième je galère beaucoup plus.
Je vais détailler un peu le WSDL :
[...]
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 <message name="spcEmployee_EmployeeQueryByExample_Input"> <part name="Message" type="xsdLocal0:ListOfEmployeeInterfaceTopElmt"> </part> </message> <message name="spcEmployee_EmployeeQueryByExample_Output"> <part name="Message" type="xsdLocal0:ListOfEmployeeInterfaceTopElmt"> </part> </message>
Du coup pour cette deuxime fonction, je ne sais pas comment y acceder. probablement avec SoapVar
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 <xsd:complexType name="ListOfEmployeeInterfaceTopElmt"> <xsd:sequence> <xsd:element name="ListOfEmployeeInterface" maxOccurs="1" minOccurs="1" type="xsdLocal0:ListOfEmployeeInterface"> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ListOfEmployeeInterface"> <xsd:sequence> <xsd:element name="Employee" maxOccurs="1" minOccurs="0" type="xsdLocal0:ArrayOfEmployee"> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ArrayOfEmployee"> <xsd:complexContent mixed="false"> <xsd:restriction base="soapenc:Array"> <xsd:attribute aPrefix:arrayType="xsdLocal0:Employee[]" ref="soapenc:arrayType" xmlns:aPrefix="http://schemas.xmlsoap.org/wsdl/"> </xsd:attribute> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="Employee"> <xsd:sequence> <xsd:element name="Id" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> <xsd:element name="Alias" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> <xsd:element name="AvailabilityStatus" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> <xsd:element name="AvailabilityStatusUntil" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> <xsd:element name="BuildingNumber" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> <xsd:element name="CPRegion" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> <xsd:element name="CPRegionId" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> <xsd:element name="CPRegionIntegrationId" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> <xsd:element name="CellPhone" maxOccurs="1" minOccurs="0" type="xsd:string"> </xsd:element> [...] </xsd:sequence> </xsd:complexType>
D'aiulleur si quelqu'un pourrais me détailler quoi est quoi dans cette fonction ça serait interessant.
d'avance
Partager