日期:2014-05-17  浏览次数:20618 次

关于zend soap
使用Zend_Soap_AutoDiscover自动生成的wsdl在windows下正常,同样的代码换到linux环境中就不行了,
XML code

xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Bss_Mailservice" targetNamespace="http://split.bss.com/interface/index/mailservice">
<types>
<xsd:schema targetNamespace="http://split.bss.com/interface/index/mailservice"/>
</types>
<portType name="Bss_MailservicePort">
<operation name="auth">
<documentation>auth</documentation>
<input message="tns:authIn"/>
</operation>
<operation name="send">
<documentation>send</documentation>
<input message="tns:sendIn"/>
</operation>
</portType>
<binding name="Bss_MailserviceBinding" type="tns:Bss_MailservicePort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="auth">
<soap:operation soapAction="http://split.bss.com/interface/index/mailservice#auth"/>
<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://split.bss.com/interface/index/mailservice"/>
</input>
<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://split.bss.com/interface/index/mailservice"/>
</output>
</operation>
<operation name="send">
<soap:operation soapAction="http://split.bss.com/interface/index/mailservice#send"/>
<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://split.bss.com/interface/index/mailservice"/>
</input>
<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://split.bss.com/interface/index/mailservice"/>
</output>
</operation>
</binding>
<service name="Bss_MailserviceService">
<port name="Bss_MailservicePort" binding="tns:Bss_MailserviceBinding">
<soap:address location="http://split.bss.com/interface/index/mailservice"/>
</port>
</service>
<message name="authIn">
<part name="appkey" type="xsd:anyType"/>
</message>
<message name="sendIn">
<part name="to" type="xsd:anyType"/>
<part name="cc" type="xsd:anyType"/>
<part name="bcc" type="xsd:anyType"/>
<part name="subject" type="xsd:anyType"/>
<part name="body" type="xsd:anyType"/>
</message>
</definitions>


基中
<part name="to" type="xsd:anyType"/>
<part name="cc" type="xsd:anyType"/>
<part name="bcc" type="xsd:anyType"/>
<part name="subject" type="xsd:anyType"/>
<part name="body" type="xsd:anyType"/>
这几个参数都应该是string类型,但在linux下生成的是anyType,另外我在方法的注释中己经写了返回值的注释,但也不管用
PHP code

   /**
     * 
     * 发送邮件
     * @param string $to
     * @param string $cc
     * @param string $bcc
     * @param string $subject
     * @param string $body
     * @return array
     * @throws SoapFault