2
我正在做一個相同的SOAP請求,一個使用Zend框架,另一個不是。 Zend沒有工作,唯一的區別似乎是信封命名空間。不同的肥皂信封 - 其中一個工程,其他失敗
信封是如何設置的,以及爲什麼會失敗?
Zend的SOAP調用
<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調用
<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>