使用soap PHP客户端生成模式


Generating schema with soap PHP client

如何使用php生成此模式soap客户端似乎无法获得方法

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:loc="http://www.csapi.org/schema/parlayx/subscribe/manage/v1_0/local">
 <soapenv:Header>
 <tns:RequestSOAPHeader xmlns:tns="http://www.namesapace.com/common/v2_1">
 <tns:one>***</tns:one>
 <tns:two>***</tns:three>
 <oauth_token>***</oauth_token>
 </tns:RequestSOAPHeader>
 </soapenv:Header>
 <soapenv:Body>
 <loc:ProductRequest>
 <subInfo>
 <productID>***</productID>
 <isAutoExtend>0</isAutoExtend>
 </subInfo>
 </loc:ProductRequest>
 </soapenv:Body>
</soapenv:Envelope>

在使用客户端之上,有时它可能不会绑定到名称空间,特别是如果使用不同的soap版本或其他奇怪的原因。通过重写soap类并替换ns1和ns2值解决了这个问题http://php.net/manual/en/soapclient.dorequest.php#74123

如果使用php soapclient没有成功,请使用curl发送请求。

示例- PHP中使用CURL的SOAP请求