本帖最后由 wkhegx 于 2014-06-18 15:15:03 编辑

解决方案 »

  1.   

    这是 Web Service 使用的,与客户沟通用说明文件
    他告知用户,本 Web Service 提供了如下方法:
        [0] => boolean auth(string $email, string $password)
        [1] => string latest(integer $date)
        [2] => boolean send(string $email, string $password, string $message)
      

  2.   

    Web Service 是服务器,使用 SOAP 协议
    服务端使用 SoapServer 类形成服务
    客户端通过 SoapClient 类进行访问
    解析 WSDL 可由
    SoapClient::__getFunctions
    SoapClient::__getTypes
    方法进行相关文件你的项目应该都提供了,你可以通过搜索包含“WSDL”字样的文件,找到他们
      

  3.   

    根据你的说法,我看懂了你写出来的,但是对于下来的代码还是不知道是什么意思。
     <portType name="chatPortType">
            <operation name="auth">
                <input message="typens:auth"/>
                <output message="typens:authResponse"/>
            </operation>
            <operation name="latest">
                <input message="typens:latest"/>
                <output message="typens:latestResponse"/>
            </operation>
            <operation name="send">
                <input message="typens:send"/>
                <output message="typens:sendResponse"/>
            </operation>
        </portType>
        <binding name="chatBinding" type="typens:chatPortType">
            <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
            <operation name="auth">
                <soap:operation soapAction="urn:chatAction"/>
                <input>
                    <soap:body namespace="urn:soap" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                    <soap:body namespace="urn:soap" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
            </operation>
            <operation name="latest">
                <soap:operation soapAction="urn:chatAction"/>
                <input>
                    <soap:body namespace="urn:soap" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                    <soap:body namespace="urn:soap" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
            </operation>
            <operation name="send">
                <soap:operation soapAction="urn:chatAction"/>
                <input>
                    <soap:body namespace="urn:soap" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </input>
                <output>
                    <soap:body namespace="urn:soap" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                </output>
            </operation>
        </binding>
        <service name="soapService">
            <port name="chatPort" binding="typens:chatBinding">
                <soap:address location=""/>
            </port>
        </service>
    </definitions>
      

  4.   

    WSDL 文件有严格的语法格式,相关解释网上都能找到
    WSDL 都是用工具生成的,很少会有人手工书写php 的 soap 扩展虽然没有提供 WSDL 书写工具
    但已有高人书写了 SoapDiscovery.class.php 用于从你写好的服务端工作类上才生出 WSDL 文档因此像我等懒人也就没有必要研读 WDSL 的文法了
      

  5.   

    希望能够给我推荐一个生成wdsl的工具,我知道zend studio可以,但是现在新版的Zend Studio也不能自动生成了。