Using PHP SoapClient, I make a WSDL call at https://webservices-test.ede.de:9443/ibis/ws/WS_EXT_ELC?wsdl and I get the following xml response (as indicated by $soapclient->__last_response )
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:ede="http://ede.de/webservices" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><Response action="ELC" requestId="1" version="1.0"><created>2017-09-04T16:04:46.556+02:00</created><StatusInformation>OK</StatusInformation><StatusCode>0</StatusCode><Payload><SalesOrderSimulateConfirmation><Items><Item><ID>10</ID><ProductID>0003062700050</ProductID><Price>2.970</Price><PositionPrice>2.970</PositionPrice><PriceUnit>1</PriceUnit><QuantityUnit>ST</QuantityUnit><QuantityAvailable>1</QuantityAvailable><QuantityProfile>1</QuantityProfile><Currency>EUR</Currency><Services /><Schedules>Geplante Liefertermine: 1 ST in KW 36.2017;</Schedules><Remark /><DangerMaterial /></Item></Items></SalesOrderSimulateConfirmation></Payload></Response></soap:Body></soap:Envelope>
However, calling $soapclient->simulateOrder() returns null .
How to force PHP SoapClient to return an object instead of null?
Note. The xml that I use to call the soap is manually generated by overriding on SoapClient::__doRequest() . The code for calling the soap is as follows:
$soapClient = new SoapClient('https://webservices-test.ede.de:9443/ibis/ws/WS_EXT_ELC?wsdl', array( 'cache_wsdl' => WSDL_CACHE_NONE, 'trace' => true, 'exceptions' => true, 'soap_version' => SOAP_1_2, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, 'login' => '------', // cannot post here for security purposes 'password' => '-----', // cannot post here for security purposes 'stream_context' => ( stream_context_create(array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) )) )); $result = $soapClient->simulateOrder();
An exception is not thrown, but $result is null
wsdl php soap-client
Yirmiyahu fischer
source share