|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-01-09 03:29 UTC] ville at pmd dot fi
Description: ------------ SoapServer raises an 'Object hasn't xxx property' error when trying to return an object (WSDL complextype) from service class. Different methods of returning an object (array, PHP object, SoapVar with SOAP_ENC_OBJECT attribute...) ends up to the same result. The bug is similar to an already fixed bug #30928 Reproduce code: --------------- http://ville.mattila.fi/php/soaptestservice.phps http://ville.mattila.fi/php/wsdl/complextypetest.wsdl Expected result: ---------------- At the client side: a returned object with firstName and lastName elements filled with lowercase and uppercase versions of given authToken. Actual result: -------------- At the client side: SOAP-ERROR: Encoding: object hasn't 'firstName' property PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Fix your server code: class testService { public function authUser($authToken) { return array( 'firstName' => strtolower($authToken), 'lastName' => strtoupper($authToken) ); } } class testService2 { public function authUser($authToken) { $r = new objUserDetails(); $r->firstName = strtolower($authToken); $r->lastName = strtoupper($authToken); return $r; } }