由于 php.net 上的 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 连接
非常感谢任何建议/链接/示例。
测试和工作!
with https, user & password
不定期副业成功案例分享
<clin:price>
)(当响应包含关于未识别子元素的消息时,您可以看到)