# Sample ruby program to talk to an exchange server

**URL:** <https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384>\
**Category:** Ruby\
**Created:** [July 11, 2010, 2:14pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384 "2010-07-11T14:14:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 11, 2010, 2:14pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/1 "2010-07-11T14:14:38Z")

</div>

Hi, I’m looking for a sample programm to test the communication with an  
exchange server - connect, inquire data, add data, delete entry …  
I was asked to check these possibilities but have no ruby experience.  
Would very much appreciate any help.

Thank you in advance,  
Dany

---

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 12, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/2 "2010-07-12T16:44:41Z")

</div>

Dani D. wrote:

Any help here ?

Thnx  
Dani

---

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 13, 2010, 5:45pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/3 "2010-07-13T17:45:48Z")

</div>

On Mon, Jul 12, 2010 at 10:44 AM, Dani D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Dani D. wrote:
> 
> Any help here ?
> 
> ## Thnx Dani
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Here is a sample program that uses Redemption Data Objects (  
[http://www.dimastr.com/redemption/rdo/default.htm](http://www.dimastr.com/redemption/rdo/default.htm) ) to retrieve the  
Global Address List from Outlook 2003 connected to Exchange.

//\IKE

---

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 15, 2010, 10:29am UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/4 "2010-07-15T10:29:55Z")

</div>

Thank you IKE, but I’m lloking for a sample program to connect to an  
exchange server using soap.

Dani

---

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 15, 2010, 7:47pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/5 "2010-07-15T19:47:45Z")

</div>

On Thu, Jul 15, 2010 at 4:29 AM, Dani D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thank you IKE, but I’m lloking for a sample program to connect to an  
> exchange server using soap.
> 
> ## Dani
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Perhaps something here [viewpoint | RubyGems.org | your community gem host](http://rubygems.org/gems/viewpoint) could help.

Mike

---

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 15, 2010, 10:21pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/6 "2010-07-15T22:21:45Z")

</div>

On Thu, Jul 15, 2010 at 4:29 AM, Dani D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thank you IKE, but I’m lloking for a sample program to connect to an  
> exchange server using soap.

I’ve used SOAP from Ruby but never against Exchange.

The WSDL would be at [https://exchange.example.com/EWS/Services.wsdl](https://exchange.example.com/EWS/Services.wsdl),  
you also need [https://exchange.example.com/EWS/messages.xsd](https://exchange.example.com/EWS/messages.xsd) and  
[https://exchange.example.com/EWS/types.xsd](https://exchange.example.com/EWS/types.xsd) to be able to run  
wsdl2ruby.rb on the wsdl.

/tmp\> /var/lib/gems/1.8/gems/soap4r-1.5.8/bin/wsdl2ruby.rb --type  
client --wsdl Services.wsdl

But, it fails:

FATAL – app: Detected an exception. Stopping … incomplete  
simpleType (ArgumentError)

/tmp\> ls -latr  
-rw-r–r-- 1 43041 2010-07-15 16:04 defaultDriver.rb  
-rw-r–r-- 1 0 2010-07-15 16:04 default.rb

I’m sorry that this isn’t more useful, but maybe somebody knows how to  
overcome this.

---

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 16, 2010, 4:06pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/7 "2010-07-16T16:06:06Z")

</div>

On Jul 11, 8:14 am, Dani D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi, I’m looking for a sample programm to test the communication with an  
> exchange server - connect, inquire data, add data, delete entry …  
> I was asked to check these possibilities but have no ruby experience.  
> Would very much appreciate any help.
> 
> ## Thank you in advance, Dany
> 
> Posted viahttp://www.ruby-forum.com/.

I’ve done a little of this using the IMAP connection and the net/imap  
library. Its worked pretty well for me for some calendar stuff I  
wanted to do. I can post it if you like its about 250 lines of code  
though.

CParticle

---

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 21, 2010, 5:17pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/8 "2010-07-21T17:17:00Z")

</div>

Charged Particle wrote:

> I’ve done a little of this using the IMAP connection and the net/imap  
> library. Its worked pretty well for me for some calendar stuff I  
> wanted to do. I can post it if you like its about 250 lines of code  
> though.
> 
> CParticle

Hi, Thanks to all.

Yes Particle if you could post it here or to my email:  
removed\_email\_address@domain.invalid  
with some explanations, I’ll be thankfull for thatÂ´. Thank you.

Dani

---

<div class="post-metadata">

**Author:** ![laguna53](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb9ed0/32.png) [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Post date:** [July 15, 2010, 10:26pm UTC](https://www.ruby-forum.com/t/sample-ruby-program-to-talk-to-an-exchange-server/191384/9 "2010-07-15T22:26:27Z")

</div>

On Thu, Jul 15, 2010 at 4:29 AM, Dani D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thank you IKE, but I’m lloking for a sample program to connect to an  
> exchange server using soap.

[http://groups.google.com/group/soap4r/msg/7be1d3ae262467e1](http://groups.google.com/group/soap4r/msg/7be1d3ae262467e1)

Justin Clark, Feb 19 2009, 4:12 pm:  
“For all of those out there trying to figure out how to receive  
information  
from an exchange server 2007, here is my process to create a working web  
service client.”

(apparently, wsdl2ruby.rb did work for him)
