jasonramsden / php-ews

Automatically exported from code.google.com/p/php-ews
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

BasePoint missing on CalendarView, but Basepoint is set #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

with following code:

<?php
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors','On');

include 'NTLMStream.php';
include 'NTLMSoapClient.php';
include 'NTLMSoapClient/Exchange.php';

include 'EWS_Exception.php';
include 'EWSType.php';
include 'ExchangeWebServices.php';

$host = "******";
$username = "philipp";
$password = "********";

$ews = new ExchangeWebServices($host, $username, $password);

// start building the find folder request
$request = new EWSType_FindItemType();

$request->Traversal = EWSType_FolderQueryTraversalType::SHALLOW;

$request->ItemShape = new EWSType_ItemResponseShapeType();
$request->ItemShape->BaseShape =
        EWSType_DefaultShapeNamesType::DEFAULT_PROPERTIES;

// configure the view
$request->CalendarView = new EWSType_CalendarViewType();
$request->CalendarView->BasePoint = 'Beginning';
$request->CalendarView->Offset = 0;

$request->CalendarView->StartDate = date('c', strtotime('01/01/2010 -00'));
$request->CalendarView->EndDate = date('c', strtotime('01/31/2011 -00'));

// set the starting folder as the inbox
$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();
$request->ParentFolderIds->DistinguishedFolderId = new 
EWSType_DistinguishedFolderIdType();
$request->ParentFolderIds->DistinguishedFolderId->Id = 
EWSType_DistinguishedFolderIdNameType::CALENDAR;

// make the actual call
$response = $ews->FindItem($request);
echo '<pre>'.print_r($response, true).'</pre>';
?>

i get the following error:

Fatal error: Uncaught SoapFault exception: [a:ErrorSchemaValidation] The 
request failed schema validation: The required attribute 'BasePoint' is 
missing. in 
/var/www/vhosts/star-cut.de/httpdocs/app/ExchangeWebServices.php:327 Stack 
trace: #0 [internal function]: SoapClient->__call('FindItem', Array) #1 
/var/www/vhosts/star-cut.de/httpdocs/app/ExchangeWebServices.php(327): 
NTLMSoapClient_Exchange->FindItem(Object(EWSType_FindItemType)) #2 
/var/www/vhosts/star-cut.de/httpdocs/app/get_calendar.php(50): 
ExchangeWebServices->FindItem(Object(EWSType_FindItemType)) #3 {main} thrown in 
/var/www/vhosts/star-cut.de/httpdocs/app/ExchangeWebServices.php on line 327

if i change from CalendarViewType to IndexedPageViewType i get all the elements 
from the calendar, so i think the error is not with setting the BasePoint, i 
think it is not set witch IndexedPageViewType

hope you can help

greetz

Original issue reported on code.google.com by mr.schic...@gmail.com on 26 Nov 2011 at 11:44

GoogleCodeExporter commented 9 years ago
http://msdn.microsoft.com/en-us/library/aa564515%28v=EXCHG.140%29.aspx
show's that no basepoint is needed, so the error is inside of PHP-EWS

Original comment by mr.schic...@gmail.com on 29 Nov 2011 at 8:45

GoogleCodeExporter commented 9 years ago
This issue has been moved to GitHub 
https://github.com/jamesiarmes/php-ews/issues/13

Original comment by JamesIArmes@gmail.com on 14 Feb 2012 at 3:05