SOAP 错误:编码:对象没有“请求者”;财产

发布于 2024-12-17 10:22:48 字数 2312 浏览 1 评论 0原文

我尝试使用 Lotus Domino V7 Free Time Web 服务。

我编写了这个:

<?php
    $soap = new SoapClient('http://foo.com/cppfbws.nsf/busytimelookup?WSDL');

    print_r( $soap->__getFunctions() ); //Array ( [0] => RESPONSESTRUCTURE LOOKUP(REQUESTSTRUCTURE $REQUEST) ) 

    $soap->lookup(array(''), array('Bob'), array(''), '2007-02-26 00:01', '2012-02-26 23:59');

    //or

    $soap->__soapCall('lookup', array(array(''), array('Bob'), array(''), '2007-02-26 00:01', '2012-02-26 23:59'));
?>

结果:

Fatal error: SOAP-ERROR: Encoding: object has no 'REQUESTORS' property

你有什么想法吗?


仅我拥有的文档:

cppfbws.nsf/busytimelookup?WSDL

<wsdl:portType name="busytime">
    <wsdl:operation name="LOOKUP" parameterOrder="REQUEST">
        <wsdl:input message="impl:LOOKUPRequest" name="LOOKUPRequest"/>
        <wsdl:output message="impl:LOOKUPResponse" name="LOOKUPResponse"/>
    </wsdl:operation>
</wsdl:portType>

<wsdl:message name="LOOKUPResponse">
    <wsdl:part name="LOOKUPReturn" type="impl:RESPONSESTRUCTURE"/>
</wsdl:message>
<wsdl:message name="LOOKUPRequest">
    <wsdl:part name="REQUEST" type="impl:REQUESTSTRUCTURE"/>
</wsdl:message>

<complexType name="REQUESTSTRUCTURE">
    <sequence>
        <element name="REQUESTORS" type="impl:ArrayOf_xsd_string"/>
        <element name="ATTENDEES" type="impl:ArrayOf_xsd_string"/>
        <element name="DETAILS" type="impl:ArrayOf_xsd_string"/>
        <element name="START" type="xsd:string"/>
        <element name="END" type="xsd:string"/>
    </sequence>
</complexType>

还有这个http://www.ibm.com/developerworks/lotus/library/domino7-free-time/

attendees[0]="Peter Pan"; //name of the first person
attendees[1]="Mary Poppins"; //name of the second person        
requestors[0]="";   //Web service does not require this parameter
details[0]="";   //Web service does not require this parameter

I try to use Lotus Domino V7 Free Time Web service.

I code this:

<?php
    $soap = new SoapClient('http://foo.com/cppfbws.nsf/busytimelookup?WSDL');

    print_r( $soap->__getFunctions() ); //Array ( [0] => RESPONSESTRUCTURE LOOKUP(REQUESTSTRUCTURE $REQUEST) ) 

    $soap->lookup(array(''), array('Bob'), array(''), '2007-02-26 00:01', '2012-02-26 23:59');

    //or

    $soap->__soapCall('lookup', array(array(''), array('Bob'), array(''), '2007-02-26 00:01', '2012-02-26 23:59'));
?>

Results:

Fatal error: SOAP-ERROR: Encoding: object has no 'REQUESTORS' property

Do you have any idea?


Only documentations that I have:

cppfbws.nsf/busytimelookup?WSDL:

<wsdl:portType name="busytime">
    <wsdl:operation name="LOOKUP" parameterOrder="REQUEST">
        <wsdl:input message="impl:LOOKUPRequest" name="LOOKUPRequest"/>
        <wsdl:output message="impl:LOOKUPResponse" name="LOOKUPResponse"/>
    </wsdl:operation>
</wsdl:portType>

<wsdl:message name="LOOKUPResponse">
    <wsdl:part name="LOOKUPReturn" type="impl:RESPONSESTRUCTURE"/>
</wsdl:message>
<wsdl:message name="LOOKUPRequest">
    <wsdl:part name="REQUEST" type="impl:REQUESTSTRUCTURE"/>
</wsdl:message>

<complexType name="REQUESTSTRUCTURE">
    <sequence>
        <element name="REQUESTORS" type="impl:ArrayOf_xsd_string"/>
        <element name="ATTENDEES" type="impl:ArrayOf_xsd_string"/>
        <element name="DETAILS" type="impl:ArrayOf_xsd_string"/>
        <element name="START" type="xsd:string"/>
        <element name="END" type="xsd:string"/>
    </sequence>
</complexType>

And this http://www.ibm.com/developerworks/lotus/library/domino7-free-time/:

attendees[0]="Peter Pan"; //name of the first person
attendees[1]="Mary Poppins"; //name of the second person        
requestors[0]="";   //Web service does not require this parameter
details[0]="";   //Web service does not require this parameter

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苯莒 2024-12-24 10:22:48

只是请求格式和区分大小写的问题。

我的最终代码:

<?php

    $soap = new SoapClient('http://foo.com/cppfbws.nsf/busytimelookup?WSDL', array('login' => 'root', 'password' => 'root'));

    $request = array('REQUESTORS' => array(''), 'ATTENDEES' => array('root'), 'DETAILS' => array(''), 'START' => '2011-11-30 01:00', 'END' => '2011-12-30 18:00');

    $result = $soap->lookup($request);

    $i = 0;

    foreach ($result->ATTENDEES as $r) {
        echo 'User : '.$r->ATTENDEE.'<br/><br/>';
        foreach ($r->BUSY as $b) {
            echo 'Busy interval #'.$i++.'<br/>';
            echo 'Start : '.$b->START.'<br/>';
            echo 'End : '.$b->END.'<br/><br/>';
        }
    }

?>

Just a problem of request format and case sensitivity.

My final code:

<?php

    $soap = new SoapClient('http://foo.com/cppfbws.nsf/busytimelookup?WSDL', array('login' => 'root', 'password' => 'root'));

    $request = array('REQUESTORS' => array(''), 'ATTENDEES' => array('root'), 'DETAILS' => array(''), 'START' => '2011-11-30 01:00', 'END' => '2011-12-30 18:00');

    $result = $soap->lookup($request);

    $i = 0;

    foreach ($result->ATTENDEES as $r) {
        echo 'User : '.$r->ATTENDEE.'<br/><br/>';
        foreach ($r->BUSY as $b) {
            echo 'Busy interval #'.$i++.'<br/>';
            echo 'Start : '.$b->START.'<br/>';
            echo 'End : '.$b->END.'<br/><br/>';
        }
    }

?>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文