快速业务通道

PHP5对webservice的实现

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-03-15

到这里应该都看的懂吧
下面是WSDL文件

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.TestPHP.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.TestPHP.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://www.TestPHP.com/">
      <s:element name="HelloWorld">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="uname" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="upassword" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="HelloWorldResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetMember">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="uid" type="s:int" />
            <s:element minOccurs="0" maxOccurs="1" name="uname" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetMemberResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetMemberResult" type="tns:ArrayOfMember" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="ArrayOfMember">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="Member" nillable="true" type="tns:Member" />
        </s:sequence>
      </s:complexType>
      <s:complexType name="Member">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="UserId" type="s:int" />
          <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
        </s:sequence>
      </s:complexType>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="HelloWorldSoapIn">
    <wsdl:part name="parameters" element="tns:HelloWorld" />
  </wsdl:message>
  <wsdl:message name="HelloWorldSoapOut">
    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />
  </wsdl:message>
  <wsdl:message name="GetMemberSoapIn">
    <wsdl:part name="parameters" element="tns:GetMember" />
  </wsdl:message>
  <wsdl:message name="GetMemberSoapOut">
    <wsdl:part name="parameters" element="tns:GetMemberResponse" />
  </wsdl:message>
  <wsdl:portType name="TestPHPSoap">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldSoapIn" />
      <wsdl:output message="tns:HelloWorldSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetMember">
      <wsdl:input message="tns:GetMemberSoapIn" />
      <wsdl:output message="tns:GetMemberSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="TestPHPSoap" type="tns:TestPHPSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap:operation soapAction="http://www.TestPHP.com/HelloWorld"   />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetMember">
      <soap:operation soapAction="http://www.TestPHP.com/GetMember"  />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="TestPHPSoap12" type="tns:TestPHPSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap12:operation soapAction="http://www.TestPHP.com/HelloWorld"  />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetMember">
      <soap12:operation soapAction="http://www.TestPHP.com/GetMember"  />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="TestPHP">
    <wsdl:port name="TestPHPSoap" binding="tns:TestPHPSoap">
      <soap:address location="http://soap/goodwsdl/testphp.php" />
    </wsdl:port>
    <wsdl:port name="TestPHPSoap12" binding="tns:TestPHPSoap12">
      <soap12:address location="http://soap/goodwsdl/testphp.php" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号