Edit report at https://bugs.php.net/bug.php?id=47924&edit=1

 ID:                 47924
 Comment by:         philipp at kolmann dot at
 Reported by:        philipp at kolmann dot at
 Summary:            Exchange 2007: UpdateItem: Fatal error: SOAP-ERROR:
                     Encoding: object hasn't 'Pat
 Status:             Open
 Type:               Bug
 Package:            SOAP related
 Operating System:   Linux, Debian Sid
 PHP Version:        5.2.9
 Block user comment: N
 Private report:     N

 New Comment:

Hi,

it seems that noone ever cared about this Bug :(

I am still having the same issues with Exchange 2010 and PHP Version 5.3.10-1.

Here is the sample code still not working:

<?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";
$UpdateItem->ItemChanges->ItemChange->Updates->SetItemField->Message->Sensitivity
 = "Normal";
print "<pre>";
print_r($UpdateItem);
$res = $client->UpdateItem($UpdateItem);
echo "REQUEST:\n" . $client->__getLastRequest() . "\n"; 
print_r($res);
print "</pre>";
?>


Is there any hope, that someone might fix this?
Thanks
Philipp


Previous Comments:
------------------------------------------------------------------------
[2009-05-12 08:04:49] philipp at kolmann dot at

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>";
?>

------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=47924&edit=1

Reply via email to