Hi All,
I have found the solution to the above function. Please refer to the code below:
try {
// Create a PlacementExclusionList instance
$sharedList = new PlacementExclusionList();
$sharedList->Id = "Your-Shared-List-ID";
// Create the request
$request = new GetListItemsBySharedListRequest();
$request->SharedList = new SoapVar(
$sharedList,
SOAP_ENC_OBJECT,
'PlacementExclusionList', // Derived type
'https://bingads.microsoft.com/CampaignManagement/v13' // Namespace
);
$request->SharedEntityScope = "Customer";
// Send the request
$response = $GLOBALS['CampaignManagementProxy']->GetService()->GetListItemsBySharedList($request);
dd($response);
} catch (SoapFault $e) {
dump("SOAP Fault:", [
'faultcode' => $e->faultcode,
'faultstring' => $e->faultstring,
]);
// Retrieve and display the last SOAP request for debugging
if (isset($GLOBALS['CampaignManagementProxy'])) {
dump("Last SOAP Request:", $GLOBALS['CampaignManagementProxy']->GetService()->__getLastRequest());
}
} catch (Exception $e) {
dump("General Exception:", $e->getMessage());
}