-1
我有一个网站需要发送请求到另一台服务器并检索一些数据。我对SOAP一无所知,所以我需要一个专家帮助。通过PHP访问SOAP
这是第二台服务器给我的数据。 我不知道从哪里开始以及如何去做。所以,任何帮助表示赞赏。 你能否给我一个适用于此代码的php代码的工作示例。
SOAP 1.1
以下是示例SOAP 1.1请求和响应。显示的占位符需要用实际值替换。
POST /Service1.asmx HTTP/1.1
Host: puanreport.retail.az
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/_find"
<?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>
<_find xmlns="http://tempuri.org/">
<par>string</par>
</_find>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?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>
<_findResponse xmlns="http://tempuri.org/">
<_findResult>
<bon>
<Cari_Kod>string</Cari_Kod>
<Puan>string</Puan>
</bon>
<bon>
<Cari_Kod>string</Cari_Kod>
<Puan>string</Puan>
</bon>
</_findResult>
</_findResponse>
</soap:Body>
</soap:Envelope>
可能重复[如何使用香皂类的PHP(带有示例)?](http://stackoverflow.com/questions/9018236/how-to-use-soap-class-in- PHP与 - 例如) – Martin 2015-03-02 10:30:26