I have an office 365 account with the following accounts :
One main user: mainuser#company.onmicrosoft.com
Another user: someuser#company.onmicrosoft.com
someuser#company.onmicrosoft.com has shared his calendar with mainuser#company.onmicrosoft.com
Then I execute the following EWS operation (through mainuser#company.onmicrosoft.com) to get the calendar permissions set for someuser#company.onmicrosoft.com
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010"/>
</soap:Header>
<soap:Body>
<GetFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<FolderShape>
<t:BaseShape>Default</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="folder:PermissionSet"/>
</t:AdditionalProperties>
</FolderShape>
<m:FolderIds>
<t:DistinguishedFolderId Id="calendar">
<t:Mailbox>
<t:EmailAddress>someuser#company.onmicrosoft.com</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</m:FolderIds>
</GetFolder>
</soap:Body>
</soap:Envelope>
Everything is working fine, as I get a response looking like this :
<?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="20" MajorBuildNumber="56" MinorBuildNumber="13" Version="V2017_07_11"/>
</s:Header>
<s:Body>
<m:GetFolderResponse 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:GetFolderResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:CalendarFolder>
<t:FolderId Id="some-folder-id"/>
<t:DisplayName>Calendar</t:DisplayName>
<t:TotalCount>67</t:TotalCount>
<t:ChildFolderCount>2</t:ChildFolderCount>
<t:PermissionSet>
...
</t:PermissionSet>
</t:CalendarFolder>
</m:Folders>
</m:GetFolderResponseMessage>
</m:ResponseMessages>
</m:GetFolderResponse>
</s:Body>
</s:Envelope>
Except when someuser#company.onmicrosoft.com shares his calendars with an external contact, then when I execute the same request I suddenly get this response error :
<?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="20" MajorBuildNumber="56" MinorBuildNumber="13" Version="V2017_07_11"/>
</s:Header>
<s:Body>
<m:GetFolderResponse 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:GetFolderResponseMessage ResponseClass="Error">
<m:MessageText>Access is denied. Check credentials and try again., Can't look up the requested Entry ID.</m:MessageText>
<m:ResponseCode>ErrorAccessDenied</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Folders/>
</m:GetFolderResponseMessage>
</m:ResponseMessages>
</m:GetFolderResponse>
</s:Body>
</s:Envelope>
I don't understand why does Office 365 return an EWS error instead of filtering the data which we should not have access to... We should be able to get the calendar permissions concerning the internal organization regardless of any external calendar sharing.
Anyone having the same issue or info about scheduled resolution ?
Related
I am trying to throw exception on camel. I am on version 2.2.170.redhat-000013. When I use below code in spring DSL
<throwException id="_throwException1" exceptionType="org.mycompany.MyException" message="Test Exception"/>
Gives
Multiple annotations found at this line:
- cvc-complex-type.4: Attribute 'ref' must appear on element 'throwException'.
- cvc-complex-type.3.2.2: Attribute 'exceptionType' is not allowed to appear in element
'throwException'.
- cvc-complex-type.3.2.2: Attribute 'message' is not allowed to appear in element
'throwException'.
Schema location in my project is as below
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd" >
throwException syntax should work as per documentation, please help to find mistake.
Is there any documentation why does the google caldav api ignores this request.
<?xml version="1.0" encoding="UTF-8"?>
<C:calendar-query xmlns:d="DAV:"
xmlns:C="urn:ietf:params:xml:ns:caldav"
xmlns:A="http:/ /apple.com/ns/ical/">
<d:prop>
<d:getetag/>
<C:calendar-data/>
</d:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:prop-filter name="UID">
<C:text-match collation="i;octet">xxxxxxxxxxxx</C:text-match>
</C:prop-filter>
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>
It returns every event but it should return only the one i requested in the filter.
I can only filter the events with
<C:time-range start="20160326T230000Z" end="20160430T220000Z"/>
but everything else is just ignored.
I find another solution to get only one event by uid with caldav api google.
I use href url of the event like $href="https://apidata.googleusercontent.com/caldav/v2/IDCalendar/events/**uid.**ics
And i query with :
<?xml version="1.0" encoding="utf-8" ?>
<C:calendar-multiget xmlns="DAV:"mlns:C="urn:ietf:params:xml:ns:caldav">
<prop><getetag/><C:calendar-data/></prop>
<href>$href</href>
</C:calendar-multiget>
and i get only the event with UID :) .
Dam
but Google CalDAV supports calendar-multiget, where you can use same url pattern
https://icalendar.org/CalDAV-Access-RFC-4791/7-9-caldav-calendar-multiget-report.html
Example:
<?xml version='1.0' encoding='utf-8'?>
<C:calendar-multiget xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/" xmlns:D="DAV" xmlns:I="http://apple.com/ns/ical/">
<ns0:prop xmlns:ns0="DAV:">
<ns0:getetag/>
<C:calendar-data/>
</ns0:prop>
<ns0:href xmlns:ns0="DAV:">/caldav/v2/[calendar_id]/events/[UID]</ns0:href>
</C:calendar-multiget>
with response
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:caldav="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:ical="http://apple.com/ns/ical/">
<D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">
<D:href>/caldav/v2/[calendarID]/events/[UID]</D:href>
<D:propstat>
<D:status>HTTP/1.1 200 OK</D:status>
<D:prop>
<D:getetag>"63701474571"</D:getetag>
<caldav:calendar-data>BEGIN:VCALENDAR
.....
</caldav:calendar-data>
</D:prop>
</D:propstat>
</D:response>
</D:multistatus>
I am using the below XML to fetch my calendars. The response contains some of the details of my calendars but doesn't contain the default color for calendars. I also want to get the default color set for each calendar. How do I get it?
<?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="Exchange2007_SP1" />
</soap:Header>
<soap:Body>
<m:FindFolder Traversal="Deep">
<m:FolderShape>
<t:BaseShape>AllProperties</t:BaseShape>
</m:FolderShape>
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="calendar" />
</m:ParentFolderIds>
</m:FindFolder>
</soap:Body>
</soap:Envelope>
The XML I am submitting for customer refund request:
<?xml version="1.0" encoding="utf-8"?>
<AmazonEnvelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>A24MUCS*****</MerchantIdentifier>
</Header>
<MessageType>OrderAdjustment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAdjustment>
<AmazonOrderID>105-3616276-******</AmazonOrderID>
<AdjustedItem>
<AdjustmentReason>CustomerCancel</AdjustmentReason>
<ItemPriceAdjustments>
<Component>
<Type>Principal</Type>
<Amount currency="USD">0.09</Amount>
</Component>
<Component>
<Type>Shipping</Type>
<Amount currency="USD">4.87</Amount>
</Component>
</ItemPriceAdjustments>
</AdjustedItem>
</OrderAdjustment>
</Message>
</AmazonEnvelope>
On submitting the XML the error returned by Amazon is:
Error 5000:This is a malformed or invalid XML document.
Your XML does not seem malformed or invalid. However it is missing the AmazonOrderItemCode or MerchantOrderItemID which needs to be stated before AdjustmentReason, which is why it doesn't validate.
I'm using WWSAPI inside a C project to communicate with a web service by sending and receiving SOAP messages.
The error I'm having is that The server is expecting to see a <wsse:Security> tag and the message generated by my program doesn't have one. Instead it has a <o:Security> tag. Is there a way to specify the namespace prefix within WWSAPI for C/C++?
Here is my request:
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<a:Action s:mustUnderstand="1">http://ge.evse.com/getAllGeneratedPasswords</a:Action>
<a:MessageID>urn:uuid:1fc3d3dc-a1c1-4fcf-bfca-96e712afba1b</a:MessageID>
<a:To s:mustUnderstand="1">https://services.stg.gewattstation.com/EVSEManufacturingServices/services/EVSEManufacturingServices</a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<Timestamp xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<Created>2012-06-08T19:00:59.476Z</Created>
<Expires>2012-06-08T19:05:59.476Z</Expires>
</Timestamp>
<o:UsernameToken>
<o:Username>joe</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"><!--censored sensitive information--></o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<getAllGeneratedPasswords xmlns="http://service.services.manufacturing.evse.inds.ge.com/">
<userType xmlns="">user</userType>
</getAllGeneratedPasswords>
</s:Body>
</s:Envelope>
And here is the Response from the web service:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode xmlns:ns1="http://docs.oas is-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd ">ns1:InvalidSecurity</faultcode>
<faultstring>An error was discovered processing the <wsse:Security> header</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
As you can see, it's looking for <wsse:Security> and it isn't seeing it... anyone who knows anything about this?