我正在发出一个相同的 SOAP 请求,一个使用 Zend 框架,另一个不使用。Zend 不工作,唯一的区别似乎是信封命名空间。
信封是如何设置的,为什么其中一个会失败?
Zend 肥皂电话
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://wsapi" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
<env:Body>
<ns1:incomingRequest env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<username xsi:type="xsd:string">myuser</username>
<password xsi:type="xsd:string">mypass</password>
<request xsi:type="xsd:string">&lt;incoming-requests&gt;&lt;request description="getEmailMessageStatus"&gt;&lt;incoming-data&gt;&lt;email-message messageID="messageID"/&gt;&lt;/incoming-data&gt;&lt;/request&gt;&lt;/incoming-requests&gt;</request>
</ns1:incomingRequest>
</env:Body>
</env:Envelope>
PHP 肥皂调用
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://wsapi" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:incomingRequest>
<username xsi:type="xsd:string">myuser</username>
<password xsi:type="xsd:string">mypass</password>
<request xsi:type="xsd:string"><incoming-requests><request description="getEmailMessageStatus"><incoming-data><email-message messageID="messageID"/></incoming-data></request></incoming-requests></request>
</ns1:incomingRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>