2008年9月10日星期三

RE: [fw-webservices] Exchange web services and Zend framework

I have actually already done that...

I don't know if I can post it here, but it's not an extension of the
Zend_SOAP but of the PHP SOAP command's.


Alex (Shurf) Frenkel
CTO / Internet Division
Phone:
+972 (4) 8308110
Fax:
+972 (4) 8201196
E-mail:
alex_f@reutone.com
Web:
www.reutone.com


-----Original Message-----
From: Andrew Sledge [mailto:andrew.j.sledge@gmail.com]
Sent: Wednesday, September 10, 2008 2:42 PM
To: Alex Frenkel
Cc: fw-webservices@lists.zend.com
Subject: Re: [fw-webservices] Exchange web services and Zend framework

It is using NTLM, as I found out after sending this post. I hate the
thought of having to create a wrapper or extend the class for
something that seems as trivial as this but it needs to be done. As
soon as I have something, I will post it here.

On Wed, Sep 10, 2008 at 2:20 AM, Alex Frenkel <alex_f@reutone.com>
wrote:
> If Zend Soap build on Php Soap then php Soap does not know how to work
> with NTLM authentication...
>
> I hope it does not the case, and I hope I will be pointed wrong, but
> with PHP SOAP function's I had to rewrite all of the HTTP wrapper and
> the SOAP Constructor to make it work.
>
>
> Alex (Shurf) Frenkel
> CTO / Internet Division
> Phone:
> +972 (4) 8308110
> Fax:
> +972 (4) 8201196
> E-mail:
> alex_f@reutone.com
> Web:
> www.reutone.com
>
>
>
>
> -----Original Message-----
> From: Andrew Sledge [mailto:andrew.j.sledge@gmail.com]
> Sent: Wednesday, September 10, 2008 12:34 AM
> To: fw-webservices@lists.zend.com
> Subject: [fw-webservices] Exchange web services and Zend framework
>
> Has anyone gotten Zend_Soap_Client to work with MS Exchange web
> services?
>
> I have been using references from
>
http://tp.its.yale.edu/confluence/display/EXCH/Introduction+to+MS+Exchan
> ge+Web+Services+via+Java(JAXWS)
> and http://msdn.microsoft.com/en-us/library/bb204119.aspx for
> information, but I am clearly missing some key pieces.
>
> I have downloaded the WSDL files to my local box. I then added the
> service definistion as suggested in the former URL as:
>
> <wsdl:service name="ExchangeServices">
> <wsdl:port name="ExchangeServicePort"
> binding="tns:ExchangeServiceBinding">
> <soap:address
> location="https://owacasserver.mydomain.com/EWS/Exchange.asmx" />
> </wsdl:port>
> </wsdl:service>
>
> The exact error I get is:
>
> Fatal error: Uncaught SoapFault exception: [HTTP] Unauthorized in
> /web/applications/modules/home/controllers/IndexController.php:18
> Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml
> version="...', 'https://owa.gpc...', 'http://schemas....', 1, 0) #1
> [internal function]: SoapClient->__call('FindItem', Array) #2
> /web/applications/modules/home/controllers/IndexController.php(18):
> SoapClient->FindItem(10) #3
> /web/library/Zend/Controller/Action.php(502):
> IndexController->indexAction() #4
> /web/library/Zend/Controller/Dispatcher/Standard.php(293):
> Zend_Controller_Action->dispatch('indexAction') #5
> /web/library/Zend/Controller/Front.php(946):
>
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Req
> uest_Http),
> Object(Zend_Controller_Response_Http)) #6 /web/htdocs/index.php5(62):
> Zend_Controller_Front->dispatch() #7 {main in
> /web/applications/modules/home/controllers/IndexController.php on line
> 18
>
> My code is as follows:
>
> <?php
>
> require_once('Zend/Loader.php');
> Zend_Loader::LoadClass('Zend_Soap_Client');
>
> class IndexController extends Zend_Controller_Action
> {
>
> public function indexAction()
> {
> $this->view->headTitle('Home');
> $soapclient = new
> SoapClient("/web/applications/modules/home/controllers/Services.wsdl",
> array('compression' => SOAP_COMPRESSION_ACCEPT,
> 'login'=>'myusername','password'=>'mypassword'));
> $result = $soapclient->FindItem();
> print_r($result);
>
> }
>
> }
>
> ?>
>
> I am passing my user name and password, so it doesn't make any sense
> to get an unauthorized error. Does anyone have any ideas? Thanks in
> advance.
>
> --
> Andrew Sledge
>

--
Andrew Sledge

没有评论: