Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Receiveing notification from Exchange web services

 
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.
 
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.
 
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 ]
 
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.
 
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
 
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic