Giter Club home page Giter Club logo

php-ews's People

Watchers

 avatar

php-ews's Issues

Error when loading the exchange server

When I add the script (had to figure out what all to include into my php-page 
too) I get this error:
Fatal error: Uncaught SoapFault exception: [Client] SoapClient::__doRequest() 
returned non string value in 
/var/www/qbmt/calendar/ews/ExchangeWebServices.php:314 Stack trace: #0 
[internal function]: SoapClient->__call('FindFolder', Array) #1 
/var/www/qbmt/calendar/ews/ExchangeWebServices.php(314): 
NTLMSoapClient_Exchange->FindFolder(Object(EWSType_FindFolderType)) #2 
/var/www/qbmt/calendar/index.php(34): 
ExchangeWebServices->FindFolder(Object(EWSType_FindFolderType)) #3 {main} 
thrown in /var/www/qbmt/calendar/ews/ExchangeWebServices.php on line 314
This is the basic example

Original issue reported on code.google.com by [email protected] on 6 Jan 2012 at 11:54

BasePoint missing on CalendarView, but Basepoint is set

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 [email protected] on 26 Nov 2011 at 11:44

Path' is abstract or its type is abstract.

**Steps to reproduce
I am trying to get "additional properties" associated with a calendar item.
I use the following code:

$FindItem->Traversal = "Shallow";    
$FindItem->ItemShape->BaseShape = "AllProperties";   
$FindItem->ItemShape->IncludeMimeContent = true;

$FindItem->ItemShape->AdditionalProperties[0]->PathToExtendedField->Distinguishe
dPropertySetId
= DistinguishedPropertySetType.Appointment;   
$FindItem->ItemShape->AdditionalProperties[0]->PathToExtendedField->Distinguishe
dPropertySetIdSpecified
= true;     
$FindItem->ItemShape->AdditionalProperties[0]->PathToExtendedField->PropertyType
= MapiPropertyTypeType.String;
$FindItem->ItemShape->AdditionalProperties[0]->PathToExtendedField->PropertyName
= "STMeetingId";

$FindItem->ParentFolderIds->DistinguishedFolderId->Id = "calendar";   
$FindItem->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress =
"[email protected]";

$result = $client->FindItem($FindItem);     

**What is the expected output? What do you see instead?
Schema validation fails. I have copied the types.xsd from Exchange server
(2010) and have copied it locally. "Path is abstract or its type is abstract".


**What version of the product are you using? On what operating system?
I am  using Exchange 2010. Client code is running on WindRiver linux.

**Please provide any additional information below.
This is part of getting all calendar items for all users. It works. But now
I am trying to access either the custom "user properties" set via outlook
or the body of the calendar item which has some text which I am interested in.

Please let me know.

Thanks,
Sachin

Original issue reported on code.google.com by [email protected] on 14 May 2010 at 11:21

Missing RequestServerVersion SOAP header

What steps will reproduce the problem?
1. FindFolder request with DistinguishedFolderId on publicfoldersroot and
Traversal on Shallow.

Expected output: succesful response

Got soap error: The request is valid but does not specify the correct
server version in the RequestServerVersion SOAP header. Ensure that the
RequestServerVersion SOAP header is set with the correct
RequestServerVersionValue.

Quick fix: to NTMLSOAPClient_Exchange::__construct(), I added this:

$soapHeader = new SoapHeader(
    'http://schemas.microsoft.com/exchange/services/2006/types',
    'RequestServerVersion Version="Exchange2007_SP1"'
);
$this->__setSoapHeaders($soapHeader);

Obviously, the Exchange2007_SP1 part should be configurable. 

Original issue reported on code.google.com by kristof.coomans on 23 Apr 2010 at 10:13

Naming of classes and autoloader interoperability

It would be nice if all classes could be autoloaded according to the
proposal for autoloader  interoperability from the PHP standards working
group:
http://groups.google.com/group/php-standards/web/psr-0-final-proposal. A
proper class naming scheme and similar directory structure is the only
requirement.

I see some things that ideally should be changed:

- put a 'vendor' name as a prefix to the current class names
- move NTLM specific stuff in its own directory and rename the classes to
NTLM_...
- move EWS specific stuff to its own directory and rename the classes to EWS_

