现在的位置: 首页 > 综合 > 正文

C# D2010调用PHP SOAP

2013年09月11日 ⁄ 综合 ⁄ 共 985字 ⁄ 字号 评论关闭

用ZEND创建一个wsdL

 

D2010可以很方便的支持PHP的SOAP,但是C#NO,要改一下

找出WSDL文件,第一行加
<wsdl:types>
    <xsd:schema elementFormDefault="qualified" targetNamespace="targetNamespace
">
//targetNamespace--你的
    </xsd:schema>
</wsdl:types>

 

比如粗体

 

<definitions name="wps" targetNamespace="urn:wps" xmlns:typens="urn:wps" 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/" xmlns:typens0="http://127.0.0.1/soap/mysoap.php">
<wsdl:types>
    <xsd:schema elementFormDefault="qualified" targetNamespace="urn:wps">

    </xsd:schema>
</wsdl:types>

 

找到wsdl:message这个,其中的wsdl:part的element属性全部换成type指明
的,type="xsd:string"这种。
比如:
    </message>
    <message name="hii">
        <part name="str" type="xsd:string
"/

>
    </message>
    <message name="hiiResponse">
        <part name="hiiReturn" type="xsd:string
"/

>
    </message>
    <message name="reverse">
        <part name="str"/>
    </message>

抱歉!评论已关闭.