0
SOAP APIを使用して3PL CentralでCreate Orderを統合しようとしています。3PL中央PHP SOAPリクエストエラーシーケンスに要素がありません
は、ここに私のコード::
//Request Array
$req_arr = [
'extLoginData' => [
'ThreePLKey' => 'key',
'Login' => 'user',
'Password' => 'pass',
'FacilityID' => 123,
'CustomerID' => 100
],
'orders' => [
'Order' => [
'TransInfo' => [
'ExpectedDate' => '2017-02-11T00:00:00',
'ReferenceNum' => 'TESTN%$',
],
'ShipTo' => [
'Name' => 'Test Test', //[OPTIONAL]
'CompanyName' => 'Test Address',
'Address' => [
'Address1' => '1212 Main Street',
'City' => 'Los Angeles',
'State' => 'CA',
'Zip' => '90010',
'Country' => 'US'
],
'PhoneNumber1' => '34343434324', //[OPTIONAL]
'Fax' => '9856326352', //[OPTIONAL]
'EmailAddress1' => '[email protected]', //[OPTIONAL]
'CustomerName' => 'test', //[OPTIONAL]
'Vendor' => 'Any', //[OPTIONAL]
'Dept' => 'Any', //[OPTIONAL]
'RetailerID' => 343 //[OPTIONAL – do not send if not matching with value in the 3PL Central]
],
'Notes' => 'Test',
'PalletCount' => 10, //[OPTIONAL – do not send if not matching with value in the 3PL Central]
]
],
'warnings' => 'test'
];
//SOAP options
$options = [
'uri' => 'http://schemas.xmlsoap.org/soap/envelope/',
'style' => SOAP_RPC,
'use' => SOAP_ENCODED,
'soap_version' => SOAP_1_2,
'trace' => true,
'cache' => WSDL_CACHE_NONE,
'exceptions' => true,
"features" => SOAP_SINGLE_ELEMENT_ARRAYS,
'encoding' => 'UTF-8',
'connection_timeout' => 15,
'Content-Type' => 'application/soap+xml; charset=utf-8',
'Content-Length' => strlen(json_encode($req_arr)),
'SOAPAction' => 'http://www.JOI.com/schemas/ViaSub.WMS/CreateOrders'
];
$client = new \SoapClient('https://secure-wms.com/webserviceexternal/contracts.asmx?wsdl', $options);
$result = $client->__soapCall('CreateOrders', $req_arr);
私はサーバーが要求を処理できませんでしたエラー
に取得しています。 --->配列が全く 要素
が含まれていない私には、Googleこのためとに割り当てる問題は、私が成功した変換アレイによって生成されるが、いくつかのPHPスクリプト(XML変換器アレイ)を使用しているXMLであると結論配列をXMLに変換して、XMLにエラーがないようにします。
私が設定したSOAPオプションに問題はありますか?
ありがとうございました。
これはAPI Doc Linkです。
ようこそ、StackOverflow、ryo7689。この質問に対する答えを提供していただきありがとうございます。 – David