1

API server requires to specify a type of the passed value

<anyType xsi:type="xsd:string">vvvvvvvvv</anyType>

But soapclient generates request without xsi:type="xsd:string"

<anyType >vvvvvvvvv</anyType>

How can I make soapclient to add xsi:type="xsd:string" to the request?

4

1 回答 1

1

有很棒的选择http://www.php.net/manual/en/soapvar.soapvar.php。我做了类似的东西

    foreach($values as $v)
    {
        $datafields_set['Values'][] = new SoapVar($v, XSD_STRING, "string", "http://www.w3.org/2001/XMLSchema");
    }

工作正常

于 2013-09-28T21:14:58.740 回答