ID: 44265 Updated by: [EMAIL PROTECTED] Reported By: gdk-spam at yes-co dot nl -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Debian r4.0 PHP Version: 5.2.5 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2008-10-08 08:02:56] benprim at gmail dot com I had the same issue when i change my WSDL from RPC/Encoded to document literal. But i think the problem comes from the former way i Use to return my results. My Response message looks something like this <xsd:element name="UpdateUserResponseParams"> <xsd:complexType> <xsd:sequence> <xsd:element name="ReturnValue" type="boolean"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> So i had to change my server code from function updateUser($user){ // Internal Code return $value; } to function updateUser($user){ // Internal Code return array("ReturnValue" => $value); } So I think your server client should be changed to public function GetKadastraalBericht($request) { $response = new StdClass(); return array("Letter" => $response->Letter,"Volgnummer" =>$response->Volgnummer); } ------------------------------------------------------------------------ [2008-02-27 13:54:34] gdk-spam at yes-co dot nl Description: ------------ The PHP SOAP server incorrectly reports an SOAP-ERROR when the SOAP response is returned in WSDL mode. The error indicates an optional property is missing. The property is defined within a XML Schema sequence which has its 'minOccurs' attribute set to '0', which should make the properties optional. The WSDL validates correctly against WS-I Basic Profile 1.1 + SOAP Binding Profile 1.0 checks using Mindreef SOAPscope. We recently upgraded from PHP 5.1.4 to PHP 5.2.4 (ZendCore package). We are unable to reproduce this error in 5.1.4. We've stripped down the Webservice and request/response, the production code is ofcourse much more complicated. If you uncomment the 'Letter' and 'Volgnummer' properties the SOAP response is returned without a problem Reproduce code: --------------- WSDL: http://devel.yes-co.com/zendbugs/ws_kadaster.wsdl SOAP Server: http://devel.yes-co.com/zendbugs/ws_kadaster.phps SOAP Client: http://devel.yes-co.com/zendbugs/ws_kadaster_client.phps Expected result: ---------------- ws_kadaster_client.php output: stdClass Object ( ) Actual result: -------------- ws_kadaster_client.php output: SoapFault Object ( [message:protected] => SOAP-ERROR: Encoding: object hasn't 'Letter' property [string:private] => [code:protected] => 0 [file:protected] => /vol/vol0/home/geoffrey/public_html/ws_kadaster_client.php [line:protected] => 11 [trace:private] => Array ( [0] => Array ( [function] => __call [class] => SoapClient [type] => -> [args] => Array ( [0] => GetKadastraalBericht [1] => Array ( [0] => stdClass Object ( ) ) ) ) [1] => Array ( [file] => /vol/vol0/home/geoffrey/public_html/ws_kadaster_client.php [line] => 11 [function] => GetKadastraalBericht [class] => SoapClient [type] => -> [args] => Array ( [0] => stdClass Object ( ) ) ) ) [faultstring] => SOAP-ERROR: Encoding: object hasn't 'Letter' property [faultcode] => SOAP-ENV:Server ) <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://webservice.yes-co.nl/ws_kadaster"><SOAP-ENV:Body><ns1:GetKadastraalBerichtRequest/></SOAP-ENV:Body></SOAP-ENV:Envelope> <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>SOAP-ERROR: Encoding: object hasn't 'Letter' property</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44265&edit=1