首页 > 开发 > PHP > 正文

php soap 调用获取返回信息

2024-05-04 21:58:22
字体:
来源:转载
供稿:网友

php soap 调用获取返回信息,trace soap message,获取 soap返回信息,代码如下:

  1. <?php 
  2.    $ws = "http://www.Vevb.com/sd/2001/temperatureservice.wsdl"
  3.    $zipcode = "23590"
  4.    $client = new soapclient($ws,array('trace' => 1)); 
  5.    $temperature = $client->gettemp($zipcode); 
  6.    echo htmlspecialchars($client->__getlastrequest()); 
  7. ?> 

得到函数原型从wsd,代码如下:

  1. <?php 
  2.    $ws = "http://www.www.Vevb.com/sd/2001/temperatureservice.wsdl"
  3.    $client = new soapclient($ws); 
  4.    var_dump($client->__getfunctions()); 
  5. ?> 
  6.  
  7. <?php 
  8.    $ws = "http://www.Vevb.com/sd/2001/temperatureservice.wsdl"
  9.    $zipcode = "12312"
  10.    $client = new soapclient($ws,array('trace' => 1)); 
  11.    $temperature = $client->gettemp($zipcode); 
  12.    echo htmlspecialchars($client->__getlastresponse()); 
  13. ?> 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表