易截截图软件、单文件、免安装、纯绿色、仅160KB

关于 php webservice 的问题 - PHP / 基础编程

对php不是很了解 写了个简单的例子
现用c#调用php写的 webservice(soap WSDL)iis6.0+php5.2.8

webservice如下
<?php
class WebService
{
  public function Logout()
  {
//header('Content-type: text/xml;');
return array("LogoutResult"=>array("1"));
  }
}
$server = new SoapServer("WebService.wsdl");
$server->setClass("WebService");
$server->handle();
?>
c#如下

  WebService ws = new WebService();
  return dws.Logout();

错误
客户端发现响应内容类型为“text/html”,但应为“text/xml”。
请求失败,错误信息为:
--
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://sunity.org/"><SOAP-ENV:Body><ns1:LogoutResponse><ns1:LogoutResult><ns1:anyType>1</ns1:anyType></ns1:LogoutResult></ns1:LogoutResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>


这种情况有见过的吗?
改写成这样
  public function Logout()
  {
header('Content-type: text/xml;');
return array("LogoutResult"=>array("1"));
  }
也没用
不是该如何修改响应头
iis中自定义HTTP头也不对
错误:客户端发现响应


相关问答:

php中file_get_contents问题

$a = $_FILES['userfile']['name'] ;

$test = $a;

$p = split('/',$test);

$p[count($p)-1];

$content = file_get_contents("$p");

$con ......

如何学习php webservice?

刚接触这个东西,想问一下各位高手实践这个需要哪些工具(我用的linux,dreamweaver)?具体怎么实现?求一个简单完整的例子
网上搜索nusoap
去“w3学校”学下xml

不过网上比较难找那种完整的例子,只有简 ......

php webservice报错Object id #2啦!

webclient.php文件:
<?php
$arrOptions = array( 'uri'=>'http://10.10.19.111/','location'=>'http://10.10.19.111/webservice/webservice.php','trace' ......

【深圳】胜行软件招PHP程序员3-5名(加急)

招聘
公司名称 胜行软件(深圳)有限公司
职位名称 PHP程序员
招聘人数 3-5
工作地点 深圳市龙岗区横岗四联新亚洲广场新秀苑B2-201
薪水待遇 4k-10k
职位描述 主要负责对日外包项目的设计,编码和 ......

php代码解释

this->$name=$nam;
这句代码是什么意思啊?
其中->又是什么意思呢、
谢谢高手指点!
对象->属性=变量

不过你好像写错了....

$this->num=$num; 这样的吧

$this->num=$num; ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号