私は SOAP 操作にまったく慣れていません。
配送方法の収集ポイントを取得するための XML ドキュメント (SOAP) が提供されています。
ここにあるマニュアルから:
http://privpakservices.schenker.nu/package/package_1.3/packageservices.asmx?op=SearchCollectionPoint
次の SOAP リクエストを使用する必要があることがわかります。
POST /package/package_1.3/packageservices.asmx HTTP/1.1
Host: privpakservices.schenker.nu
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://privpakservices.schenker.nu/SearchCollectionPoint"
<?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>
<SearchCollectionPoint xmlns="http://privpakservices.schenker.nu/">
<customerID>long</customerID>
<key>string</key>
<serviceID>string</serviceID>
<paramID>int</paramID>
<address>string</address>
<postcode>string</postcode>
<city>string</city>
<maxhits>int</maxhits>
</SearchCollectionPoint>
</soap:Body>
</soap:Envelope>
問題は、これを PHP を使用してリクエストとして送信する方法と、応答を取得する方法がわからないことです。
私を正しい方向に特定する助けがあれば、大歓迎です。
アップデート
var_dump で応答データを読み取ることができます。ただし、個々の要素データを読み取ることができません。
以下のようにデータを読み取る必要があります
foreach($parser as $row) {
echo $row->customerID;
echo $row->key;
echo $row->serviceID;
}