wsdl 中的“任何"是什么,我如何使用 php 调用 wsdl 函数? [英] What is 'any' in wsdl and how i can call a wsdl function using php?

查看:19
本文介绍了wsdl 中的“任何"是什么,我如何使用 php 调用 wsdl 函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这段代码是我 wsdl 的一小部分.这里我没看懂

This code is a small part of my wsdl. Here I haven't understood

<s:sequence>
    <s:any/>
</s:sequence>

请告诉我这是什么

<s:element name="CalculStudents">
    <s:complexType>
        <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="doc">
                <s:complexType mixed="true">
                    <s:sequence>
                        <s:any/>
                    </s:sequence>
                </s:complexType>
            </s:element>
        </s:sequence>
    </s:complexType>
</s:element>

使用php我在下面调用这个函数是我的代码

using php I am calling this function below is my code

 $client = new SoapClient("some.wsdl");
 $params = array("any"=>'');
 $result = $client->CalculStudents(array('doc'=>$params));

但它抛出一个错误

 Exception Error! Server was unable to process 
 request.Object reference not set to an instance of an object.

告诉我如何解决这个问题.这是php调用错误还是wsdl错误?

Tell me how to solve this. Is this a php calling mistake or wsdl is wrong?

推荐答案

在 XML Schema 中,any 元素 是一种指定任何非空元素序列"的方式.

In XML Schema, the any element is a way of specifying "any non-empty sequence of elements at all".

因此,您拥有的 WSDL 是说,此方法可以接受任何数据,并且可以潜在地返回任何数据."这显然完全是假的,与没有 WSDL 相比,您的情况会好一点.此时您唯一的办法就是向 API 供应商大喊大叫,并祈祷您最终获得有用的文档.

So the WSDL you have is saying, "This method can accept any data at all, and can potentially return any data at all." This is obviously completely bogus, and you're little better off than you would have been without a WSDL. Your only recourse at this point is to yell at the API vendor and pray you eventually get useful documentation.

这篇关于wsdl 中的“任何"是什么,我如何使用 php 调用 wsdl 函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