相关疑难解决方法(0)

带有CURL的PHP​​中的SOAP请求

由于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>
Run Code Online (Sandbox Code Playgroud)

请注意:

  • 有用户/通过身份验证
  • SSL连接

任何建议/链接/示例非常感谢.

php curl soap

64
推荐指数
1
解决办法
14万
查看次数

标签 统计

curl ×1

php ×1

soap ×1