Hello, I try to get a Gid23 from an appointment, using this XML: <GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/ messages"> <ItemShape> <t:BaseShape>IdOnly</t:BaseShape> <t:AdditionalProperties> <t:ExtendedFieldURI PropertySetId="6ED8DA90-450B-101B-98DA-00AA003F1305" PropertyName="Gid23" PropertyType="Binary"/> <!-- first try --> <t:ExtendedFieldURI PropertySetId="6ED8DA90-450B-101B-98DA-00AA003F1305" PropertyId="00030102" PropertyType="Binary"/> <!-- second try --> <t:ExtendedFieldURI PropertySetId="6ED8DA90-450B-101B-98DA-00AA003F1305" PropertyId="30102" PropertyType="Binary"/> <!-- third try --> </t:AdditionalProperties> </ItemShape> The XML is accepted by the Exchange 2007 server (Success response), but the required propertie is not returned, Does anyone have any idea about that ? Thanks, Dom.
If its a custom property that GUID doesn't look right you should be using the PublicStrings GUID 00020329-0000-0000-C000-000000000046 or its easier just to use the DistinguishedPropertySetId eg <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Gid23" PropertyType="Integer"/> You might want to try confirming this using a mapi editor first Cheers Glen "Dom" wrote in message news:1194281609.847677.92590@d55g2000hsg.googlegroups.com... > Hello, > > I try to get a Gid23 from an appointment, using this XML: > > <GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/ > messages"> > <ItemShape> > <t:BaseShape>IdOnly</t:BaseShape> > <t:AdditionalProperties> > <t:ExtendedFieldURI > PropertySetId="6ED8DA90-450B-101B-98DA-00AA003F1305" > PropertyName="Gid23" PropertyType="Binary"/> <!-- first try --> > <t:ExtendedFieldURI > PropertySetId="6ED8DA90-450B-101B-98DA-00AA003F1305" > PropertyId="00030102" PropertyType="Binary"/> <!-- second try --> > <t:ExtendedFieldURI > PropertySetId="6ED8DA90-450B-101B-98DA-00AA003F1305" > PropertyId="30102" PropertyType="Binary"/> <!-- third try --> > </t:AdditionalProperties> > </ItemShape> > > The XML is accepted by the Exchange 2007 server (Success response), > but the required propertie is not returned, > > Does anyone have any idea about that ? > > Thanks, > > Dom. >
Hello Glen, I've tried all this combinations: <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Gid23" PropertyType="Binary"/> <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="cleanglobalobjid" PropertyType="Binary"/> <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="global_objid" PropertyType="Binary"/> <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- C000-000000000046" PropertyName="cleanglobalobjid" PropertyType="Binary"/> <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- C000-000000000046" PropertyName="global_objid" PropertyType="Binary"/> <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- C000-000000000046" PropertyName="Gid23" PropertyType="Binary"/> but the Exchange 2007 Server's bahaviour remains the same: "Success response", but no propertie returned..... Dom.
What does the full xml of your request look like in your previous post you had the shape set to IdOnly you might want to try changing this to Default or AllProperties. Cheers Glen I "Dom" wrote in message news:1194340665.668683.306350@d55g2000hsg.googlegroups.com... > Hello Glen, > > I've tried all this combinations: > > <t:ExtendedFieldURI > DistinguishedPropertySetId="PublicStrings" PropertyName="Gid23" > PropertyType="Binary"/> > <t:ExtendedFieldURI > DistinguishedPropertySetId="PublicStrings" > PropertyName="cleanglobalobjid" PropertyType="Binary"/> > <t:ExtendedFieldURI > DistinguishedPropertySetId="PublicStrings" PropertyName="global_objid" > PropertyType="Binary"/> > <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- > C000-000000000046" PropertyName="cleanglobalobjid" > PropertyType="Binary"/> > <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- > C000-000000000046" PropertyName="global_objid" PropertyType="Binary"/> > <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- > C000-000000000046" PropertyName="Gid23" PropertyType="Binary"/> > > but the Exchange 2007 Server's bahaviour remains the same: "Success > response", but no propertie returned..... > > Dom. >
Here is the full XML of my request: <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/ 2006/types"> <soap:Body> <GetItem xmlns="http://schemas.microsoft.com/exchange/services/ 2006/messages"> <ItemShape> <t:BaseShape>AllProperties</t:BaseShape> <t:AdditionalProperties> <t:ExtendedFieldURI PropertySetId="6ED8DA90-450B-101B-98DA-00AA003F1305" PropertyName="Gid23" PropertyType="Binary"/> <!-- first try --> <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="Gid23" PropertyType="Binary"/> <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="cleanglobalobjid" PropertyType="Binary"/> <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="global_objid" PropertyType="Binary"/> <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- C000-000000000046" PropertyName="cleanglobalobjid" PropertyType="Binary"/> <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- C000-000000000046" PropertyName="global_objid" PropertyType="Binary"/> <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- C000-000000000046" PropertyName="Gid23" PropertyType="Binary"/> </t:AdditionalProperties> </ItemShape> <ItemIds> <t:ItemId Id="AQAbAHRlc3Rkb21AYWxleGNoMjAwADcuYWw2NC5jb20ARgAAA1H9bvIF4HJKp52BLKV2tAYHAPCW3xic6cNDvJShVPo +lQAABEcAAADwlt8YnOnDQ7yUoVT6PpUAAAByqWGc9AAAAA==" ChangeKey="DwAAABYAAADwlt8YnOnDQ7yUoVT6PpUAAHKpYfzx" /> </ItemIds> </GetItem> </soap:Body> </soap:Envelope> Changing the BaseShape propertie to 'Default', 'AllProperties' or 'IdOnly' has no effect on the result. It really seems that there is a matter to get the custom properties with GetItem method..... Dom.
The following works okay for me to retrieve a custom property which is a string <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"><ItemShape><BaseShape xmlns="http://schemas.microsoft.com/exchange/services/2006/types">AllProperties</BaseShape><AdditionalProperties xmlns="http://schemas.microsoft.com/exchange/services/2006/types"><ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="MycustomProp" PropertyType="String" /></AdditionalProperties></ItemShape><ItemIds><ItemId Id="AAAm=" ChangeKey="DwAAACREmDP" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" /></ItemIds></GetItem></soap:Body></soap:Envelope> proxy Code PathToExtendedFieldType epExPath1 = new PathToExtendedFieldType(); epExPath1.DistinguishedPropertySetId = DistinguishedPropertySetType.PublicStrings; epExPath1.DistinguishedPropertySetIdSpecified = true; epExPath1.PropertyName = "MycustomProp"; epExPath1.PropertyType = MapiPropertyTypeType.String; GetItemType giRequest = new GetItemType(); ItemIdType iiItemId = new ItemIdType(); iiItemId.Id = miMailboxItem.ItemId.Id; iiItemId.ChangeKey = miMailboxItem.ItemId.ChangeKey; ItemResponseShapeType giResponseShape = new ItemResponseShapeType(); giResponseShape.BaseShape = DefaultShapeNamesType.AllProperties; giResponseShape.IncludeMimeContent = true; giRequest.ItemShape = giResponseShape; giRequest.ItemShape.AdditionalProperties = new BasePathToElementType[1]; giRequest.ItemShape.AdditionalProperties[0] = epExPath1; giRequest.ItemIds = new ItemIdType[1]; giRequest.ItemIds[0] = iiItemId; giRequest.ItemShape.BaseShape = DefaultShapeNamesType.AllProperties; GetItemResponseType giResponse = esb.GetItem(giRequest); if (giResponse.ResponseMessages.Items[0].ResponseClass == ResponseClassType.Error) { Console.WriteLine("Error Occured"); Console.WriteLine(giResponse.ResponseMessages.Items[0].MessageText); } else { ItemInfoResponseMessageType rmResponseMessage = giResponse.ResponseMessages.Items[0] as ItemInfoResponseMessageType; CalendarItemType ciCalentry = (CalendarItemType)rmResponseMessage.Items.Items[0]; Console.WriteLine(ciCalentry.ExtendedProperty[0].Item.ToString()); } Cheers Glen' "Dom" wrote in message news:1194430303.872206.187400@57g2000hsv.googlegroups.com... > Here is the full XML of my request: > > <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:t="http://schemas.microsoft.com/exchange/services/ > 2006/types"> > <soap:Body> > <GetItem xmlns="http://schemas.microsoft.com/exchange/services/ > 2006/messages"> > <ItemShape> > <t:BaseShape>AllProperties</t:BaseShape> > <t:AdditionalProperties> > <t:ExtendedFieldURI > PropertySetId="6ED8DA90-450B-101B-98DA-00AA003F1305" > PropertyName="Gid23" PropertyType="Binary"/> <!-- first try --> > <t:ExtendedFieldURI > DistinguishedPropertySetId="PublicStrings" PropertyName="Gid23" > PropertyType="Binary"/> > <t:ExtendedFieldURI > DistinguishedPropertySetId="PublicStrings" > PropertyName="cleanglobalobjid" PropertyType="Binary"/> > <t:ExtendedFieldURI > DistinguishedPropertySetId="PublicStrings" PropertyName="global_objid" > PropertyType="Binary"/> > <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- > C000-000000000046" PropertyName="cleanglobalobjid" > PropertyType="Binary"/> > <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- > C000-000000000046" PropertyName="global_objid" PropertyType="Binary"/> > <t:ExtendedFieldURI PropertySetId="00020329-0000-0000- > C000-000000000046" PropertyName="Gid23" PropertyType="Binary"/> > </t:AdditionalProperties> > </ItemShape> > <ItemIds> > <t:ItemId > Id="AQAbAHRlc3Rkb21AYWxleGNoMjAwADcuYWw2NC5jb20ARgAAA1H9bvIF4HJKp52BLKV2tAYHAPCW3xic6cNDvJShVPo > +lQAABEcAAADwlt8YnOnDQ7yUoVT6PpUAAAByqWGc9AAAAA==" > ChangeKey="DwAAABYAAADwlt8YnOnDQ7yUoVT6PpUAAHKpYfzx" /> > </ItemIds> > </GetItem> > </soap:Body> > </soap:Envelope> > > Changing the BaseShape propertie to 'Default', 'AllProperties' or > 'IdOnly' has no effect on the result. > > It really seems that there is a matter to get the custom properties > with GetItem method..... > > Dom. > >
Your XML works ok for me too, i can retrieve a custom propertie that i had created with the UpdateItem xml for example. Maybe i'm wrong when i use 'PublicStrings' to access the propertie i want to retrieve: the Global Object Id. Does this propertie belongs to the 'PublicStrings' namespace ? if so, what's her name ? And if not, how can it be retrived with ews ? Thanks, Dom.
Hi, the global object id (when referring tot the calendar item global object id) lives in another namespace. Property-ID: 0x3 PropertySet: DistinguishedPropertySetType.Meeting Kind regards, Henning Krause "Dom" wrote in message news:1194509262.681696.177450@19g2000hsx.googlegroups.com... > Your XML works ok for me too, i can retrieve a custom propertie that i > had created with the UpdateItem xml for example. > > Maybe i'm wrong when i use 'PublicStrings' to access the propertie i > want to retrieve: the Global Object Id. > > Does this propertie belongs to the 'PublicStrings' namespace ? if so, > what's her name ? > And if not, how can it be retrived with ews ? > > Thanks, > > Dom. >
Thank you very much Henning, it's exactly what i was looking for, and my request works fine now !! (thanks Glen too) An ultimate question: how did you do to find this answer ? in other words, is there a way to know the EWS namespaces corresponding to the other properties ? Thanks a lot, Dom.
Hi Dom, those are just MAPI properties which have been around for years. In Exchange 2003, the notation was different, but the identifiers were the same. Kind regards, Henning Krause "Dom" wrote in message news:1194532078.873813.191900@v29g2000prd.googlegroups.com... > Thank you very much Henning, it's exactly what i was looking for, and > my request works fine now !! > (thanks Glen too) > > An ultimate question: how did you do to find this answer ? in other > words, is there a way to know the EWS namespaces corresponding to the > other properties ? > > Thanks a lot, > > Dom. >