Advertisement
Guest User

Untitled

a guest
Jul 24th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.30 KB | None | 0 0
  1. ini_set('soap.wsdl_cache_enabled', 0);
  2.             $url = 'https://wcftesting.mwfc.com.uy/MWFCService.svc?wsdl';
  3.             $user = 'webInst';
  4.             $pass = 'mwfc2018';
  5.             $namespace = 'http://schemas.datacontract.org/2004/07/SociosWFC.Models';
  6.  
  7.             $pet = new stdClass();
  8.             $pet->Ci = '42222213';
  9.             $pet->User = $user;
  10.             $pet->Pass = $pass;
  11.            
  12.             $auth = array();
  13.             $auth['user'] = $user;
  14.             $auth['pass'] = $pass;
  15.             $auth['ci'] = '42222213';
  16.            
  17.             $options = array(
  18.                     'location'=>$url,
  19.                     'uri'=>$url,
  20.                     'soap_version'=>SOAP_1_2,
  21.                     'trace'=>1,
  22.                     'encoding'=>'UTF-8',
  23.                     'exceptions'=>1
  24.                     );
  25.  
  26.            
  27.  
  28.             $client = new SoapClient($url, $options);
  29.             //echo "<pre>";
  30.             //var_dump($client->__getFunctions());
  31.             //echo "<hr>";
  32.             //var_dump($client->__getTypes());
  33.             //echo "<hr>";
  34.            
  35.             //$header = new SoapHeader($namespace,'requestHeader',$auth,false);
  36.             //$client->__setSoapHeaders($header);
  37.             try{
  38.                 //$salida = $client->__soapCall('GetDetalleSocio',array('GetDetalleSocio'=>$pet));
  39.                 $salida = $client->GetDetalleSocio('GetDetalleSocio',array($pet));
  40.                 //$salida2 = $salida->GetDetalleSocioResult;
  41.                 print_r($salida->return);
  42.                 //$salida->GetResult->Version
  43.             }
  44.             catch(Exception $e){
  45.                 echo $e->getMessage();
  46.             }
  47.            
  48.        
  49.             die;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement