I am trying to get product info from magneto via magneto connector in mule USING GET-PRODUCT OPERATION, but I am getting this error: Product not existseven though tested via SOAP UI and worked perfectly.
After a long search I have found the issue:
request via SOAP UI:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Header/>
<soapenv:Body>
<urn:catalogProductInfo soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<sessionId xsi:type="xsd:string"/>
<productId xsi:type="xsd:string"/>
<storeView xsi:type="xsd:string"></storeView>
<attributes xsi:type="urn:catalogProductRequestAttributes">
<attributes xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
</attributes>
<additional_attributes xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
</additional_attributes>
</attributes>
<identifierType xsi:type="xsd:string"/>
</urn:catalogProductInfo>
</soapenv:Body>
</soapenv:Envelope>
request via magneto connector:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:catalogProductInfo xmlns:ns1="urn:Magento" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<sessionId xsi:type="xsd:string"></sessionId>
<product xsi:type="xsd:string"></product>
<storeView xsi:type="xsd:string" xsi:nil="true"/>
<attributes href="#id0"/>
<productIdentifierType xsi:type="xsd:string"></productIdentifierType>
</ns1:catalogProductInfo>
<multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:Magento" id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:catalogProductRequestAttributes">
<attributes soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<attributes xsi:type="xsd:string"></attributes>
</attributes>
<additional_attributes soapenc:arrayType="xsd:string[0]" xsi:type="soapenc:Array"/>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
the difference is in the <product>/<productId> tag.
Any ideas on how to fix?
Found the issue: it's in the magento_v2_soap.wsdl of the magento connector file where in the catalogProductInfoRequest the <part name="product" type="xsd:string"/>needs to be changed to <part name="productId" type="xsd:string"/> I have made the change in gitHub but I don't have write access... so what I did is I made the change downloaded and installed in mule.
Related
In my app I need to look for messages with certain custom properties. I'm using FindItem operation. This is the XML of my request:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<typ:RequestServerVersion Version="Exchange2010_SP2" />
</soap:Header>
<soap:Body>
<mes:FindItem Traversal="Shallow">
<mes:ItemShape>
<typ:BaseShape>IdOnly</typ:BaseShape>
</mes:ItemShape>
<mes:Restriction>
<typ:Or>
<typ:IsEqualTo>
<typ:ExtendedFieldURI PropertySetId="36603a56-9a21-4e9d-b4b7-6eb13876716a" PropertyName="OriginalId" PropertyType="String" />
<typ:FieldURIOrConstant>
<typ:Constant Value="F33A7D78-5FCB-492E-AE98-D7E1CBB379C7" />
</typ:FieldURIOrConstant>
</typ:IsEqualTo>
<typ:IsEqualTo>
<typ:ExtendedFieldURI PropertySetId="36603a56-9a21-4e9d-b4b7-6eb13876716a" PropertyName="OriginalId" PropertyType="String" />
<typ:FieldURIOrConstant>
<typ:Constant Value="hello-world-135" />
</typ:FieldURIOrConstant>
</typ:IsEqualTo>
<typ:IsEqualTo>
<typ:ExtendedFieldURI PropertySetId="36603a56-9a21-4e9d-b4b7-6eb13876716a" PropertyName="OriginalId" PropertyType="String" />
<typ:FieldURIOrConstant>
<typ:Constant Value="9BA188D5-EC35-4E46-AA0B-1C902F6EE70E" />
</typ:FieldURIOrConstant>
</typ:IsEqualTo>
</typ:Or>
</mes:Restriction>
<mes:ParentFolderIds>
<typ:DistinguishedFolderId Id="sentitems" />
</mes:ParentFolderIds>
</mes:FindItem>
</soap:Body>
</soap:Envelope>
So I'm looking for three messages as you can see. One of them (second one) doesn't exist. So in the response I expected to receive some indication that no data for this specific message was found. But this is what I get in the response:
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="0" MajorBuildNumber="1365" MinorBuildNumber="1" Version="V2_23" />
</s:Header>
<s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:FindItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:RootFolder TotalItemsInView="2" IncludesLastItemInRange="true">
<t:Items>
<t:Message>
<t:ItemId Id="AAMkADE3MTJkZWNlLTZiYWYtNDY4Yi1hNmM3LWU2MzY2ZDZjYWNhMQBGAAAAAACoXti5FFu8TJNLLS5k9vC8BwAcJDq8WkSCQ77jdOtyazgnAAAAAAEJAAAcJDq8WkSCQ77jdOtyazgnAAEJ1zgKAAA=" ChangeKey="CQAAABYAAAAcJDq8WkSCQ77jdOtyazgnAAEJ7PHv" />
</t:Message>
<t:Message>
<t:ItemId Id="AAMkADE3MTJkZWNlLTZiYWYtNDY4Yi1hNmM3LWU2MzY2ZDZjYWNhMQBGAAAAAACoXti5FFu8TJNLLS5k9vC8BwAcJDq8WkSCQ77jdOtyazgnAAAAAAEJAAAcJDq8WkSCQ77jdOtyazgnAAEJ1zgJAAA=" ChangeKey="CQAAABYAAAAcJDq8WkSCQ77jdOtyazgnAAEJ7PHs" />
</t:Message>
</t:Items>
</m:RootFolder>
</m:FindItemResponseMessage>
</m:ResponseMessages>
</m:FindItemResponse>
</s:Body>
</s:Envelope>
Only two messages and no indication which ones in the request they belong to. So how am I supposed to map the two found messages to the data in request? Are the messages in the response actually 1 and 2? 2 and 3? or 1 and 3 (which is true in this case)? Do you see my confusion? Obviously I'm doing something wrong. There should be a way to map the data easily. How should I build the request the proper way?
UPDATE:
What I also tried was making a separate FindItem node for each message but unfortunately this didn't work either. The response contained data only for the first item
Your ItemShape element caninclude AdditionalProperties element where you can specify your custom properties, such as "OriginalId".
I cannot create any public folder in case when I set proper permission (through WebUI) to that user (in my case admin).
But when I try to update public folder`s 'EffectiveRights' to add permission level to that user I cannot do it. Which request I need to send to update user permission level on public folder or add proper 'EffectiveRights' on that public folder?
Example of the request:
POST outlook.office365.com/EWS/Exchange.asmx
Content-Type:text/xml; charset=utf-8
Accept:text/xml; charset=utf-8
BODY
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013_SP1" />
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrimarySmtpAddress>test#test_test.onmicrosoft.com</t:PrimarySmtpAddress>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<UpdateFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<FolderChanges>
<t:FolderChange>
<t:DistinguishedFolderId Id="publicfoldersroot" />
<t:Updates>
<t:SetFolderField>
<t:FieldURI FieldURI="folder:EffectiveRights"/>
<t:Folder>
<t:EffectiveRights>
<t:CreateAssociated>false</t:CreateAssociated>
<t:CreateContents>true</t:CreateContents>
<t:CreateHierarchy>false</t:CreateHierarchy>
<t:Delete>false</t:Delete>
<t:Modify>false</t:Modify>
<t:Read>true</t:Read>
</t:EffectiveRights>
</t:Folder>
</t:SetFolderField>
</t:Updates>
</t:FolderChange>
</FolderChanges>
</UpdateFolder>
</soap:Body>
</soap:Envelope>
and the response is:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1164" MinorBuildNumber="25" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body>
<m:UpdateFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:UpdateFolderResponseMessage ResponseClass="Error">
<m:MessageText>Set action is invalid for property.</m:MessageText>
<m:ResponseCode>ErrorInvalidPropertySet</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:MessageXml>
<t:FieldURI FieldURI="folder:EffectiveRights"/>
</m:MessageXml>
<m:Folders/>
</m:UpdateFolderResponseMessage>
</m:ResponseMessages>
</m:UpdateFolderResponse>
</s:Body>
</s:Envelope>
another one example:
POST outlook.office365.com/EWS/Exchange.asmx
Content-Type:text/xml; charset=utf-8
Accept:text/xml; charset=utf-8
BODY
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013_SP1" />
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrimarySmtpAddress>test#test_test.onmicrosoft.com</t:PrimarySmtpAddress>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:UpdateFolder>
<m:FolderChanges>
<t:FolderChange>
<t:FolderId Id="AAEuAAAAAAAaRHOQqmYRzZvIAKoAL8RaAwCOXNGsJPKoS5iTrqfBNvbzAACDSr4rAAA=" />
<t:Updates>
<t:SetFolderField>
<t:FieldURI FieldURI="folder:PermissionSet" />
<t:Folder>
<t:PermissionSet>
<t:Permissions>
<t:Permission>
<t:UserId>
<t:PrimarySmtpAddress>test#test_test.onmicrosoft.com</t:PrimarySmtpAddress>
</t:UserId>
<t:PermissionLevel>Editor</t:PermissionLevel>
</t:Permission>
</t:Permissions>
</t:PermissionSet>
</t:Folder>
</t:SetFolderField>
</t:Updates>
</t:FolderChange>
</m:FolderChanges>
</m:UpdateFolder>
</soap:Body>
</soap:Envelope>
and the response:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1143" MinorBuildNumber="18" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body>
<m:UpdateFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:UpdateFolderResponseMessage ResponseClass="Error">
<m:MessageText>Access is denied. Check credentials and try again., Underlying MAPI stream threw exception</m:MessageText>
<m:ResponseCode>ErrorAccessDenied</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Folders/>
</m:UpdateFolderResponseMessage>
</m:ResponseMessages>
</m:UpdateFolderResponse>
</s:Body>
</s:Envelope>
Because your trying to create folders in publicfoldersroot no user has rights by default to do that (this is to stop people messing up the Public Folder root). So if you want your user test#test_test.onmicrosoft.com you would need to first grant them rights to do that on the Root folder either using the EAC or Add-PublicFolderclientPermissions. I would suggest you first create a folder in the Root using the EAC and then get your code to create child folders of that, from a development point of view this is easier to cleanup when you need to delete everything and test again then trying to clear the whole root hierarchy each time.
Also only you second example will work because EffectiveRights is a calculate property so can't be updated, all you can do is update the underlying DACL of the folder which is what you second request is doing
I have a SOAP request like below
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.revenue.ie/ras/webservices">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1">
<wsse:Username>test</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">BWyAGdlqp5ZuySEwHUfniA==</wsse:Nonce>
<wsu:Created>2014-07-24T09:43:16.665Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<thisNodeChanges>
<string xsi:type="xsd:string">DATAHERE</string>
</thisNodeChanges>
</soapenv:Body>
</soapenv:Envelope>
How can i get the text value "DATAHERE" with xpath if "thisNodeChanges" changes from request to request and so does "string".
If i do //string/text()it works but it's not always called string.
Thanks
I think this could work:
'//*[name()="soapenv:Body"]/*/*/text()'
I am trying to delete a calendar event that I have created a while ago.
Case 1:
I call EWS to create a calendar event using credentials of domain user broom#infusion.com in some room providing email address of the room and then I get ID of the event
Then I delete the event by calling EWS and providing Id and ChangeKey, and all is fine - meeting is deleted
Case 2
I create event the same way like in Case 1
I get list of calendar events for this room. Now ID of the event has HexEntryId format. So I use ConvertId method to convert it to EwsLegacyId required by DeleteItem method
I call DeleteItem method with ID of event provided by ConvertId method, but without ChangeKey (I don't have it)
DeleteItemResponse says "Access is denied. Check credentials and try again."
Why can I remove event in Case 1 and I cannot in Case 2? What should I do to delete the event (like in Case 2)?
Here are details of request and responses:
Case 1:
I call EWS to create a calendar event using credentials of domain user broom#mycompany.com in some room by providing email address of the room – a meeting like this:
<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>
<CreateItem xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\" SendMeetingInvitations=\"SendToAllAndSaveCopy\" >
<SavedItemFolderId>
<t:DistinguishedFolderId Id=\"calendar\"/>
</SavedItemFolderId>
<Items>
<t:CalendarItem xmlns=\"http://schemas.microsoft.com/exchange/services/2006/types\">
<Subject>Instant Meeting</Subject>
<Body BodyType=\"Text\">Generated By mycompany Room Booker</Body>
<ReminderIsSet>false</ReminderIsSet>
<ReminderMinutesBeforeStart>60</ReminderMinutesBeforeStart>
<Start>2015-10-01T10:26:02.000Z</Start>
<End>2015-10-01T10:41:02.000Z</End>
<IsAllDayEvent>false</IsAllDayEvent>
<LegacyFreeBusyStatus>Busy</LegacyFreeBusyStatus>
<RequiredAttendees>
<Attendee>
<Mailbox>
<EmailAddress>brdmlt-mainbrd#mycompany.com</EmailAddress>
</Mailbox>
</Attendee>
</RequiredAttendees>
</t:CalendarItem>
</Items>
</CreateItem>
</soap:Body>
</soap:Envelope>
then meeting is accepted and I get ItemID like:
state.ChangeKey: "DwAAABYAAADw3LMNr7pMRqtEFFAbr0MeAAAAhxz0"
state.Id: "AAASAGJyb29tQGluZnVzaW9uLmNvbQBGAAAAAAB5mlhabHe9S4yVHCob9IbcBwDw3LMNr7pMRqtEFFAbr0MeAAAAOdnlAADw3LMNr7pMRqtEFFAbr0MeAAAAhrdWAAA="
Then I delete the event by calling EWS and providing Id and ChangeKey:
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">
<soap:Header/>
<soap:Body>
<m:DeleteItem DeleteType=\"MoveToDeletedItems\" SendMeetingCancellations=\"SendToAllAndSaveCopy\">
<m:ItemIds>
<t:ItemId Id=\"AAASAGJyb29tQGluZnVzaW9uLmNvbQBGAAAAAAB5mlhabHe9S4yVHCob9IbcBwDw3LMNr7pMRqtEFFAbr0MeAAAAOdnlAADw3LMNr7pMRqtEFFAbr0MeAAAAhrdWAAA=\" ChangeKey=\"DwAAABYAAADw3LMNr7pMRqtEFFAbr0MeAAAAhxz0\"/>
</m:ItemIds>
</m:DeleteItem>
</soap:Body>
</soap:Envelope>
and all is fine. The event is deleted.
Case 2:
But when I create event the same way and get response like this:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="14" MinorVersion="3" MajorBuildNumber="235" MinorBuildNumber="1" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:CreateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:CalendarItem>
<t:ItemId Id="AAASAGJyb29tQGluZnVzaW9uLmNvbQBGAAAAAAB5mlhabHe9S4yVHCob9IbcBwDw3LMNr7pMRqtEFFAbr0MeAAAAOdnlAADw3LMNr7pMRqtEFFAbr0MeAAAAhrdYAAA=" ChangeKey="DwAAABYAAADw3LMNr7pMRqtEFFAbr0MeAAAAhx08" />
</t:CalendarItem>
</m:Items>
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</m:CreateItemResponse>
</s:Body>
</s:Envelope>
and when I list calendar events for this room like below:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP2" />
</soap:Header>
<soap:Body>
<GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Bias>300</Bias>
<StandardTime>
<Bias>0</Bias>
<Time>02:0:00</Time>
<DayOrder>1</DayOrder>
<Month>10</Month>
<DayOfWeek>Sunday</DayOfWeek>
</StandardTime>
<DaylightTime>
<Bias>-60</Bias>
<Time>02:00:00</Time>
<DayOrder>2</DayOrder>
<Month>3</Month>
<DayOfWeek>Sunday</DayOfWeek>
</DaylightTime>
</TimeZone>
<MailboxDataArray>
<MailboxData xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Email>
<Name/>
<Address>BRDHOU-MAINBRD#mycompany.com</Address>
<RoutingType>SMTP</RoutingType>
</Email>
<AttendeeType>Room</AttendeeType>
<ExcludeConflicts>false</ExcludeConflicts>
</MailboxData>
</MailboxDataArray>
<FreeBusyViewOptions xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<TimeWindow>
<StartTime>2015-10-01T06:34:09</StartTime>
<EndTime>2015-10-01T23:59:59</EndTime>
</TimeWindow>
<MergedFreeBusyIntervalInMinutes>60</MergedFreeBusyIntervalInMinutes>
<RequestedView>Detailed</RequestedView>
</FreeBusyViewOptions>
</GetUserAvailabilityRequest>
</soap:Body>
</soap:Envelope>
I get response with IDs in some other format (HexEntryId):
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="14" MinorVersion="3" MajorBuildNumber="235" MinorBuildNumber="1" Version="Exchange2010_SP2" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetUserAvailabilityResponse xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<FreeBusyResponseArray>
<FreeBusyResponse>
<ResponseMessage ResponseClass="Success">
<ResponseCode>NoError</ResponseCode>
</ResponseMessage>
<FreeBusyView>
<FreeBusyViewType xmlns="http://schemas.microsoft.com/exchange/services/2006/types">Detailed</FreeBusyViewType>
<CalendarEventArray xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<CalendarEvent>
<StartTime>2015-10-01T06:36:51</StartTime>
<EndTime>2015-10-01T06:51:51</EndTime>
<BusyType>Busy</BusyType>
<CalendarEventDetails>
<ID>00000000B23AEBAC6379B34DBBBA0B525D2BBFD70700C26EC63E0E9E2A49B110258061BF491D000000FDECCA0000C26EC63E0E9E2A49B110258061BF491D0000D9385B8C0000</ID>
<Subject>Boardroom Tablet </Subject>
<IsMeeting>true</IsMeeting>
<IsRecurring>false</IsRecurring>
<IsException>false</IsException>
<IsReminderSet>false</IsReminderSet>
<IsPrivate>false</IsPrivate>
</CalendarEventDetails>
</CalendarEvent>
</CalendarEventArray>
<WorkingHours xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<TimeZone>
<Bias>300</Bias>
<StandardTime>
<Bias>0</Bias>
<Time>02:00:00</Time>
<DayOrder>1</DayOrder>
<Month>11</Month>
<DayOfWeek>Sunday</DayOfWeek>
</StandardTime>
<DaylightTime>
<Bias>-60</Bias>
<Time>02:00:00</Time>
<DayOrder>2</DayOrder>
<Month>3</Month>
<DayOfWeek>Sunday</DayOfWeek>
</DaylightTime>
</TimeZone>
<WorkingPeriodArray>
<WorkingPeriod>
<DayOfWeek>Monday Tuesday Wednesday Thursday Friday</DayOfWeek>
<StartTimeInMinutes>480</StartTimeInMinutes>
<EndTimeInMinutes>1140</EndTimeInMinutes>
</WorkingPeriod>
</WorkingPeriodArray>
</WorkingHours>
</FreeBusyView>
</FreeBusyResponse>
</FreeBusyResponseArray>
</GetUserAvailabilityResponse>
</s:Body>
</s:Envelope>
To be able to call DeleteItem I need this Id in EwsLegacyId format instead of HexEntryId format, so I call ConvertId method:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010" />
</soap:Header>
<soap:Body>
<m:ConvertId DestinationFormat="EwsLegacyId">
<m:SourceIds>
<t:AlternateId Format="HexEntryId" Id="00000000B23AEBAC6379B34DBBBA0B525D2BBFD70700C26EC63E0E9E2A49B110258061BF491D000000FDECCA0000C26EC63E0E9E2A49B110258061BF491D0000D9385B940000" Mailbox="BRDNYC-Collab2#mycompany.com" />
</m:SourceIds>
</m:ConvertId>
</soap:Body>
</soap:Envelope>
and I get
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="14" MinorVersion="3" MajorBuildNumber="235" MinorBuildNumber="1" Version="Exchange2010_SP2" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:ConvertIdResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:ConvertIdResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:AlternateId xsi:type="t:AlternateIdType" Format="EwsLegacyId" Id="AAAbAEJSRE5ZQy1Db2xsYWIyQGluZnVzaW9uLmNvbQBGAAAAAACyOuusY3mzTbu6C1JdK7/XBwDCbsY+Dp4qSbEQJYBhv0kdAAAA/ezKAADCbsY+Dp4qSbEQJYBhv0kdAADZOFuUAAA=" Mailbox="BRDNYC-Collab2#mycompany.com" />
</m:ConvertIdResponseMessage>
</m:ResponseMessages>
</m:ConvertIdResponse>
</s:Body>
</s:Envelope>
And when I try to call DeleteItem on this Id like this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<m:DeleteItem DeleteType="MoveToDeletedItems" SendMeetingCancellations="SendToAllAndSaveCopy">
<m:ItemIds>
<t:ItemId Id="AAAbAEJSRE5ZQy1Db2xsYWIyQGluZnVzaW9uLmNvbQBGAAAAAACyOuusY3mzTbu6C1JdK7/XBwDCbsY+Dp4qSbEQJYBhv0kdAAAA/ezKAADCbsY+Dp4qSbEQJYBhv0kdAADZOFuUAAA=" />
</m:ItemIds>
</m:DeleteItem>
</soap:Body>
</soap:Envelope>
I get
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="14" MinorVersion="3" MajorBuildNumber="235" MinorBuildNumber="1" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</s:Header>
<s:Body>
<m:DeleteItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:DeleteItemResponseMessage ResponseClass="Error">
<m:MessageText>Access is denied. Check credentials and try again.</m:MessageText>
<m:ResponseCode>ErrorAccessDenied</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
</m:DeleteItemResponseMessage>
</m:ResponseMessages>
</m:DeleteItemResponse>
</s:Body>
</s:Envelope>
"Accees denied. Check credentials and try again"
In Case 1 your deleting the Appointment from your calendar which you have Full Access to. In Case2 it looks like your trying to delete the appointment from the Room Mailbox which you may or may not have Full rights to (the default is read only even if you are the organizer of the appointment its the calendar itself you would need rights to). In the case where you where the organizer of said appointment you would be better to just cancel the appointment in your calendar and send the cancellation through to the Room mailbox and let the auto-accept on the Room mailbox process and perform the delete that way or you would need to assign the mailbox that is trying to do the Delete Full access to the Room mailbox in question.
cheers
Glen
Code block 1 below creates a recurring event, recurring every day, start date 3. May 2014
Code block 2: response OK
Code block 3: ask for first occurrence with that ID (Exchange starts counting at 1, not 0)
Code block 4: response: 1st occurrence is on 4. May ????? What is happening here (and how to fix)?
Create event:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
<soapenv:Header>
<typ:RequestServerVersion Version="Exchange2007_SP1"/>
<typ:MailboxCulture>en-US</typ:MailboxCulture>
<typ:TimeZoneContext>
<typ:TimeZoneDefinition Id="W. Europe Standard Time"/>
</typ:TimeZoneContext>
</soapenv:Header>
<soapenv:Body>
<mes:CreateItem SendMeetingInvitations="SendToNone">
<mes:Items>
<typ:CalendarItem>
<typ:Subject>Random master event 24 for emp id 20652</typ:Subject>
<typ:Body BodyType="Text">TEST recurring event</typ:Body>
<typ:Categories>
<typ:String>TimeTell</typ:String>
</typ:Categories>
<typ:ReminderIsSet>false</typ:ReminderIsSet>
<typ:Start>2014-05-03T13:24:00.000+01:00</typ:Start>
<typ:End>2014-05-03T17:25:00.000+01:00</typ:End>
<typ:IsAllDayEvent>false</typ:IsAllDayEvent>
<typ:LegacyFreeBusyStatus>Busy</typ:LegacyFreeBusyStatus>
<typ:Location>Here</typ:Location>
<typ:Recurrence>
<typ:DailyRecurrence>
<typ:Interval>1</typ:Interval>
</typ:DailyRecurrence>
<typ:NumberedRecurrence>
<typ:StartDate>2014-05-03Z</typ:StartDate>
<typ:NumberOfOccurrences>27</typ:NumberOfOccurrences>
</typ:NumberedRecurrence>
</typ:Recurrence>
<typ:MeetingTimeZone TimeZoneName="W. Europe Standard Time"/>
</typ:CalendarItem>
</mes:Items>
</mes:CreateItem>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="0" MajorBuildNumber="516" MinorBuildNumber="29" Version="Exchange2013" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:CreateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:CalendarItem>
<t:ItemId Id="AAMkAG[snip]Kf/fBAAA=" ChangeKey="DwAAABYAAAC4CIO9P6hbQ7Rh7x62oA4/AACKhInU"/>
</t:CalendarItem>
</m:Items>
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</m:CreateItemResponse>
</s:Body>
</s:Envelope>
Find occurrence 1:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
<soapenv:Header>
<typ:RequestServerVersion Version="Exchange2007_SP1"/>
<typ:MailboxCulture>en-US</typ:MailboxCulture>
<typ:TimeZoneContext>
<typ:TimeZoneDefinition Id="W. Europe Standard Time"/>
</typ:TimeZoneContext>
</soapenv:Header>
<soapenv:Body>
<mes:GetItem>
<mes:ItemShape>
<typ:BaseShape>IdOnly</typ:BaseShape>
<typ:AdditionalProperties>
<typ:FieldURI FieldURI="calendar:Start" />
</typ:AdditionalProperties>
</mes:ItemShape>
<mes:ItemIds>
<typ:OccurrenceItemId RecurringMasterId="AAMkAG[snip]Kf/fBAAA=" InstanceIndex="1"/>
</mes:ItemIds>
</mes:GetItem>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="0" MajorBuildNumber="516" MinorBuildNumber="29" Version="Exchange2013" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:GetItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:CalendarItem>
<t:ItemId Id="AAMkAGFkYTBkM2UxLTkyYTctNDA1NC05MGY3LWJkMzQ4MWQwNjAyMQFRAAgI0TVC7TkAAEYAAAAAhhvKZmdnRkCUOsqdWWjc9wcAuAiDvT+oW0O0Ye8etqAOPwAAAAAADwAAuAiDvT+oW0O0Ye8etqAOPwAAin/3wQAAEA==" ChangeKey="DwAAABYAAAC4CIO9P6hbQ7Rh7x62oA4/AACKhInU"/>
<t:Start>2014-05-04T12:24:00Z</t:Start>
</t:CalendarItem>
</m:Items>
</m:GetItemResponseMessage>
</m:ResponseMessages>
</m:GetItemResponse>
</s:Body>
</s:Envelope>
This is done with SOAPUI talking against Exchange 2013 or Exchange 2010
Here's an Outlook screen shot confirming the start at 4. May:
Additional tests:
- Creating with a NoEndRecurrence or EndDateRecurrence also fails:
<typ:NoEndRecurrence>
<typ:StartDate>2014-05-03Z</typ:StartDate>
</typ:NoEndRecurrence>
<typ:EndDateRecurrence>
<typ:StartDate>2014-05-03Z</typ:StartDate>
<typ:EndDate>2014-06-03Z</typ:EndDate>
</typ:EndDateRecurrence>
Your create call is creating the event in dd-mm-yyyZ, which is in Zulu time (a.k.a. UTC). If you're actually in a different timezone, that can skew your events by a day in either direction.
EWS and timezones (timezones in general) can be very confusing. When connecting to EWS using the Managed EWS library you can specify the Timezone you're in, that way, when you supply any dates, you don't have to constantly keep this in mind.
Also remember that certain timezones start/end their daylight savings time on different date (or don't have daylight savings at all (Arizona)). This can even move certain appointments by 1 hour in a short timewindow each year.