1, 'classmap' => $aSOAPMapping, // defined in itopsoaptypes.class.inc.php ) ); try { // The most simple service, returning a string // $sServerVersion = $oSoapClient->GetVersion(); echo "
GetVersion() returned $sServerVersion
"; // More complex ones, returning a SOAPResult structure // (run the page to know more about the returned data) // $oRes = $oSoapClient->CreateIncidentTicket ( 'admin', /* login */ 'admin', /* password */ 'Server', /* type */ 'Email server down', /* description */ 'HW found shutdown', /* initial situation */ 'Email not working', /* impact */ null, /* caller */ new SOAPExternalKeySearch(array(new SOAPSearchCondition('name', 'Demo'))), /* customer */ new SOAPExternalKeySearch(array(new SOAPSearchCondition('id', 1))), /* workgroup */ array( new SOAPLinkCreationSpec( 'bizDevice', array(new SOAPSearchCondition('name', 'Router03')), array(new SOAPAttributeValue('impact', 'root cause')) ), new SOAPLinkCreationSpec( 'bizServer', array(new SOAPSearchCondition('name', 'Server01')), array(new SOAPAttributeValue('impact', '')) ), ), /* impact */ 'high' /* severity */ ); echo "CreateIncidentTicket() returned:\n"; echo "
\n"; print_r($oRes); echo "\n"; echo "\n"; } catch(SoapFault $e) { echo "
\n"; echo htmlspecialchars($oSoapClient->__getLastRequest())."\n"; echo ""; echo "