I have a php web service that I can call from a php client. I need to call this web service from a vb.net application. When I try to add a reference to this web service I get this error:
The root element of a W3C XML Schema should be <schema>
here is the top of my wsdl file:
<?xml version="1.0"?>
<!-- partie 1 : Definitions -->
<definitions name="raidService"
targetNamespace="http://mydomain/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/">
here is the entire wsdl:
<?xml version="1.0"?>
<!-- partie 1 : Definitions -->
<definitions name="eRaid"
targetNamespace="eRaid"
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/">
<!-- partie 2 : Types -->
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:eRaid">
</xsd:schema>
</types>
<!-- partie 3 : Message -->
<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>
<!-- partie 4 : Port Type -->
<portType name="eRaidPort">
<!-- partie 5 : Operation -->
<operation name="getDbFileHash">
<input message="typens:getDbFileHashRequest"/>
<output message="typens:getDbFileHashResponse"/>
</operation>
<operation name="sendStatus">
<input message="typens:sendStatusRequest"/>
</operation>
</portType>
<!-- partie 6 : Binding -->
<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>
<!-- partie 7 : Service -->
<service name="eRaidService">
<documentation>Retourne une phrase simple </documentation>
<!-- partie 8 : Port -->
<port name="eRaidPort" binding="typens:eRaidBinding">
<soap:address location="http://localhost/webServiceTest/MyService.php"/> <!-- modifier ce chemin vers server.php -->
</port>
</service>
</definitions>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.