|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 14:00:01 2025 UTC |
Description: ------------ The SoapClient class generates a different request message with cache WSDL_CACHE_BOTH if the SoapClient is called for the first times (and sometimes after). This script runs flawless when cache_wsdl => WSDL_CACHE_MEMORY or cache_wsdl => WSDL_CACHE_DISK is used. I checked the cache file on disk, this file is the same for option cache_wsdl=>WSDL_CACHE_DISK and cache_wsdl=>WSDL_CACHE_BOTH If required, I could provide additional information such as the WSDL file. (I removed the xml inside the <item> tag for readability) Test script: --------------- $soap_client = new \SoapClient($file, array('trace' => true, 'use' => SOAP_ENCODED, 'soap_version' => SOAP_1_1, 'features' => SOAP_USE_XSI_ARRAY_TYPE, 'cache_wsdl' => WSDL_CACHE_BOTH)); $result = $this->client->getabtariefgroep($this->wsUsername, $this->wsPassword, array($request_array)); echo $soap_client->__getLastRequest(); Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:enra:abverzaanvraag:abverzaanvraag" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getabtariefgroep><pcServiceId xsi:type="xsd:string">xxx</pcServiceId><pcWachtwoord xsi:type="xsd:string">xxx</pcWachtwoord><ttWsAanvraag SOAP-ENC:arrayType="ns1:getabtariefgroep_ttWsAanvraagRow[1]" xsi:type="ns1:ArrayOfgetabtariefgroep_ttWsAanvraagRow"><item xsi:type="ns1:getabtariefgroep_ttWsAanvraagRow">........</item></ttWsAanvraag></ns1:getabtariefgroep></SOAP-ENV:Body></SOAP-ENV:Envelope> Actual result: -------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:enra:abverzaanvraag:abverzaanvraag" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getabtariefgroep><pcServiceId xsi:type="xsd:string">xxx</pcServiceId><pcWachtwoord xsi:type="xsd:string">xxx</pcWachtwoord><ttWsAanvraag SOAP-ENC:arrayType="SOAP-ENC:Struct[1]" xsi:type="ns1:ArrayOfgetabtariefgroep_ttWsAanvraagRow"><item xsi:type="SOAP-ENC:Struct">.........</item></ttWsAanvraag></ns1:getabtariefgroep></SOAP-ENV:Body></SOAP-ENV:Envelope>