简体   繁体   English

SOAP错误:Encondig

[英]SOAP-ERROR: Encondig

I've created a object and added it to a array: $array_propriedades[] 我创建了一个对象并将其添加到数组中: $array_propriedades[]

            $prop = new PropriedadesSoap();
            $prop->PROPRIEDADE = 'FORMA_ARMACAO';
            $prop->VALOR = $this->input->post('forma_armacao');
            $array_propriedades[] = $prop;

And another object, that will be sent to the service like this: Notice I'm sending the $array_propriedades on $x->PROPRIEDADES 另一个对象将像这样发送到服务:注意,我正在$x->PROPRIEDADES上发送$array_propriedades $x->PROPRIEDADES

$x = new PropriedadesSoap();
    $x->ID_CLIENTE = $this->session->userdata('usuario')->ID;
    $x->NOME_PRODUTO = $this->input->post('produto');
    $x->OS = $this->input->post('os');
    $x->PROPRIEDADES = $array_propriedades;
    $x->FK_TIPO_PRODUTO = (int)$this->session->userdata('tipo_produto');
    $x->SEU_NOME = strtoupper($this->input->post('nome'));

$pedido = new SoapClient(VendaSO, array("exceptions"=>1));
$res = $pedido->SalvarPedido($x);

I have a class PropriedadesSoap() with nothing inside so I can put everything I want, it was working without the FORMA_ARMACAO property but now I get this error: 我有一个PropriedadesSoap()类,里面什么也没有,所以我可以放所有想要的东西,它没有FORMA_ARMACAO属性就可以工作,但是现在出现了这个错误:

SOAP-ERROR: Encoding: object has no 'FORMA_ARMACAO' property

I have no idea of what to do. 我不知道该怎么办。 I've read a article that the user used $pedido->__getTypes() and it worked, not for me, unfortunately. 我读过一篇用户使用$ pedido-> __ getTypes()的文章,不幸的是,它对我不起作用。

Any help? 有什么帮助吗? Thanks in advance 提前致谢

I'm sorry friends, the problem was happening on the service, the programmer forgot to add some parameters and that is why PHP wasn't able to encode the property. 朋友,对不起,服务中发生了问题,程序员忘记了添加一些参数,这就是为什么PHP无法对该属性进行编码。

Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM