$client = new SoapClient($wsdl, array("cache_wsdl" => WSDL_CACHE_NONE)); $alias = "SX2"; $deleted = false; $recno = false; $param = array("ALIAS" => $alias, "RDELETED" => $deleted); $result = $client->GETTRMAX($param); $tRMax = intVal($result->GETTRMAXRESULT / 10); $step = 40; if ($tRMax > 0) { $results = array(); $fNames = array("X2_CHAVE", 'X2_ARQUIVO', 'X2_NOME', 'X2_UNICO'); $fldName = array("UFLDNAME" => $fNames); for ($i = 1; $i <= $tRMax; $i += $step) { $e = min($i + $step, $tRMax); $param = array("ALIAS" => $alias, "RINIT" => $i, "REND" => $e, "FIELDSNAME" => $fldName, "RDELETED" => $deleted, "RRECNO" => $recno); $result = $client->GETTABLEBYFIELDSNAME($param); array_push($results, $result); } $result = $results[0]; echo "<table border='1' align='left'>"; echo "<thead>"; echo "<tr align='left'>"; echo "<th>FLDNAME</th>"; echo "<th>FLDTYPE</th>"; echo "<th>FLDSIZE</th>"; echo "<th>FLDDEC</th>"; echo "<th>FLDTITLE</th>"; echo "<th>FLDDESCRIPTION</th>"; echo "<th>FLDMANDATORY</th>"; echo "</tr>"; echo "</thead>";