Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // cliente.php
- // http://www.thiengo.com.br
- include('lib/nusoap.php');
- $cliente = new nusoap_client('http://localhost/codigo/webSevices/02/servidor.php?wsdl');
- $parametros = array('nome'=>'Teste','idade'=>51);
- $resultado = $cliente->call('exemplo', $parametros);
- $result = $cliente->call('listaProdutos');
- # apresentação das chamadas ao webservice
- echo utf8_encode($resultado);
- print('<br> <br>');
- ?>
- <select>
- <?php
- //exibe o resultado
- $top = sizeof($result) - 1;
- $bottom = 0;
- while($bottom <= $top)
- {
- echo '<option value='.$result[$bottom].'>'.$result[$bottom].'</option>';
- $bottom++;
- }
- ?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment