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

Bibliothèques et frameworks PHP Discussion :

[Web Service] Client SOAP ou autre pour appel webservice


Sujet :

Bibliothèques et frameworks PHP

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Juillet 2010
    Messages
    82
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2010
    Messages : 82
    Points : 43
    Points
    43
    Par défaut [Web Service] Client SOAP ou autre pour appel webservice
    Bonjour, cela fait plusieurs jours que je coince sur l'appel à un webservice.
    (1ère fois que je m'en sers)
    Si quelqu'un peut m'éclairer, je suis preneur.

    Voici le wsdl:
    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
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
      <?xml version="1.0" encoding="utf-8" ?> 
    - <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
    - <s:element name="NewsLetter">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="intPortail_id" type="s:short" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_email" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strLangue" type="s:string" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="NewsLetterResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="NewsLetterResult" type="s:boolean" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="Auth">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="intPortail_id" type="s:short" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_login" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_password" type="s:string" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="AuthResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="AuthResult" type="tns:stuContact" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:complexType name="stuContact">
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="strContact_idExterne" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_lastName" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_firstName" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_phone" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_mobilePhone" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_eMail" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_idMd5" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_login" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_password" type="s:string" /> 
      <s:element minOccurs="1" maxOccurs="1" name="datContact_birthdate" type="s:dateTime" /> 
      <s:element minOccurs="1" maxOccurs="1" name="bytContact_title" type="s:unsignedByte" /> 
      </s:sequence>
      </s:complexType>
    - <s:element name="AuthProprio">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="intPortail_id" type="s:short" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_login" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_password" type="s:string" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="AuthProprioResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="AuthProprioResult" type="tns:stuContact" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="AuthForgotten">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="intPortail_id" type="s:short" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_email" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strLangue" type="s:string" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="AuthForgottenResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="AuthForgottenResult" type="s:boolean" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="AuthForgottenMobile">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="intPortail_id" type="s:short" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strContact_mobilePhone" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strLangue" type="s:string" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="AuthForgottenMobileResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="AuthForgottenMobileResult" type="s:boolean" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="ContactCreateUpdate">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="intPortail_id" type="s:short" /> 
      <s:element minOccurs="1" maxOccurs="1" name="ostContact" type="tns:stuContact" /> 
      <s:element minOccurs="1" maxOccurs="1" name="ostAddress" type="tns:stuAddress" /> 
      <s:element minOccurs="1" maxOccurs="1" name="intContact_id" type="s:int" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strLangue" type="s:string" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:complexType name="stuAddress">
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="intCountry_id" type="s:short" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strAddress_address1stLine" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strAddress_address2ndLine" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strAddress_city" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strAddress_zipCode" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strAddress_regionName" type="s:string" /> 
      </s:sequence>
      </s:complexType>
    - <s:element name="ContactCreateUpdateResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="ContactCreateUpdateResult" type="tns:stuResult" /> 
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:complexType name="stuResult">
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="strId" type="s:string" /> 
      <s:element minOccurs="0" maxOccurs="1" name="strError" type="s:string" /> 
      </s:sequence>
      </s:complexType>
      <s:element name="boolean" type="s:boolean" /> 
      <s:element name="stuContact" type="tns:stuContact" /> 
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="NewsLetterSoapIn">
      <wsdl:part name="parameters" element="tns:NewsLetter" /> 
      </wsdl:message>
    - <wsdl:message name="NewsLetterSoapOut">
      <wsdl:part name="parameters" element="tns:NewsLetterResponse" /> 
      </wsdl:message>
    - <wsdl:message name="AuthSoapIn">
      <wsdl:part name="parameters" element="tns:Auth" /> 
      </wsdl:message>
    - <wsdl:message name="AuthSoapOut">
      <wsdl:part name="parameters" element="tns:AuthResponse" /> 
      </wsdl:message>
    - <wsdl:message name="AuthProprioSoapIn">
      <wsdl:part name="parameters" element="tns:AuthProprio" /> 
      </wsdl:message>
    - <wsdl:message name="AuthProprioSoapOut">
      <wsdl:part name="parameters" element="tns:AuthProprioResponse" /> 
      </wsdl:message>
    - <wsdl:message name="AuthForgottenSoapIn">
      <wsdl:part name="parameters" element="tns:AuthForgotten" /> 
      </wsdl:message>
    - <wsdl:message name="AuthForgottenSoapOut">
      <wsdl:part name="parameters" element="tns:AuthForgottenResponse" /> 
      </wsdl:message>
    - <wsdl:message name="AuthForgottenMobileSoapIn">
      <wsdl:part name="parameters" element="tns:AuthForgottenMobile" /> 
      </wsdl:message>
    - <wsdl:message name="AuthForgottenMobileSoapOut">
      <wsdl:part name="parameters" element="tns:AuthForgottenMobileResponse" /> 
      </wsdl:message>
    - <wsdl:message name="ContactCreateUpdateSoapIn">
      <wsdl:part name="parameters" element="tns:ContactCreateUpdate" /> 
      </wsdl:message>
    - <wsdl:message name="ContactCreateUpdateSoapOut">
      <wsdl:part name="parameters" element="tns:ContactCreateUpdateResponse" /> 
      </wsdl:message>
    - <wsdl:message name="NewsLetterHttpGetIn">
      <wsdl:part name="intPortail_id" type="s:string" /> 
      <wsdl:part name="strContact_email" type="s:string" /> 
      <wsdl:part name="strLangue" type="s:string" /> 
      </wsdl:message>
    - <wsdl:message name="NewsLetterHttpGetOut">
      <wsdl:part name="Body" element="tns:boolean" /> 
      </wsdl:message>
    - <wsdl:message name="AuthHttpGetIn">
      <wsdl:part name="intPortail_id" type="s:string" /> 
      <wsdl:part name="strContact_login" type="s:string" /> 
      <wsdl:part name="strContact_password" type="s:string" /> 
      </wsdl:message>
    - <wsdl:message name="AuthHttpGetOut">
      <wsdl:part name="Body" element="tns:stuContact" /> 
      </wsdl:message>
    - <wsdl:message name="AuthProprioHttpGetIn">
      <wsdl:part name="intPortail_id" type="s:string" /> 
      <wsdl:part name="strContact_login" type="s:string" /> 
      <wsdl:part name="strContact_password" type="s:string" /> 
      </wsdl:message>
    - <wsdl:message name="AuthProprioHttpGetOut">
      <wsdl:part name="Body" element="tns:stuContact" /> 
      </wsdl:message>
    - <wsdl:message name="AuthForgottenHttpGetIn">
      <wsdl:part name="intPortail_id" type="s:string" /> 
      <wsdl:part name="strContact_email" type="s:string" /> 
      <wsdl:part name="strLangue" type="s:string" /> 
      </wsdl:message>
    - <wsdl:message name="AuthForgottenHttpGetOut">
      <wsdl:part name="Body" element="tns:boolean" /> 
      </wsdl:message>
    - <wsdl:message name="AuthForgottenMobileHttpGetIn">
      <wsdl:part name="intPortail_id" type="s:string" /> 
      <wsdl:part name="strContact_mobilePhone" type="s:string" /> 
      <wsdl:part name="strLangue" type="s:string" /> 
      </wsdl:message>
    - <wsdl:message name="AuthForgottenMobileHttpGetOut">
      <wsdl:part name="Body" element="tns:boolean" /> 
      </wsdl:message>
    - <wsdl:portType name="wbsContactSoap">
    - <wsdl:operation name="NewsLetter">
      <wsdl:input message="tns:NewsLetterSoapIn" /> 
      <wsdl:output message="tns:NewsLetterSoapOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="Auth">
      <wsdl:input message="tns:AuthSoapIn" /> 
      <wsdl:output message="tns:AuthSoapOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="AuthProprio">
      <wsdl:input message="tns:AuthProprioSoapIn" /> 
      <wsdl:output message="tns:AuthProprioSoapOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="AuthForgotten">
      <wsdl:input message="tns:AuthForgottenSoapIn" /> 
      <wsdl:output message="tns:AuthForgottenSoapOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="AuthForgottenMobile">
      <wsdl:input message="tns:AuthForgottenMobileSoapIn" /> 
      <wsdl:output message="tns:AuthForgottenMobileSoapOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="ContactCreateUpdate">
      <wsdl:input message="tns:ContactCreateUpdateSoapIn" /> 
      <wsdl:output message="tns:ContactCreateUpdateSoapOut" /> 
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:portType name="wbsContactHttpGet">
    - <wsdl:operation name="NewsLetter">
      <wsdl:input message="tns:NewsLetterHttpGetIn" /> 
      <wsdl:output message="tns:NewsLetterHttpGetOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="Auth">
      <wsdl:input message="tns:AuthHttpGetIn" /> 
      <wsdl:output message="tns:AuthHttpGetOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="AuthProprio">
      <wsdl:input message="tns:AuthProprioHttpGetIn" /> 
      <wsdl:output message="tns:AuthProprioHttpGetOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="AuthForgotten">
      <wsdl:input message="tns:AuthForgottenHttpGetIn" /> 
      <wsdl:output message="tns:AuthForgottenHttpGetOut" /> 
      </wsdl:operation>
    - <wsdl:operation name="AuthForgottenMobile">
      <wsdl:input message="tns:AuthForgottenMobileHttpGetIn" /> 
      <wsdl:output message="tns:AuthForgottenMobileHttpGetOut" /> 
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="wbsContactSoap" type="tns:wbsContactSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
    - <wsdl:operation name="NewsLetter">
      <soap:operation soapAction="http://tempuri.org/NewsLetter" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="Auth">
      <soap:operation soapAction="http://tempuri.org/Auth" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthProprio">
      <soap:operation soapAction="http://tempuri.org/AuthProprio" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthForgotten">
      <soap:operation soapAction="http://tempuri.org/AuthForgotten" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthForgottenMobile">
      <soap:operation soapAction="http://tempuri.org/AuthForgottenMobile" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="ContactCreateUpdate">
      <soap:operation soapAction="http://tempuri.org/ContactCreateUpdate" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:binding name="wbsContactSoap12" type="tns:wbsContactSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
    - <wsdl:operation name="NewsLetter">
      <soap12:operation soapAction="http://tempuri.org/NewsLetter" style="document" /> 
    - <wsdl:input>
      <soap12:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="Auth">
      <soap12:operation soapAction="http://tempuri.org/Auth" style="document" /> 
    - <wsdl:input>
      <soap12:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthProprio">
      <soap12:operation soapAction="http://tempuri.org/AuthProprio" style="document" /> 
    - <wsdl:input>
      <soap12:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthForgotten">
      <soap12:operation soapAction="http://tempuri.org/AuthForgotten" style="document" /> 
    - <wsdl:input>
      <soap12:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthForgottenMobile">
      <soap12:operation soapAction="http://tempuri.org/AuthForgottenMobile" style="document" /> 
    - <wsdl:input>
      <soap12:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="ContactCreateUpdate">
      <soap12:operation soapAction="http://tempuri.org/ContactCreateUpdate" style="document" /> 
    - <wsdl:input>
      <soap12:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap12:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:binding name="wbsContactHttpGet" type="tns:wbsContactHttpGet">
      <http:binding verb="GET" /> 
    - <wsdl:operation name="NewsLetter">
      <http:operation location="/NewsLetter" /> 
    - <wsdl:input>
      <http:urlEncoded /> 
      </wsdl:input>
    - <wsdl:output>
      <mime:mimeXml part="Body" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="Auth">
      <http:operation location="/Auth" /> 
    - <wsdl:input>
      <http:urlEncoded /> 
      </wsdl:input>
    - <wsdl:output>
      <mime:mimeXml part="Body" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthProprio">
      <http:operation location="/AuthProprio" /> 
    - <wsdl:input>
      <http:urlEncoded /> 
      </wsdl:input>
    - <wsdl:output>
      <mime:mimeXml part="Body" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthForgotten">
      <http:operation location="/AuthForgotten" /> 
    - <wsdl:input>
      <http:urlEncoded /> 
      </wsdl:input>
    - <wsdl:output>
      <mime:mimeXml part="Body" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="AuthForgottenMobile">
      <http:operation location="/AuthForgottenMobile" /> 
    - <wsdl:input>
      <http:urlEncoded /> 
      </wsdl:input>
    - <wsdl:output>
      <mime:mimeXml part="Body" /> 
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="wbsContact">
    - <wsdl:port name="wbsContactSoap" binding="tns:wbsContactSoap">
      <soap:address location="http://xxxxxxxxxxx/admin/wbsContact.asmx" /> 
      </wsdl:port>
    - <wsdl:port name="wbsContactSoap12" binding="tns:wbsContactSoap12">
      <soap12:address location="http://xxxxxxxxxxx/admin/wbsContact.asmx" /> 
      </wsdl:port>
    - <wsdl:port name="wbsContactHttpGet" binding="tns:wbsContactHttpGet">
      <http:address location="http://xxxxxxxxxxx/admin/wbsContact.asmx" /> 
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    un exemple de demande et de réponse SOAP:

    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
    POST /admin/wbsContact.asmx HTTP/1.1
    Host: xxxxxxxxxxxxxxx
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/ContactCreateUpdate"
     
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <ContactCreateUpdate xmlns="http://tempuri.org/">
          <intPortail_id>short</intPortail_id>
          <ostContact>
            <strContact_idExterne>string</strContact_idExterne>
            <strContact_lastName>string</strContact_lastName>
            <strContact_firstName>string</strContact_firstName>
            <strContact_phone>string</strContact_phone>
            <strContact_mobilePhone>string</strContact_mobilePhone>
            <strContact_eMail>string</strContact_eMail>
            <strContact_idMd5>string</strContact_idMd5>
            <strContact_login>string</strContact_login>
            <strContact_password>string</strContact_password>
            <datContact_birthdate>dateTime</datContact_birthdate>
            <bytContact_title>unsignedByte</bytContact_title>
          </ostContact>
          <ostAddress>
            <intCountry_id>short</intCountry_id>
            <strAddress_address1stLine>string</strAddress_address1stLine>
            <strAddress_address2ndLine>string</strAddress_address2ndLine>
            <strAddress_city>string</strAddress_city>
            <strAddress_zipCode>string</strAddress_zipCode>
            <strAddress_regionName>string</strAddress_regionName>
          </ostAddress>
          <intContact_id>int</intContact_id>
          <strLangue>string</strLangue>
        </ContactCreateUpdate>
      </soap:Body>
    </soap:Envelope>
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
     
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <ContactCreateUpdateResponse xmlns="http://tempuri.org/">
          <ContactCreateUpdateResult>
            <strId>string</strId>
            <strError>string</strError>
          </ContactCreateUpdateResult>
        </ContactCreateUpdateResponse>
      </soap:Body>
    </soap:Envelope>
    Mon objectif est donc de faire appel à ce webservice pour la création de contact. Comment dois-je procéder de manière concrète?

  2. #2
    Membre du Club
    Profil pro
    Inscrit en
    Juillet 2010
    Messages
    82
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2010
    Messages : 82
    Points : 43
    Points
    43
    Par défaut
    Voici ce que j'ai pu faire:

    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
    <?php
     
    $request = '<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <ContactCreateUpdate xmlns="http://tempuri.org/">
    <intPortail_id>347</intPortail_id>
          <ostContact>
            <strContact_idExterne>1000</strContact_idExterne>
            <strContact_lastName>test</strContact_lastName>
            <strContact_firstName>test</strContact_firstName>
            <strContact_phone>test</strContact_phone>
            <strContact_mobilePhone>test</strContact_mobilePhone>
            <strContact_eMail>test</strContact_eMail>
            <strContact_idMd5>c4ca4238a0b923820dcc509a6f75849b</strContact_idMd5>
            <strContact_login>test</strContact_login>
            <strContact_password>test</strContact_password>
            <datContact_birthdate>2010-05-16</datContact_birthdate>
            <bytContact_title>1</bytContact_title>
          </ostContact>
          <ostAddress>
            <intCountry_id>73</intCountry_id>
            <strAddress_address1stLine>test</strAddress_address1stLine>
            <strAddress_address2ndLine></strAddress_address2ndLine>
            <strAddress_city>test</strAddress_city>
            <strAddress_zipCode>test</strAddress_zipCode>
            <strAddress_regionName>FRANCE</strAddress_regionName>
          </ostAddress>
          <intContact_id>0</intContact_id>
          <strLangue>FR</strLangue>
        </ContactCreateUpdate>
      </soap:Body>
    </soap:Envelope>'; 
     
    $urlRequest = 'http://xxxxxxxxxx/admin/wbsContact.asmx?op=ContactCreateUpdate';
    $action = 'http://tempuri.org/ContactCreateUpdate';
    $version = 1.1;
     
    $client = new SoapClient("http://xxxxxxxxxx/admin/wbsContact.asmx?WSDL");
     
    $requete = $client->__doRequest($request, $urlRequest, $action, $version);
     
    echo $requete;
     
     
    ?>
    Et voici le flux XML renvoyé par le webservice:
    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"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>System.Web.Services.Protocols.SoapException: Le serveur n'a pas pu traiter la demande. ---&gt; System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
       à wbsContact.ContactCreateUpdate(Int16 intPortail_id, stuContact ostContact, stuAddress ostAddress, Int32 intContact_id, String strLangue)
       --- Fin de la trace de la pile d'exception interne ---</faultstring>
    <detail />
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    Quelqu'un a-t-il une idée d'où pourrait provenir l'erreur?

    Merci par avance pour votre aide

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Juin 2010
    Messages
    49
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2010
    Messages : 49
    Points : 64
    Points
    64
    Par défaut
    Bonjour,

    Je vois ici et à travers l'autre sujet que tu as posté que tu travailles un peu "près" du protocole SOAP.

    La formation des requêtes SOAP vis à vis d'un WSDL donné étant une opération déterministe, des classes existent pour consommer (ou déployer) des services web sans se "soucier" des problématiques de protocole XML. Celles-ci entre autres.

    Je te conseille vivement de t'appuyer dessus, tu gagneras énormément de temps.

  4. #4
    Membre du Club
    Profil pro
    Inscrit en
    Juillet 2010
    Messages
    82
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2010
    Messages : 82
    Points : 43
    Points
    43
    Par défaut
    Bonjour et merci pour la réponse.
    C'est justement ce que je fais ici avec le __doRequest.

    Mon soucis réside dans la réponse SOAP en XML.
    Il ne me retourne pas du tout ce que je devrais avoir.

    J'ai testé avec une autre opération et la réponse est correcte.
    Je demande donc si le soucis ne provient pas du webservice en lui-même? (peu probable selon moi mais je n'explique tout de même cette réponse de sa part)

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Juin 2010
    Messages
    49
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2010
    Messages : 49
    Points : 64
    Points
    64
    Par défaut
    Oui, tu utilises le __doRequest, mais pour pousser une request que tu t'es chargé de fabriquer en XML. La classe propose un __SoapCall qui dispense de passer du XML en paramètre, et te permet d'aborder ton service comme un objet avec une méthode par opération, que tu alimentes avec des array ou des objets, sans manipuler du XML.
    Ça évite au moins de se fourvoyer en formant le XML.

    A une réserve près, je ne sais pas exactement comment ça se comporte avec des opérations de style "document", je ne suis amené qu'à faire du rpc pour ma part.

    Maintenant, si tu as testé toutes les méthodes du service à partir de requêtes exemple, et que c'est la seule qui échoue...

    Ça peut être lié à une valeur incorrecte parmi les paramètres que tu as renseigné, et qui ne serait pas bien gérée côté serveur, (intContact_id = 0 ?). Les éléments optionnels sont indiqués minOccurs = 0 dans le wsdl, essaie d'enlever complètement les éléments vides de la requête, ils sont peut-être pas très bien testés non plus côté serveur...

  6. #6
    Membre du Club
    Profil pro
    Inscrit en
    Juillet 2010
    Messages
    82
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2010
    Messages : 82
    Points : 43
    Points
    43
    Par défaut
    Effectivement, j'ai testé toutes les méthodes du service à partir des requetes exemple. Toutes sauf celle-ci me renvoient des réponses correctes.

    Je n'ai laissé que les éléments requis dans ma requete et le résultat est identique.

    Je soupçonne donc fortement un dysfonctionnement côté serveur.
    Sachant que je suis sur un serveur test et que le webservice vient d'être développé par notre partenaire....

    Je vais voir plus précisémment avec eux....

    Merci pour les réponses en tous cas.

Discussions similaires

  1. Web services : Client SOAP PHP
    Par clementinemonrency dans le forum Services Web
    Réponses: 0
    Dernier message: 22/09/2015, 18h10
  2. Web Services :Client SOAP pour un serveur REST
    Par victo dans le forum Services Web
    Réponses: 0
    Dernier message: 03/04/2014, 21h22
  3. [Web Service] Client SOAP test et XML
    Par Nemesis007 dans le forum Bibliothèques et frameworks
    Réponses: 7
    Dernier message: 28/05/2010, 14h43
  4. [Web Service] Client SOAP, page chinois et exception non déclencher
    Par waldoun dans le forum Bibliothèques et frameworks
    Réponses: 2
    Dernier message: 25/05/2010, 09h48
  5. Réponses: 6
    Dernier message: 21/04/2009, 10h03

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