<?php /* * The "get" operation is even easier. */ try{ $soapclient = new SoapClient("http://localhost:8022/adabas_EmployeesMini?WSDL", array('trace' => 1)); } catch (SoapFault $soapfault) { echo "<pre>"; print_r($soapfault); echo "</pre>"; } /* * Construct the "key array", which consists of just one element, * the primary key for the employees file - "personnel_id"; */ $primKey = array('personnel_id' => '99999999'); /* * Get the record */ try { $Adabasresponse = $soapclient->get($primKey); } catch (SoapFault $soapfault) { echo "<pre>"; print_r($soapfault); echo "</pre>"; return; } /* * Check if we actually got the record we are looking for */ if (is_null($Adabasresponse->adabasEmployees->adabasEmployee)) { echo "No Employee with personnel_id=".$primKey['personnel_id']; return; } /* * Print the formatted response */ echo "<pre>"; print_r($Adabasresponse); echo "</pre>"; /* * Proceed to ex05_SoaGatewayEmpDel.php - Delete the record added in ex03_SoaGatewayEmpAdd.php */ ?>
![]() ![]() |
![]() |
![]() ![]() |