dongliao2241 2012-08-23 01:32
浏览 50

访问使用php zend-soap创建的Web服务时出错

I am trying to use InfoPath forms with PHP. That's why, I created a web service with help of tutorials using zend framework soap library.

require("Zend/Soap/Server.php");
require("Zend/Soap/Wsdl.php");
require("Zend/Soap/Wsdl/Strategy/ArrayOfTypeComplex.php");
require("Zend/Soap/AutoDiscover.php");


$serviceURL = 'http://localhost/zendwebservice/';

class MyService {

    function GetCoupons($UserID) {
        // do some work here

    }
}

// Generate WSDL relevant to code
if (isset($_GET['wsdl']) || isset($_GET['WSDL'])){
    $autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
    $autodiscover->setClass('MyService');
    $autodiscover->handle();
} else {
    $server = new Zend_Soap_Server($serviceURL . "?WSDL");
    $server->setClass('MyService');
    $server->setObject(new MyService());
    $server->handle();
}

Then, I tried to web service using infopath data connection wizard and I get these errors

InfoPath cannot find and cannot access the specified Web service description.

Details:
SoapMapper:The SoapMapper for element Array could not be created.
 - WSDLOperation:Initialization of a SoapMapper for operation GetCoupons failed. 
 - WSDLOperation:Initializing of the output message failed for operation GetCoupons. 
 - WSDLPort:An operation for port MyServicePort could not be initialized.
 - WSDLPort:Analyzing the binding information for port MyServicePort failed. 
 - WSDLService:Initialization of the port for service MyServiceService failed. 
 - WSDLReader:Analyzing the WSDL file failed. 

Because I am new at web service, I couldn't figure out. Thanks for all help.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 自己瞎改改,结果现在又运行不了了
    • ¥15 链式存储应该如何解决
    • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站