SOAP クライアントに送信したいデータの配列があります。これはすべて機能しますが、__getLastRequest() で明らかになったように、1 つのデータが送信されません。
これが私のコードです
<?php
$test_array = array(
"request" => array(
"dateTime" => "2011-12-05T11:37:06.0000000+00:00",
"brandId" => 2,
"extSysId" => 11,
"extSysPassword" => "xxxxx",
"customer" => array(
"title" => "Mr",
"firstName" => "Dec",
"lastName" => "Test-Two",
"address" => array(
"type" => "Residential",
"pafValidated" => TRUE,
"houseNumber" => "xx",
"houseName" => "",
"line1" => "xx xx",
"line2" => "",
"line3" => "xx",
"line4" => "",
"line5" => "",
"postcode" => "xxx xxx"
),
"phones" => array(
0 => array(
"type" => "Home",
"_" => "xxx xxxxxx"
),
1 => array(
"type" => "Work",
"preferred" => TRUE,
"_" => ""
),
2 => array(
"type" => "Mobile",
"preferred" => TRUE,
"_" => ""
)
),
"email" => "xxxx.xxxx@gmail.com"
),
"nextPurchase" => array(
"date" => "2014-05-01"
),
"dataProtection" => array(
"group" => FALSE,
"thirdParty" => FALSE
),
"futureContactChannels" => array(
0 => array(
"type" => "Whitemail",
"option" => FALSE
),
1 => array(
"type" => "Email",
"option" => FALSE
),
2 => array(
"type" => "Phone",
"option" => FALSE
),
3 => array(
"type" => "SMS",
"option" => FALSE
)
),
"vehicleRequests" => array(
0 => array(
"derivativeCode" => "xxxxx",
"type" => "T"
)
),
"Retailer" => array(
0 => array (
"dealerCode" => "00082"
)
),
"company" => array(
"companyName" => "",
"jobTitle" => ""
),
"campaign" => array(
"code" => "xxxxxxxxx",
"source" => 69
),
"notes" => "blah balh: ."
)
);
$client = new SoapClient("/xxx/xxxx/xxxxxx/xxxxx.wsdl", array(
"login" => "xxx",
"password" => "xxx",
"location" => "http://xxx.xxx.xxx.xxx/xxxxxx/Some.asmx",
"uri" => "urn:xmethods-delayed-quotes",
'trace' => 1,
'exceptions' => 1,
'soap_version' => 'SOAP_1_1',
'encoding' => 'UTF-8',
'features' => 'SOAP_USE_XSI_ARRAY_TYPE'
));
$client->CallComeFunction($test_array);
echo "REQUEST:\n" . $client->__getLastRequest() . "\n";
echo "*************************************************\n";
echo "Response:\n" . $client->__getLastResponse() . "\n";
Retailed[0]['dealerCode'] は、送信された XML から省略される唯一の情報です。
何か案は?
どうもありがとう。