由于php.net上的SOAP手册不是很友好,我找不到任何好的示例,所以我会在这里发布我的问题。使用CURL PHP的SOAP请求
如何创建PHP SOAP请求,看起来像这样?
POST /MySERVER/myWSDLservice.asmx HTTP/1.1
Host: connection.mywebsite.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://connection.mywebsite.com/MySERVER/GetCarType"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetCarType xmlns="http://connection.mywebsite.com/MySERVER/">
<IDNumber>string</IDNumber>
</GetCarType>
</soap:Body>
</soap:Envelope>
请注意:
- 没有用户名/密码身份验证
- SSL连接
任何建议/链接/例如大加赞赏。
[PHP :: SOAP](http://php.net/manual/en/book.soap.php) – J0HN
[ SoapClient类](http://www.php.net/manual/en/class.soapclient.php) – hakre