Closed TwinMist closed 6 years ago
Two issues:
1) CONTAINS
should be Contains
2) setSearchCriteriaDeviceMACAddress
expects an array
$DeviceMACAddress = (new SearchCriteriaDeviceMACAddress())
->setMode('Contains')
->setValue('XXXXXX')
->setIsCaseInsensitive(true);
$request = (new SystemEndpointGetListRequest())
->setSearchCriteriaDeviceMACAddress([$DeviceMACAddress]);
Hi If possible can you write a example of how to build a search request trying to search for a DeviceMACAddress with the below code i am getting: Error 6004] OCI XML Request validation error tired use CWM\BroadWorksConnector\Ocip\Models\SearchCriteria; use CWM\BroadWorksConnector\Ocip\Models\SearchCriteriaDeviceMACAddress; use CWM\BroadWorksConnector\Ocip\Models\SystemEndpointGetListRequest; use CWM\BroadWorksConnector\Ocip\Models\SystemEndpointGetListResponse;
$DeviceMACAddress = (new SearchCriteriaDeviceMACAddress()) ->setmode('CONTAINS') ->setvalue('XXXXXX') ->setisCaseInsensitive('true');
$request = (new SystemEndpointGetListRequest()) ->setsearchCriteriaDeviceMACAddress($DeviceMACAddress);
try { $response = $ocip->SystemEndpointGetListRequest($request); foreach ($response->getendpointTable()->getRow() as $row) { echo $row->getCol()[0] . PHP_EOL; } } catch (ErrorResponseException $e) { echo $e->getMessage() . PHP_EOL; exit(); } thanks