Page Nav

HIDE
{fbt_classic_header}

Terbaru :

latest

Contoh Memanggil dan Menggunakan Webservice ASP.NET dengan Kode PHP

Beberapa contoh kode php untuk memanggil web service ASP.NET (.asmx). <?php /* //1. ####################### StatusPgw ############...


Beberapa contoh kode php untuk memanggil web service ASP.NET (.asmx).

<?php
/*
//1. ####################### StatusPgw ####################################
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

// //fill params
$object = new stdClass();
$object->NPP = "06852";

//print_r($client->StatusPgw($object)->StatusPgwResult);
$statusPegawai = $client->StatusPgw($object)->StatusPgwResult;
//echo "<pre>"; print_r($statusPegawai); print "</pre><br>";
echo $statusPegawai;

/*//2. ####################### IsPasswordOK  ##############################

//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->Username = "06852";
$object->Password = "jasmineprada";

$CekPassword = $client->IsPasswordOK($object)->IsPasswordOKResult;
echo $CekPassword;*/


/*//3. ####################### GetEmail  ##################################

//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->NPP = "06852";

$TheEmailIs = $client->GetEmail($object)->GetEmailResult;
echo $TheEmailIs;*/

/*//4. ####################### NoHP_OK  #################################
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->NPP = "06852";
$object->NoHP = "08126910299 ";

$isNoHPOK = $client->NoHP_OK($object)->NoHP_OKResult;
echo $isNoHPOK;*/

/*//5. ####################### GetKdUnit  #################################
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->NPP = "06852";

$KdUnitIs = $client->GetKdUnit($object)->GetKdUnitResult;
echo $KdUnitIs;
*/
/*//6. ####################### SMS_Status  ################################
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->NPP = "06852";

$SMSStatIs = $client->SMS_Status($object)->SMS_StatusResult;
echo $SMSStatIs;*/


/*//7. ####################### GetNamaPgw  ###############################
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->NPP = "06852";

$NamaPgwIs = $client->GetNamaPgw($object)->GetNamaPgwResult;
echo $NamaPgwIs;*/

/*//8. ####################### GetPrivelege  ###############################
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->NPP = "06852";

$PrivelegeIs = $client->GetPrivelege($object)->GetPrivelegeResult;
echo $PrivelegeIs;*/

/*//9. ####################### IsRegistered XX ############################
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->NoHP = "08126910299 ";

$CekHPReg = $client->IsRegistered($object)->IsRegisteredResult;
echo $CekHPReg;*/

/*//10. ##################### GetSMSActivationCode #######################
//turn off WSDP caching if not in a production environment
$ini = ini_set("soap.wsdl_cache_enabled","0");

//instantiate the SOAP client
$client=new SoapClient("http://192.168.10.60/wspusataplikasi/wshris.asmx?WSDL");

$object = new stdClass();
$object->NPP = "06852";

$KdAktivasiSMS = $client->GetSMSActivationCode($object)->GetSMSActivationCodeResult;
echo $KdAktivasiSMS;
*/
?>

Tidak ada komentar