Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Receiveing notification from Exchange web services  RSS feed

 
Sanjay Chavan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to web services.
I want to write java client for Exchange 2007 Event Notificaton webservice.
I went through Google: which says it needs two things from client side service, first Subscription to Exchange server for notification and second some way to receive events from exchange server for that subscription.

Please suggest me possible approaches.

Thanks in advance.
 
Vinod K Singh
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Though I do not have any clues about Exchange web services but as AFAIK web services can't send any notifications. They are supposed to be invoked by client to get any information.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vinod K Singh:
They are supposed to be invoked by client to get any information


Exchange 2007 supports Pull Subscription. You start a pull subscription with the Subscribe operation and then use the subscription ID in the GetEvents operation to poll for new events.

Event Notifications
[ December 24, 2008: Message edited by: Peer Reynders ]
 
Kirk Aiya
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vinod K Singh wrote:Though I do not have any clues about Exchange web services but as AFAIK web services can't send any notifications. They are supposed to be invoked by client to get any information.


In addition to pull subscriptions (using polling, as another poster mentioned), EWS in Exchange 2007 supports push notifications; when you initially create your subscription (by invoking an EWS service, obviously) you pass it the URI of your web-service/WCF service. When changes to the folder that you subscribed to happen in Exchange Server, it (Exchange 2007) will make a call to the web-service at the URI you originally passed with information about the event.

There are some options you can specify when setting up your subscription, but by default, Exchange will try several times to invoke your web-service, at increasing intervals.

As far as writing a Java web-service to handle the Exchange notifications, you could generate the proxy classes for the types and messages Exchange sends/receives by using wsimport on the types.xsd and messages.xsd and Services.wsdl files. This will generate a set of Java classes that represent folders, contacts, emails, folder types, and so on.

Or, if you have a very limited scenario, I suppose you could hand-roll your own soap messages using a SOAP library like KSOAP2 or something. I'm going thru some of this right now creating a lightweight library to use for pulling certain info out of Exchange 2007 from Android.
 
Struka Mix
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this notification example: http://www.independentsoft.de/jwebservices/tutorial/newmailnotification1.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!