WSDL错误:SOAP-ERROR:解析WSDL:无法绑定到服务

时间:2011-05-03 17:49:08

标签: xml web-services soap wsdl

<?xml version="1.0" encoding="UTF-8"?>
<definitions
    xmlns="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://localhost:8888/testes/wsdl/calculadora.wsdl">
    <message name="requisicaoSoma">
        <part name="x" type="xsd:int" />
        <part name="y" type="xsd:int" />
    </message>
    <message name="respostaSoma">
        <part name="z" type="xsd:int" />
    </message>
    <portType name="calculadoraPortType">
        <operation name="soma">
            <input message="requisicaoSoma" />
            <output message="respostaSoma" />
        </operation>
    </portType>
    <binding name="calculadoraBinding" type="tns:calculadoraPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
        <operation>
            <soap:operation soapAction="http://localhost:8888/testes/calculadora.php" />
            <input><soap:body use="literal" /></input>
            <output><soap:body use="literal" /></output>
        </operation>
    </binding>
</definitions>

我错过了什么吗? 谢谢。

1 个答案:

答案 0 :(得分:2)

您尚未定义WSDL的service元素。有关更多信息,请参阅以下链接。

WSDL Essentials

Sample WSDL