Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Accessing MAPI properties using EWS & XML

83 views
Skip to first unread message

macca

unread,
Mar 16, 2010, 5:35:39 AM3/16/10
to
Hi,

I'm trying to access the PR_LAST_VERB_EXECUTED MAPI property from
Exchange '07 EWS, this is what I have:

$FindItem->Traversal = "Shallow";
$FindItem->IndexedPageItemView->MaxEntriesReturned = $max;
$FindItem->IndexedPageItemView->Offset = $offset;
$FindItem->IndexedPageItemView->BasePoint = "Beginning";
$FindItem->ItemShape->BaseShape = "AllProperties";

Which translates to

<FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/
messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/
types"
Traversal="Shallow">
<IndexedPageViewItemView MaxEntriesReturned="" Offset=""
BasePoint="" />
<ItemShape>
<t:BaseShape>AllProperties</t:BaseShape>
</ItemShape>


As it is this query works fine. From what I have been able to make out
if I want to access this MAPI property I add theis XML:

<t:AdditionalProperties>
<ExtendedFieldURI PropertyTag="0x10810003" />
</t:AdditionalProperties>

So I added this line to the query:

$FindItem->ItemShape->AdditionalProperties->ExtendedFieldURI-
>PropertyTag = '0x10810003';

However, all I get is this error message:

The request failed schema validation: The element
'AdditionalProperties' in namespace 'http://schemas.microsoft.com/
exchange/services/2006/types' has incomplete content. List of possible
elements expected: 'Path' in namespace 'http://schemas.microsoft.com/
exchange/services/2006/types'.


Can anybody help me?

macca

unread,
Mar 19, 2010, 6:02:25 AM3/19/10
to
anyone?

Leonid S. Knyshov // SBS Expert

unread,
Mar 19, 2010, 6:22:25 AM3/19/10
to

Is that PHP I am detecting here?

I wrote an app last year in PHP against EWS based on sample code
available on the Internet. There are bugs (missing lines) in Microsoft's
WSDL code that cause all kinds of interesting challenges.

I honestly forgot how I did this and all the troubleshooting I went
through when dealing with traversing folder trees, but I have the
working code and could figure out what I did before with sufficient
incentive. :)

My advice? Do this in Visual Studio if you can. Much easier.
--
Leonid S. Knyshov
Crashproof Solutions
510-282-1008
Twitter: @wiseleo
http://crashproofsolutions.com
Microsoft Small Business Specialist
Try Exchange Online http://bit.ly/free-exchange-trial
Please vote "helpful" if I helped you :)

macca

unread,
Mar 22, 2010, 1:03:43 PM3/22/10
to

> I wrote an app last year in PHP against EWS based on sample code
> available on the Internet. There are bugs (missing lines) in Microsoft's
> WSDL code that cause all kinds of interesting challenges.

Yes, I have come up against this before...and got it working by
generating updated WSDL files using simplexml for modifying
ExtendedFieldURI FieldURI etc that problem is with abstract paths. I
cant seem to figure it out for this instance though. Unfortunately.

> I honestly forgot how I did this and all the troubleshooting I went
> through when dealing with traversing folder trees, but I have the
> working code and could figure out what I did before with sufficient
> incentive. :)

Im afraid the only incentive i can possibly offer is my gratitude.

>
> My advice? Do this in Visual Studio if you can. Much easier.

I dont have this option. And even if I did, i would not as I'm a PHP
developer and the application is PHP.


> Leonid S. Knyshov
> Crashproof Solutions
> 510-282-1008

> Twitter: @wiseleohttp://crashproofsolutions.com
> Microsoft Small Business Specialist
> Try Exchange Onlinehttp://bit.ly/free-exchange-trial

Kevin Bull

unread,
Mar 9, 2012, 11:18:44 AM3/9/12
to
I have a very keen interest in working PHP code that interacts with EWS. What kind of incentive would you need to share that code?

> On Tuesday, March 16, 2010 5:35 AM macca wrote:

> Hi,
>
> I am trying to access the PR_LAST_VERB_EXECUTED MAPI property from
> Exchange '07 EWS, this is what I have:
>
> $FindItem->Traversal = "Shallow";
> $FindItem->IndexedPageItemView->MaxEntriesReturned = $max;
> $FindItem->IndexedPageItemView->Offset = $offset;
> $FindItem->IndexedPageItemView->BasePoint = "Beginning";
> $FindItem->ItemShape->BaseShape = "AllProperties";
>
> Which translates to
>
> <FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/
> messages"
> xmlns:t="http://schemas.microsoft.com/exchange/services/2006/
> types"
> Traversal="Shallow">
> <IndexedPageViewItemView MaxEntriesReturned="" Offset=""
> BasePoint="" />
> <ItemShape>
> <t:BaseShape>AllProperties</t:BaseShape>
> </ItemShape>
>
>
> As it is this query works fine. From what I have been able to make out
> if I want to access this MAPI property I add theis XML:
>
> <t:AdditionalProperties>
> <ExtendedFieldURI PropertyTag="0x10810003" />
> </t:AdditionalProperties>
>
> So I added this line to the query:
>
> $FindItem->ItemShape->AdditionalProperties->ExtendedFieldURI-
>
> However, all I get is this error message:
>
> The request failed schema validation: The element
> 'AdditionalProperties' in namespace 'http://schemas.microsoft.com/
> exchange/services/2006/types' has incomplete content. List of possible
> elements expected: 'Path' in namespace 'http://schemas.microsoft.com/
> exchange/services/2006/types'.
>
>
> Can anybody help me?


>> On Friday, March 19, 2010 6:02 AM macca wrote:

>> anyone?
>>>> On Monday, March 22, 2010 1:03 PM macca wrote:

>>>> Yes, I have come up against this before...and got it working by
>>>> generating updated WSDL files using simplexml for modifying
>>>> ExtendedFieldURI FieldURI etc that problem is with abstract paths. I
>>>> cant seem to figure it out for this instance though. Unfortunately.
>>>>
>>>>
>>>> Im afraid the only incentive i can possibly offer is my gratitude.
>>>>
>>>>
>>>> I dont have this option. And even if I did, i would not as I am a PHP
0 new messages