Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 21st February 2009, 21:45
eoasis eoasis is offline
Junior Member
 
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Check your date ranges if failing schema validation

What error message are you getting? Check the date ranges you are passing and make sure, for example, you don't pass an invalid date range. For example, Feb. only has 28 days so if you pass this it will fail schema validation:

$FindItem->CalendarView->EndDate = "2008-02-31T00:00:00Z";
Reply With Quote
Sponsored Links
  #12  
Old 21st February 2009, 23:40
jmclen jmclen is offline
Junior Member
 
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default UpdateItem

My problem is not with FindItem, it is with UpdateItem. If anyone has a working example I would love to see it. The error I'm getting is regarding the Path not being defined. I've been trying to find this in the schema, but haven't yet.
Reply With Quote
  #13  
Old 21st February 2009, 23:55
eoasis eoasis is offline
Junior Member
 
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please post the php for UpdateItem

Sorry for not reading more carefully. Can you post the PHP snippet you are using to form the UpdateItem request?
Reply With Quote
  #14  
Old 22nd February 2009, 00:10
jmclen jmclen is offline
Junior Member
 
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default UpdateItem

What I really need to see is a working example. I've tried many things and keep getting the message "Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'Path' property".

an example of the code I've tried would be:
$client = new ExchangeNTLMSoapClient($wsdl);
$UpdateItem->ConflictResolution = "AutoResolve";
$UpdateItem->ItemChanges->ItemChange->ItemId->Id = $itemid;
$UpdateItem->ItemChanges->ItemChange->ItemId->ChangeKey = $changekey;
$UpdateItem->ItemChanges->ItemChange->Updates->SetItemField->Subject = $newsubject;
$result = $client->UpdateItem($UpdateItem);


Again, I've manage to find items, create and delete items. This is the last one for me to tackle and I just haven't seen any examples of it.

Thank You,
Jesse
Reply With Quote
  #15  
Old 22nd February 2009, 01:06
eoasis eoasis is offline
Junior Member
 
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Are you missing required attribute MessageDisposition?

See http://msdn.microsoft.com/en-us/library/aa580254.aspx

What happens when you also add the MessageDisposition attribute?

//MessageDisposition is one of:
//SaveOnly The item is updated and saved back to its current folder.
// SendOnly The item is updated and sent but no copy is saved.
//SendAndSaveCopy The item is updated and a copy is saved in the folder // identified by the SavedItemFolderId element.

$UpdateItem->MessageDisposition = "SaveOnly";

Also, if you got CreateItem to work, I'm completely stumped on that one. Here's my PHP code which will send a message with a blank body. But as soon as I add the body text, I get a schema error.

$CreateItem->MessageDisposition = "SendAndSaveCopy";
$CreateItem->SavedItemFolderId->DistinguisedFolderId->Id = "sentitems";
$CreateItem->Items->Message->ItemClass = "IPM.Note";
$CreateItem->Items->Message->Subject = "My Subject";
$CreateItem->Items->Message->Body->BodyType = "Text";

// Adding this line for the body throws schema error

$CreateItem->Items->Message->Body = "Body Text";

Thanks,
Blaine
Reply With Quote
  #16  
Old 22nd February 2009, 01:13
jmclen jmclen is offline
Junior Member
 
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default UpdateItem

Are you getting UpdateItem to work for you? Adding the MessageDisposition hasn't helped any. If you've been able to update any item, even one field, I would love to see how you did it.

Thanks for your help
Reply With Quote
  #17  
Old 22nd February 2009, 01:45
jmclen jmclen is offline
Junior Member
 
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I will also look at your CreateItem example and see what happens to me. I haven't tried populating the body of a message yet. I will let you know what happens when I do.
Reply With Quote
  #18  
Old 22nd February 2009, 01:59
eoasis eoasis is offline
Junior Member
 
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default CreateItem just needs to properly pass PHP-Soap attribute

In looking at your problem, I did solve my CreateItem blunder in passing attributes to PHP-Soap.

Here is the code snippet that works.

//Create array to pass attributes and value for PHP-Soap

$CreateItem->Items->Message[$i]->Body[_] = "BODY TEXT";
$CreateItem->Items->Message[$i]->Body['BodyType'] = "Text";

//Results in <ns1:Body BodyType="Text">BODY TEXT</ns1:Body>

I'll look at your UpdateItem next

Thanks,
Blaine
Reply With Quote
  #19  
Old 22nd February 2009, 03:24
eoasis eoasis is offline
Junior Member
 
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default UpdateItem PHP-Soap Error Encoding: object hasn't 'Path' property

Jesse - I thought this error indicated that attribute "FieldURI" was not set. But I added this and I also get the "Path" error above.

Try variations of FieldURI in your code in case I'm doing something else wrong:

$UpdateItem->ItemChanges->ItemChange->Updates->SetItemField->FieldURI = "item:Subject";
Reply With Quote
  #20  
Old 23rd February 2009, 19:43
jmclen jmclen is offline
Junior Member
 
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default UpdateItem

Every variation I've tried yields the same result. If I specify Path in the array, then I get a different error about Path being abstract. Have you had any different luck?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 15:33
Exchange beating Postfix to the punch dwygant Installation/Configuration 4 22nd April 2009 23:21
Enable SOAP help trcinc1 Installation/Configuration 0 3rd July 2008 20:01
Postfix integration with Exchange Server vinu Server Operation 3 25th June 2008 22:43
Postfix & Exchange random.guy Server Operation 1 25th May 2006 15:51


All times are GMT +2. The time now is 13:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.