Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_once "php/class/nusoap-0.9.5/lib/nusoap.php";
- $soap = new soap_server;
- $soap->configureWSDL('WS-WebCodeFree', 'http://www.philipsvaloriza.com.br/teste-server.php');
- $soap->wsdl->schemaTargetNamespace = 'http://www.philipsvaloriza.com.br/teste-server.php';
- $soap->register(
- 'info',
- array(),
- array('x' => 'xsd:string'),
- 'http://soapinterop.org/'
- );
- $soap->register(
- 'post_java',
- array(),
- array('x' => 'xsd:string'),
- 'http://soapinterop.org/'
- );
- $soap->register(
- 'post_php',
- array(),
- array('x' => 'xsd:string'),
- 'http://soapinterop.org/'
- );
- $soap->register(
- 'login_user',
- array('login' => 'xsd:string','pass' => 'xsd:int'),
- array('x' => 'xsd:string'),
- 'http://soapinterop.org/'
- );
- $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : 'teste123';
- $soap->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '');
- function info(){
- return "WebCodeFree - Desenvolvimento Web.";
- }
- function post_java(){
- return "Em Breve Acesso a Postagens Java Via Serviço";
- }
- function post_php(){
- return "Em Breve Acesso a Postagens PHP Via Serviço";
- }
- function login_user($login, $senha){
- return "Seja Bem Vindo Usuário ". $login . " !!!";
- }
- include('lib/nusoap.php');
- $cliente = new nusoap_client('http://localhost/vinicius/thiengo/doc/projects/web-service-php-nusoap/servidor.php?wsdl');
- $result1 = $client->call('info');
- $result2 = $client->call('post_java');
- $result3 = $client->call('post_php');
- $result4 = $client->call('login_user', array('Paulo',12));
- echo $result1."<br>";
- echo $result2."<br>";
- echo $result3."<br>";
- echo $result4."<br>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement