Bonjour,

Je dois à partir de mon application codée en C# pouvoir consommer un Web Service mis à ma disposition par qqn de l'extérieur. Il m'a fourni le lien vers le fichier WSDL (du type https://uneCertaineUrl/sendsms.wsdl).

Si j'ai bien compris, à partir de Visual Studio, il faudrait faire "Add service reference" -> Advanced -> "Add web reference" pour pouvoir l'utiliser.
Mais j'obtiens cette erreur:
Error 1 Custom tool error: Unable to import WebService/Schema. Cannot find definition for http://schemas.xmlsoap.org/wsdl/:sendsmsBinding. Service Description with namespace http://schemas.xmlsoap.org/wsdl/ is missing.
Parameter name: name
Est-ce que quelqu'un pourrait m'aider ?

Voici le fichier sendsms.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
<?xml version ='1.0' encoding ='UTF-8' ?> 
<definitions name='sendsmswsdl' 
  xmlns:tns='https://uneCertaineUrl/server2wsdl.wsdl' 
  xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
  xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
  xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' 
  xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' 
  xmlns='http://schemas.xmlsoap.org/wsdl/'> 
 
<message name='sendsmsAnfrage'> 
  <part name='phoneno' type='xsd:string'/>
  <part name='message' type='xsd:string'/>
</message> 
<message name='sendsmsAntwort'> 
  <part name='Result' type='xsd:string'/> 
</message> 
 
<portType name='sendsmsPortType'> 
  <operation name='sendsms'> 
    <input message='tns:sendsmsAnfrage'/> 
    <output message='tns:sendsmsAntwort'/> 
  </operation> 
</portType> 
 
<binding name='sendsmsBinding' type='tns:sendsmsPortType'> 
  <soap:binding style='rpc' 
    transport='http://schemas.xmlsoap.org/soap/http'/> 
  <operation name='sendsms'> 
    <soap:operation soapAction='urn:xmethodssendsms#sendsms'/> 
    <input> 
      <soap:body use='encoded' namespace='urn:xmethodssendsms' 
        encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
    </input> 
    <output> 
      <soap:body use='encoded' namespace='urn:xmethodssendsms' 
        encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
    </output> 
  </operation> 
</binding> 
 
<service name='sendsmsService'> 
  <port name='sendsmsPort' binding='sendsmsBinding'> 
    <soap:address location='https://uneCertaineUrl/serversendsms.php'/> 
  </port> 
</service> 
</definitions>
Je précise juste que la personne en question n'a laissé son firewall ouvert que pour l'adresse IP correpsondant à mon boulot, je n'y aurai donc pas accès ce week-end de chez moi.

PS: J'espère que c'est compréhensif ! Je suis chargée de la programmation d'une application interactive pour ce client, pour laquelle je dois pouvoir accéder à sa base de données. Je n'ai aucune connaissance en Web Services, WSDL et SOAP, j'ai découvert tout ça hier matin. Donc soyez indulgents !