ID: 47924 User updated by: philipp at kolmann dot at Reported By: philipp at kolmann dot at -Status: Feedback +Status: Open Bug Type: SOAP related Operating System: Linux, Debian Sid PHP Version: 5.2.9 New Comment:
This sample will give you the error described in the Bugreport. You will need the Services.wsdl, messages.xsd and types.xsd from an Exchange 2007 Server. With our Exchange I was able to trigger the error with this script. <?php // Create SOAP Client $client = new SoapClient('Services.wsdl', array('exceptions' => 0, 'trace' => 1, 'login' => "DOMAIN\\user", 'password' => "PASSWORD" )); // Update found item $UpdateItem->MessageDisposition ="SaveOnly"; $UpdateItem->ConflictResolution="AutoResolve"; $UpdateItem->ItemChanges->ItemChange->ItemId->Id = "ItemID from FindItem"; $UpdateItem->ItemChanges->ItemChange->ItemId->ChangeKey = "ChangeKey from FindItem"; $UpdateItem->ItemChanges->ItemChange->Updates->SetItemField = "item:Sensitivity"; print "<pre>"; print_r($UpdateItem); $res = $client->UpdateItem($UpdateItem); echo "REQUEST:\n" . $client->__getLastRequest() . "\n"; print_r($res); print "</pre>"; ?> Previous Comments: ------------------------------------------------------------------------ [2009-05-06 21:45:58] j...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2009-04-08 10:55:11] philipp at kolmann dot at Description: ------------ I am using PHP and SOAP to talk to a Exchange 2007 server. Adding items works without a Problem. Now I wanted to update an Item: The Request looks quite promising, but seems to fail some XML validation. Regarding to the MS Docs (http://msdn.microsoft.com/en-us/library/aa581022.aspx) The Path element is an abstract element that is substituted by FieldURI. This seems not to happen. If needed I can add the wsdl-files. Thanks Philipp Reproduce code: --------------- $UpdateItem->MessageDisposition ="SaveOnly"; $UpdateItem->ConflictResolution="AutoResolve"; $UpdateItem->ItemChanges->ItemChange->ItemId->Id = $item->ItemId->Id; $UpdateItem->ItemChanges->ItemChange->ItemId->ChangeKey = $item->ItemId->ChangeKey; $UpdateItem->ItemChanges->ItemChange->Updates->SetItemField->FieldURI->FieldURI = "item:Sensitivity"; $UpdateItem->ItemChanges->ItemChange->Updates->SetItemField->Message->Sensitivity = "Normal"; $res = $client->UpdateItem($UpdateItem); Expected result: ---------------- Request beeing properly sent to Exchange Server. Actual result: -------------- stdClass Object ( [MessageDisposition] => SaveOnly [ConflictResolution] => AutoResolve [ItemChanges] => stdClass Object ( [ItemChange] => stdClass Object ( [ItemId] => stdClass Object ( [Id] => AAAeAHBrb2xtYW5uQGthbGVuZGVyLnR1d2llbi5hYy5hdABGAAAAAACkwH79RYBrRLOe5dwPwABJBwCWSqnpWEwlT7Z+LCzPQIE9AAAAAYXBAABeyHGqwz04TojssSJ14nFUADMmYzOVAAA= [ChangeKey] => DwAAABYAAABeyHGqwz04TojssSJ14nFUADMmZDks ) [Updates] => stdClass Object ( [SetItemField] => stdClass Object ( [FieldURI] => stdClass Object ( [FieldURI] => item:Sensitivity ) [Message] => stdClass Object ( [Sensitivity] => Normal ) ) ) ) ) ) Fatal error: SOAP-ERROR: Encoding: object hasn't 'Path' property in addtermin.php on line 87 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47924&edit=1