Hi I am working on soap in PHP. PHP version 7.0 . I can connect with soap but "DemograficData" inclue multiple "EmKeyValue" . I created array , but array print show only 1 "EmKeyValue" . Can i send request without SoapClient ?
$SendOngoingEmail =
array(
"ServiceTicket" => "TICKETID",
"value" => "VALUEFORSERVİS",
"key" => $value_ilgi_alani,
"DemograficData" => array(
"EmKeyValue" => array("Key" => "AAAA","Value" => "AAAA_VALUE"),
"EmKeyValue" => array("Key" => "BBBB","Value" => "BBBB_VALUE"),
),
"ForceUpdate" => TRUE,
"OngoingCampaignId" => "SERVICEID",
);
$connect= new SoapClient("https://xyzabc.com/max/member.asmx?WSDL",
array(
"trace" => 1,
'exceptions' => 1,
"stream_context" => stream_context_create(
array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
)
)
)
)
);
$result = $connect->SendOngoingEMail($SendOngoingEmail);
Working Sample Request :
<?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>
<SendOngoingEMail xmlns="http://xyzabc.com/member">
<ServiceTicket>string</ServiceTicket>
<Key>string</Key>
<Value>string</Value>
<DemograficData>
<EmKeyValue>
<Key>string</Key>
<Value>string</Value>
</EmKeyValue>
<EmKeyValue>
<Key>string</Key>
<Value>string</Value>
</EmKeyValue>
</DemograficData>
<ForceUpdate>boolean</ForceUpdate>
<OngoingCampaignId>string</OngoingCampaignId>
</SendOngoingEMail>
</soap:Body>
</soap:Envelope>
Try this:
"DemograficData" => array(
"EmKeyValue" => array(
array("Key" => "AAAA","Value" => "AAAA_VALUE"),
array("Key" => "BBBB","Value" => "BBBB_VALUE")
),
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.