Web service PHP 5 et client VB.NET
Bonjour à tous :)
j'ai un web service en php5 que je veux référencer dans une application desktop VB.NET.
J'ai un client PHP qui consomme ce service sans problème.
Lorsque je cherche à ajouter la référence à mon service dans mon application vb.net j'obtiens cette erreur:
Citation:
The document at the url
http://localhost/webservice/raidService.wsdl was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The root element of a W3C XML Schema should be <schema> and its namespace should be 'http://www.w3.org/2001/XMLSchema'.'.
- Report from 'DISCO Document' is 'Discovery document at the URL
http://localhost/webservice/raidService.wsdl could not be found.'.
- The document format is not recognized (the content type is 'application/wsdl+xml').
- Report from 'WSDL Document' is 'There is an error in XML document (29, 18).'.
- More than one message part named 'return' was specified. Each message part must have a unique name.
Metadata contains a reference that cannot be resolved: 'http://localhost/webservice/raidService.wsdl'.
The content type application/wsdl+xml of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| '<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="raidService"
targetNamespace="http://localhost4/webservice/raidService.wsdl"
xmlns:typens="urn:eRaid"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:eRaid">
</xsd:schema>
</wsdl:types>
<message name="getDbFileHashRequest">
<part name="algo" type="xsd:string"/>
<part name="fichier" type="xsd:string"/>
</message>
<message name="getDbFileHashResponse">
<part name="return" type="xsd:string"/>
'. |
If the service is defined in the current solution, try building the solution and adding the service reference again.
Voilà le wsdl de mon web service:
Code:
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
|
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="raidService"
targetNamespace="http://localhost/webservice/raidService.wsdl"
xmlns:typens="urn:eRaid"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:eRaid">
</xsd:schema>
</wsdl:types>
<message name="getDbFileHashRequest">
<part name="algo" type="xsd:string"/>
<part name="fichier" type="xsd:string"/>
</message>
<message name="getDbFileHashResponse">
<part name="return" type="xsd:string"/>
</message>
<message name="sendStatusRequest">
<part name="return" type="xsd:integer"/>
<part name="return" type="xsd:integer"/>
<part name="return" type="xsd:string"/>
</message>
<portType name="eRaidPort">
<operation name="getDbFileHash">
<input message="typens:getDbFileHashRequest"/>
<output message="typens:getDbFileHashResponse"/>
</operation>
<operation name="sendStatus">
<input message="typens:sendStatusRequest"/>
</operation>
</portType>
<binding name="eRaidBinding" type="typens:eRaidPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getDbFileHash">
<soap:operation soapAction="getDbFileHashAction"/>
<input name="getDbFileHashRequest">
<soap:body use="encoded"
namespace="urn:eRaid"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output name="getDbFileHashResponse">
<soap:body use="encoded"
namespace="urn:eRaid"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="sendStatus">
<soap:operation soapAction="sendStatusAction"/>
<input name="sendStatusRequest">
<soap:body use="encoded"
namespace="urn:eRaid"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
</operation>
</binding>
<service name="eRaidService">
<port name="eRaidPort" binding="typens:eRaidBinding">
<soap:address location="http://localhost/webservice/raidService.php"/>
</port>
</service>
</wsdl:definitions> |
Merci pour vôtre aide