Chinaunix首页 | 论坛 | 博客
  • 博客访问: 242794
  • 博文数量: 76
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 745
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-28 16:04
文章分类

全部博文(76)

文章存档

2013年(2)

2010年(21)

2009年(53)

我的朋友

分类:

2009-10-28 16:08:23

[CODE:]client.php

  $client = new SoapClient("stockquote.wsdl");
  print(
$client->getQuote("ibm"));
?> 

[CODE:]server.php

$quotes = array(
  
"ibm" => 98.42888
);  

function 
getQuote($symbol) {
  global 
$quotes;
  return 
$quotes[$symbol];
}

ini_set("soap.wsdl_cache_enabled""0"); // disabling WSDL cache
$server = new SoapServer("stockquote.wsdl");
$server->addFunction("getQuote");
$server->handle();
?>

[CODE:]stockquote.wsdl

='1.0' encoding ='UTF-8' ?>
  targetNamespace=''
  xmlns:tns='  '
  xmlns:soap=''
  xmlns:xsd=''
  xmlns:soapenc=''
  xmlns:wsdl=''
  xmlns=''>


  


  



  
    
    
  



       transport=''/>
  
    
    
               encodingStyle=''/>
    
    
               encodingStyle=''/>
    

  



  
    
  

阅读(407) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:XMLRPC的使用(PHP自带)

给主人留下些什么吧!~~