119
Written by xlingfairy
Saturday, 06 February 2010 12:32
先说说我前面遇到的挫折:
复杂类型 与 数组.
这个问题困扰我好几天了, C# 写的 client 在请求SOAP方法之后,报错:
soap 未识别指定的类型: name='struct'
这个 struct 可能是其它的,你在PHP里定义的类.
解决办法是,指定 style 为 literal , 默认的为: encoded , 参见:
http://framework.zend.com/manual/en/zend.soap.autodiscovery.html
这个页面最下面的代码框里有写.
Last Updated ( Saturday, 06 February 2010 12:42 )
94
Written by xlingfairy
Saturday, 06 February 2010 10:52
还是同样的代码在本地(windows)返回的是正常的. 但是在服务器上却返回:
Procedure 'xxx' not present
查了一下GOOGLE,在2007年的时候,有人报告过这个 BUG:
http://bugs.php.net/bug.php?id=42086
但是都快3年了,这个BUG应该早以修复了吧( windows 本地 执行没有这个错误).
最后找到一个解决办法:
http://www.anty.info/2008/09/01/soap-procedure-foo-not-present/
ini_set("soap.wsdl_cache_enabled", "0");
$soap = new Zend_Soap_Server ( URL . "/?wsdl"); // this current file here
$soap->setClass ( 'Joomla_User' );
$soap->handle ();
问题解决.