|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-25 16:14 UTC] jani@php.net
[2009-05-03 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 08:00:02 2025 UTC |
Description: ------------ Hello, There seems to be many unsolved occurances of the following bug when trying to establish a SOAP connection to a .NET endpoint: Server was unable to process request. ---> Object reference not set to an instance of an object. I am yet to find a solution - the same application works fine when connected to from a .net platform. Reproduce code: --------------- <?php ini_set('display_errors', 1); ini_set("soap.wsdl_cache_enabled", 0); $params = new stdClass; $params->POS->Source = (object)array('ISOCountry' => 'GB', 'ISOCurrency' => 'GBP'); $params->POS->Source->BookingChannel->CompanyName = (object)array('CompanyShortName' => 'Testing'); $params->AvailRequestSegments->UTSv_AvailRequestSegment->StayDateRange->StartDateWindow = (object)array('EarliestDate' => '2008-04-01'); $params->AvailRequestSegments->UTSv_AvailRequestSegment->StayDateRange->EndDateWindow = (object)array('EarliestDate' => '2008-04-02'); $params->AvailRequestSegments->UTSv_AvailRequestSegment->ConsumerCandidates->ConsumerCandidate->ConsumerCounts->ConsumerCount = (object)array('AgeQualifyingCode' => 'Adult', 'Count' => 2); $params->AvailRequestSegments->UTSv_AvailRequestSegment->TPA_Extensions->SearchCriteria = (object)array('IndustryClassification' => 1); try { $client = new SoapClient( "http://www.testing123.com/AvailabilityService.asmx?WSDL", array('trace' => true) ); $client->SearchSupplierProductTypeAvailability($params); echo $client->__getLastRequestHeaders() . "\r" . $client->__getLastRequest() . "\r\r" . $client->__getLastResponse();; } catch (Exception $e) { echo "Error!<br />"; echo $e -> getMessage (); } ?>