|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-10-03 21:48 UTC] ksmiley at salesforce dot com
Description:
------------
When a WSDL declares a complex type with an "any" element and the SOAP response includes multiple fields that will all be placed under the generic "any" element, if one of the response fields is another complex type, it will overwrite the other fields.
Test script:
---------------
Will link to a pull request with a test case after submitting this.
Expected result:
----------------
["any"]=>
array(2) {
[0]=>
string(175) "<sf:CampaignId>701i0000001lreeAAA</sf:CampaignId><sf:Status>Sent</sf:Status><sf:ContactId xsi:nil="true"/><sf:LeadId>1UrbYFEAZ</sf:LeadId><sf:Contact xsi:nil="true"/>"
["Lead"]=>
object(stdClass)#5 (3) {
["type"]=>
string(4) "Lead"
["Id"]=>
NULL
["any"]=>
string(44) "<sf:Email>angela.lansbury@cbs.com</sf:Email>"
}
}
Actual result:
--------------
["any"]=>
array(2) {
[0]=>
object(stdClass)#5 (3) {
["type"]=>
string(4) "Lead"
["Id"]=>
NULL
["any"]=>
string(44) "<sf:Email>angela.lansbury@cbs.com</sf:Email>"
}
["Lead"]=>
object(stdClass)#5 (3) {
["type"]=>
string(4) "Lead"
["Id"]=>
NULL
["any"]=>
string(44) "<sf:Email>angela.lansbury@cbs.com</sf:Email>"
}
}
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
I have a problem that can be similar. PHP version 5.6 SOAP communication was occurring correctly, but when upgrading to version 7.0.11, the operation became incorrect. Below the section of code that runs on PHP 5 but does not work in php 7. protected function zSendSOAP($urlService, $dataArray, $operaration) { ini_set("soap.wsdl_cache_enabled", "0"); $options = array( 'location' => $urlService, 'uri' => 'http://schemas.xmlsoap.org/soap/envelope/', 'local_cert' => $this->certKEY, 'soap_version' => SOAP_1_2, 'cache_wsdl' => WSDL_CACHE_NONE, 'connection_timeout' => 15, 'encoding' => 'UTF-8', 'trace' => 1, 'exceptions' => 1 ); $urlWsdl = $urlService . '?wsdl'; $soap = new SoapClient($urlWsdl, $options); $obterOperacaoTransportePdf = array( 'ObterOperacaoTransportePdfRequest' => array( 'Integrador' => '761ba43d-dc74-4900-85bf-70853fcae4a9', 'Versao' => '1', 'CodigoIdentificacaoOperacao' => '161000003705/1660', 'DocumentoViagem' => '' ) ); $data = $soap->$operaration($obterOperacaoTransportePdf); return $data; } On the server that receives the data, the key "Integrator" is not being received, and possibly other data is also not being received. The strange thing is that this code works seamlessly with PHP 5.6.