EWS (Exchange Web Services)를 사용하여 Exchange 2013 테스트 서버의 데이터에 액세스하고 있습니다. github-jamesiarmes-php-ews 및 새로운 작곡가 활성화 버전 : 나는 (다소 일자) PHP-EWS 저장소로 사용하여이 PHP를하고 있어요 github-deakin-php-ewsEWS FindItem과 GroupBy의 결과에 예기치 않은 요소가 있습니다.
'jamesiarmes에서 위키에 설명 된대로 내 Exchange 서비스에 대한 기본 통화를 할 수있는 나는 GROUPBY 방법을 사용하려고 할 때 ',하지만 일부 문제에 달렸다 : 당신이에서 XML 응답에서 볼 수 있듯이 How to: Perform grouped searches by using EWS in Exchange
을 어떻게에 일반적으로 <Groups>
요소가 포함되어 있어야합니다, 안내 0 개 이상의 <GroupItems>
사람은 것 내 경우에는 CalendarItems 항목을 포함하십시오. 하지만 테스트 서버에서 얻은 내용은 이라는 요소 대신 <GroupItems>
인데 $ response 객체가 불완전합니다.
내가 사용하는 코드 : 나는 __getLastResponse()
(PHP docs)를 사용하여 XML 응답을 수집 관리하고 모든 원을 얻었다 발견
object(stdClass)#685 (1) {
["ResponseMessages"]=>
object(stdClass)#690 (1) {
["FindItemResponseMessage"]=>
object(stdClass)#714 (3) {
["ResponseCode"]=>
string(7) "NoError"
["ResponseClass"]=>
string(7) "Success"
["RootFolder"]=>
object(stdClass)#715 (3) {
["Groups"]=>
object(stdClass)#716 (0) {
}
["IncludesLastItemInRange"]=>
bool(true)
["TotalItemsInView"]=>
int(4)
}
}
}
}
: 이것은
$request = new FindItemType();
$request->Traversal = ItemQueryTraversalType::SHALLOW;
$request->ItemShape = new ItemResponseShapeType();
$request->ItemShape->BaseShape = DefaultShapeNamesType::ALL_PROPERTIES;
// Define the time frame to load calendar items
$request->CalendarView = new CalendarViewType();
$request->CalendarView->StartDate = '2014-01-12T15:18:34+03:00';
$request->CalendarView->EndDate = '2015-01-12T15:18:34+03:00';
// Find events from a certain folders
$request->ParentFolderIds = new NonEmptyArrayOfBaseFolderIdsType();
$request->ParentFolderIds->FolderId = new FolderIdType();
$request->ParentFolderIds->FolderId->Id = $calendarFolderUID;
// Group the events by date
$request->GroupBy = new GroupByType();
$request->GroupBy->Order = 'Ascending';
$request->GroupBy->FieldURI = new FieldURIOrConstantType();
$request->GroupBy->FieldURI->FieldURI = 'calendar:Start';
$request->GroupBy->AggregateOn = new AggregateOnType();
$request->GroupBy->AggregateOn->Aggregate = 'Minimum';
$request->GroupBy->AggregateOn->FieldURI = new FieldURIOrConstantType();
$request->GroupBy->AggregateOn->FieldURI->FieldURI = 'calendar:End';
$response = $this->soapService->FindItem($request);
var_dump()
$response
에서 항목에 있지만 <GroupItems>
대신 <Group>
요소에 <Groups>
요소의 빈 개체를 반환하도록 SoapClient를 처리했습니다. 문제가 자리하고있는 곳
- 이가 어떻게-하는 오래된 가이드? EWS의 다른 문서에서이
<Group>
요소에 대한 참조를 찾지 못 했으므로 문제가 아닌 것 같습니다. - 내 Exchange 서버가 다른 XML 스키마를 사용하고 있습니까?
- php-ews 스키마가 구식입니까? 최종 솔루션으로 '디킨 (deakin)'레포를 포크해야할까요?
나는 이미 PHP는-EWS 스키마를 조절하여 작동하게 할 수있는 방법을 찾았지만 문제가 내 테스트 서버 인 경우, 내가 게시거야 ... 포크을 귀찮게 할 필요가 없습니다 내 현재 솔루션도 아래에 있습니다. 내가 언급 한 바와 같이
내가 여기에 대한 입력을 부탁드립니다....