SOAP简单例子

阅读更多

soap_client.php

div(10, 2); // will cause a Soap Fault if divide by zero
    print "The answer is: $result";
  } catch(SoapFault $e) {
    print "Sorry an error was caught executing your request: {$e->getMessage()}";
  }

?>

 

soap_server.php

 SOAP_1_2));
$server->setClass("math");
$server->handle();
  
?>
 

math.wsdl (可以通过zend studio生成)






	
		
		
	
	
		
	
	
		
		
	
	
		
	
	
		
			A simple math utility class
		
		
			
				Add two integers together
			
			
			
		
		
			
				Div two integers from each other
			
			
			
		
	
	
		
		
			
			
				
			
			
				
			
		
		
			
			
				
			
			
				
			
		
	
	
		
			
		
	
 

 

 

 

 

 

你可能感兴趣的:(SOAP,PHP,Zend,XML)