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
  #1  
Old 27th January 2009, 08:00
eescudier eescudier is offline
Junior Member
 
Join Date: Jan 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default can't get the Talking SOAP With Exchange to work

Hi,

I am trying to use the code samples in this HOWTO, but I have some problems.

print_r($client->__getFunctions());
and
print_r($client->__getTypes());

are working correctly, but I can't get anything else to work.

My Exchange server is running Exchange 2007

My PHP box is a somewhat old Ubuntu 6.1 with PHP 5

These are the kind of errors that I don't know what to do with :

Fatal error: Uncaught SoapFault exception: [Client] SoapSlient::__doRequest() returned non string value in /var/www/html/exch_eric/index.php:197 Stack trace: #0 [internal function]: SoapClient->__call('FindFolder', Array) #1 /var/www/html/exch_eric/index.php(197): ExchangeNTLMSoapClient->FindFolder(Object(stdClass)) #2 {main} thrown in /var/www/html/exch_eric/index.php on line 197

Any Ideas ?

Thanks for any help.

Eric
Reply With Quote
Sponsored Links
  #2  
Old 29th January 2009, 15:30
ErikCederstrand ErikCederstrand is offline
Junior Member
 
Join Date: Dec 2008
Location: Copenhagen, Denmark
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default RE: can't get the Talking SOAP With Exchange to work

Hi Eric

The user bosco here on this site had the same. We mailed back and forth and concluded it was a SOAP XML-generation issue but I don't know if he found a solution.

Erik
Reply With Quote
The Following User Says Thank You to ErikCederstrand For This Useful Post:
eescudier (30th January 2009)
  #3  
Old 30th January 2009, 10:25
eescudier eescudier is offline
Junior Member
 
Join Date: Jan 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Could you tell us wich platform (OS version and PHP version) you used for your HOWTO ?
Maybe this way it will be easier for me to get it to work.

Thanks in advance

Eric
Reply With Quote
  #4  
Old 1st February 2009, 01:31
ErikCederstrand ErikCederstrand is offline
Junior Member
 
Join Date: Dec 2008
Location: Copenhagen, Denmark
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default RE: can't get the Talking SOAP With Exchange to work

I'm running on FreeBSD 7.1 with PHP 5.2.8 with SOAP and CURL extensions.
Reply With Quote
  #5  
Old 2nd February 2009, 14:37
eescudier eescudier is offline
Junior Member
 
Join Date: Jan 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Unbuntu 8.10

Quote:
Originally Posted by ErikCederstrand View Post
I'm running on FreeBSD 7.1 with PHP 5.2.8 with SOAP and CURL extensions.
I installed a Ubuntu 8.10 server vith PHP 5.2.6, SOAP and CURL extensions and everything works fine...

Thanks for your help.

Eric
Reply With Quote
  #6  
Old 2nd February 2009, 15:03
ErikCederstrand ErikCederstrand is offline
Junior Member
 
Join Date: Dec 2008
Location: Copenhagen, Denmark
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: can't get the Talking SOAP With Exchange to work

I'm glad to hear that. I've had some other replies to the howto, but you're the first user I've heard about who actually got it to work :-)
Reply With Quote
  #7  
Old 13th February 2009, 17:56
jmclen jmclen is offline
Junior Member
 
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default This may help

If you followed the instructions like me and got this problem it is probably due to an authentication issue. The reason everything else doesn't work is because the first 2 commands are simply reading your local xml file.

In my case, I had a test exchange server that did not have a valid certificate.
In the NTLMSoapClient class, I had to add:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);


and again in the createBuffer function in the NTLMStream class I had to add:

curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, false);

Obviously in a production environment you want valid certificates, but maybe this will help you out.
Reply With Quote
  #8  
Old 17th February 2009, 06:20
eoasis eoasis is offline
Junior Member
 
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using work-around throws error

Trying the work-around where Services.wsdl is stored locally and the

<wsdl:service name="ExchangeServices">

is added. Also messages.xsd and types.xsd are stored locally.

I'm getting this error:

PHP Fatal error: SOAP-ERROR: Parsing Schema: can't import schema from '/home/ews/messages.xsd'
Reply With Quote
  #9  
Old 18th February 2009, 21:35
eoasis eoasis is offline
Junior Member
 
Join Date: Dec 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exchange 2007 SOAP PHP examples working

I switched to ubuntu server 8.10, upgraded to PHP 5.2.8, did an apt-get upgrade php-soap, and upgraded curl to version 7.18.2

Here are the steps I followed after upgrading:
  1. I grabbed the Services.wsdl, Types.xsd, and Messages.xsd directly from the exchange server and placed them locally.
  2. Added the "ExchangeServiceBinding" to the Services.wsdl file per Erik Cerstand's excellent original post.
  3. Renamed the Services.wsdl, Types.xsd, and Messages.xsd to all lower case so they could be found.

I can get all the examples working from Erik's excellent blog post.

However, I believe there is some kind of a PHP-SOAP parsing error because when trying to do a "CreateItem" for e-mail, I'm unable to properly specify both the <Body> tag and it's attribute <Body BodyType="Text"> in PHP so that the parser formats it correctly.

Has anyone gotten "CreateItem" for e-mail to work? Can you post the PHP example code?

And Thanks! Erik for the original example!
Reply With Quote
  #10  
Old 21st February 2009, 01:44
jmclen jmclen is offline
Junior Member
 
Join Date: Feb 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default UpdateItem

I've gotten just about everything else to work except UpdateItem. Has anyone gotten this working?
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 14:33
Exchange beating Postfix to the punch dwygant Installation/Configuration 4 22nd April 2009 22:21
Enable SOAP help trcinc1 Installation/Configuration 0 3rd July 2008 19:01
Postfix integration with Exchange Server vinu Server Operation 3 25th June 2008 21:43
Postfix & Exchange random.guy Server Operation 1 25th May 2006 14:51


All times are GMT +2. The time now is 04:30.


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