Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
<!DOCTYPE html>
<html> 
<body>
<h1>DK Superthin client software!</h1>     
<h2>Hello php</h2> 
<?php
error_reporting(E_ALL);     
 echo "Before";         
$client = new SoapClient('C:\temp\wsdl.txt' ,array("soap_version" => SOAP_1_2, "trace" => 1, "cache_wsdl" => WSDL_CACHE_NONE));     
$BS = array(
				"Username"=>"userX", 
				"Password"=>"passwordY",	
			);
$member = array(
				  "Name"=>"",
				  "SSNumber"=>"", 
				);
$Header = new SoapHeader("urn:dkWSValueObjects","BasicSecurity", $BS, false);            
$client->__setSoapHeaders($Header);      

try{	

     $comp = $client->GetCompany();     
	 
	 $member = $client->getMember("0801882779SOMEID",null); 	 	 
	 //echo $client->__getLastRequest();   
	 echo $member->Name;
	 echo $member->SSNumber; 	 				 			 
   }
	catch (SoapFault $exception) {
	echo $exception;      
}			  

echo "After";
?>           
</body>
</html>  

...