如何在Perl中为SOAP :: Lite对象设置一个nillable属性?

时间:2011-09-08 14:03:11

标签: perl soap

我收到以下错误:

Exception: Error code: , messge: com.sun.istack.XMLStreamException2: org.xml.sax.SAXParseException: cvc-elt.3.1: Attribute 'http://www.w3.org/2001/XMLSchema-instance,nil' must not appear on element 'v1:get_list', because the {nillable} property of 'v1:get_list' is false. at ./soap.pl line 42.

这是我的Perl代码:

    my $client = SOAP::Lite
                ->on_fault( \&faultHandler )
                ->uri('http://api.domain.net/')
                ->proxy('https://api.domain.net/MyAPI');

        # Execute             
          $client->get_list();

如何更改/添加nillable属性以及如何?

1 个答案:

答案 0 :(得分:0)

如何更改/添加nillable属性以及如何?

使用SOAP :: Data为get_list或调用创建参数

切换到SOAP :: Simple,它有更好的WSDL支持cpan BERLE/SOAP-Simple-0.00_03.tar.gz