etc.

Original issue reported on code.google.com by kristof.coomans on 23 Apr 2010 at 10:32

Strict warning: Declaration of NTLMSoapClient::__doRequest() should be compatible with that of SoapClient::__doRequest()

When using the library, and PHP's error_reporting includes E_STRICT:

Declaration of NTLMSoapClient::__doRequest() should be compatible with that
of SoapClient::__doRequest()

Solution: the last parameter, $one_way, should have a default value of 0:

public function __doRequest($request, $location, $action, $version,
$one_way = 0) {

Original issue reported on code.google.com by kristof.coomans on 23 Apr 2010 at 11:46

Request always returns null

Really impressed with this project. Great work. I've got it working on my dev 
server (WAMP stack)...but when I move it to my production (LAMP) Debian server 
I get nothing but a NULL result for any of the function calls. I might be 
missing something basic...I'm sure it's a configuration issue on my end...some 
kind of error would be helpful....any ideas on where I could start with 
troubleshooting??? Do I need to COM objects enabled, etc..? Any more info on 
the dependencies would be really great.

Original issue reported on code.google.com by [email protected] on 11 Jul 2011 at 11:14

Missing files on creation of calendar item

Well, I was trying to create an item in the calendar and I encountered with two 
errors:

1. Missing "Subject" property for CalendarItemType
2. Missing file "CalendarItemCreateOrDeleteOperationType", that has constants 
that define the send method policy on item creation.
2.a. Missing file "CalendarItemUpdateOperationType", that has constants that 
define the send method policy on item update.

I added the missing subject property and created the two files missing based on 
the enumeration in "types.xsd". Hope this will help.

Actual code to insert a calendar item:

$ews = new ExchangeWebServices($host, $username, $password);
// start building the find request
$request = new EWSType_CreateItemType();
$request->Items = new EWSType_NonEmptyArrayOfAllItemsType();
$request->Items->CalendarItem = new EWSType_CalendarItemType();

// configure the view
$request->Items->CalendarItem->Subject = "Basic Calendar Item Insertion";
$request->SendMeetingInvitations = 
EWSType_CalendarItemCreateOrDeleteOperationType::SEND_TO_NONE;
//$request->SendMeetingInvitationsSpecified = true;
$response = $ews->CreateItem($request);
echo '<pre>'.print_r($response, true).'</pre>';

Original issue reported on code.google.com by [email protected] on 23 Aug 2010 at 2:10

Attachments:

Changes for Exchange 2010

I have Exchange 2010 and I was wondering how would I use Exchange
Impersonation with this. 

Specifically I can get the following things to work:
1. User X can get his calendar information.
2. Service Account 'S' (with Impersonation privileges) can get  his
calendar information.

But, how to use Service Account 'S' credentials to authenticate in order to
get calendar information for user X?

Thanks,
Sachin

Original issue reported on code.google.com by [email protected] on 23 Apr 2010 at 12:22

loss of control and no exception

Sorry not to be able to be more accurate in the bug description but the problem 
is not trivial.

It occurs (not every time) just after a call on a method like 
DeleteItem($deleteItem) on a NTLMSoapClient_Exchange instance.

This call is the last I can trace. Just after the process has jumped on an 
inpredictable line of the code previously loaded by the php interpreter. And 
there is absolutely no relation beetween the DeleteItem and the next line of 
code executed. Of course, the program can't run much further because the 
contexte is not the good one.

Normaly, if no bug occurs, just after a call to DeleteItem, the next line of 
code I can trace is in the __construct method of the NTLMSoapClient instance. 
The SOAP enveloppe has been created and the program is almost ready to call the 
server.

I suppose the bug occurs while creating the SOAP request, but I can't trace it. 
I already tried to activate exceptions and trace this way:
$EWSClientOptions = array (
            'user' => EWS_CLIENT_USER, // for curl
            'password' => EWS_CLIENT_PASSWORD,
            'trace' => true,  // options the should be used by soapclient  http://www.php.net/manual/fr/soapclient.soapclient.php
            'exceptions ' => true
        );
$this->EWSclient = new NTLMSoapClient_Exchange(EWS_CLIENT_WSDL, 
$EWSClientOptions);

but it doesn't launch any exceptions and I see no traces.

If only it could launch an exception ... !

Running on 
- Windows Server 2008 R2 Enterprise.
- PHP Version 5.2.14
- Zend Server
- Curl info: libcurl/7.20.0 OpenSSL/0.9.8o zlib/1.2.3 
- Exchange 2010 (but it has not yet been called when to problem occurs)

but I also had the problem on PHP5.3 and a simple (wamp) apache  server. 

I hope we can solve this problem.

Thanks,

Alain

Original issue reported on code.google.com by [email protected] on 17 Feb 2011 at 9:04

Incorrect return types

The doc blocks for each of the request methods defined in the 
ExchangeWebServices class are incorrect. For example 
ExchangeWebServices::CreateItem() defines the response type as 
CreateItemResponseType; however, the method actually returns an object of type 
stdClass. CreateItemResponseType is also not defined.

There are two options here:
1. The doc blocks can be changed to define the return type as stdClass.
2. The response can be properly processed into the defined return type (though 
these still need to be implemented and should probably be prefixed with EWSType 
(e.g. EWSType_CreateItemResponseType).

The second option will be a change in the current behavior but I am not opposed 
to it if that makes it easier to use. I wanted to get some input from the 
community before I make decision.

Original issue reported on code.google.com by [email protected] on 6 Oct 2011 at 1:14

Loss of control and no exception

Loss of control and no exception

Sorry not to be able to be more accurate in the bug description but the problem 
is not trivial.

It occurs (not every time) just after a call on a method like 
DeleteItem($deleteItem) on a NTLMSoapClient_Exchange instance.

This call is the last I can trace. Just after the process has jumped on an 
inpredictable line of the code previously loaded by the php interpreter. And 
there is absolutely no relation beetween the DeleteItem and the next line of 
code executed. Of course, the program can't run much further because the 
contexte is not the good one.

Normaly, if no bug occurs, just after a call to DeleteItem, the next line of 
code I can trace is in the __construct method of the NTLMSoapClient instance. 
The SOAP enveloppe has been created and the program is almost ready to call the 
server.

I suppose the bug occurs while creating the SOAP request, but I can't trace it. 
I already tried to activate exceptions and trace this way:
$EWSClientOptions = array (
            'user' => EWS_CLIENT_USER, // for curl
            'password' => EWS_CLIENT_PASSWORD,
            'trace' => true,  // options the should be used by soapclient  http://www.php.net/manual/fr/soapclient.soapclient.php
            'exceptions ' => true
        );
$this->EWSclient = new NTLMSoapClient_Exchange(EWS_CLIENT_WSDL, 
$EWSClientOptions);

but it doesn't launch any exceptions and I see no traces.

If only it could launch an exception ... !

Running on 
- Windows Server 2008 R2 Enterprise.
- PHP Version 5.2.14
- Zend Server
- Curl info: libcurl/7.20.0 OpenSSL/0.9.8o zlib/1.2.3 
- Exchange 2010 (but it has not yet been called when to problem occurs)

but I also had the problem on PHP5.3 and a simple (wamp) apache  server. 

I hope we can solve this problem.

Thanks,

Alain

Original issue reported on code.google.com by [email protected] on 17 Feb 2011 at 9:05

Documentation

Could you post up some documentation, even if it is very basic, to get us 
started with your project?  It definitely seems like a useful project; one I 
hope to contribute to down the road if I can get it working.

Original issue reported on code.google.com by [email protected] on 11 Feb 2010 at 3:38

Scan Inbox

Hello,
I use your Class but :

I come to you because I have a small problem that is becoming urgent, for one 
of my projects at work.

I'm stuck and it becomes very urgent, I seek the way to list all emails from my 
inbox from a primary Exchange server and read its contents and headers ,....

I use the EWS class with a LDAP connection, I can send emails, in listing of 
Calendar event, to enter the Inbox (or so I think :-)).

Could you please help me,it's very urgent 

Original issue reported on code.google.com by [email protected] on 12 Oct 2010 at 1:16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.