gpt4 book ai didi

php - 如何为 xsd :anyType 创建 soapvar 对象

转载 作者:可可西里 更新时间:2023-10-31 22:46:47 25 4
gpt4 key购买 nike

谁能解释一下如何在 php 中使用 soapvar 为 anytype 参数分配类型?

  <complexType name="Entry">
<sequence>
<element name="key" nillable="true" type="xsd:anyType" minOccurs="0" />
<element name="value" nillable="true" type="xsd:anyType" minOccurs="0" />
</sequence>
</complexType>

例如:

$arr=array('key'=>new SoapVar('EMAIL_ADDRESS',SOAP_ENC_OBJECT,'xsd:anyType'),'value'=>new SoapVar('xxxx@gmail.com',SOAP_ENC_OBJECT,'xsd:anyType'));

当在 yodlee sdk 的 soapclient 中为注册用户传递上述用户配置文件数组时,它返回“未知”异常。

最佳答案

嗨,我终于发现了我的问题,它是基于命名空间 url 的问题,我使用了这个

$arr=array('key'=>new SoapVar('EMAIL_ADDRESS',XSD_ANYTYPE,'string','http://www.w3.org/2001/XMLSchema','key'),'value'=>new SoapVar('xxxx@gmail.com',XSD_ANYTYPE,'string','http://www.w3.org/2001/XMLSchema','value')); 

感谢大家从yodlee服务器得到解决方案

关于php - 如何为 xsd :anyType 创建 soapvar 对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8832898/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com