SOAP Server
We have a current site built in cake 1.2 and the client has requested that we build a SOAP server for them to use. I have never built one before (have queried plenty), so have no idea how long it would take. Has anyone any experience of this? Specifically, I need to know how long setting it up and writing the WDSL. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: SOAP Server
Welcome to the world of convoluted protocols, poor documentation and needless complications. Sound like fun, doesn't it :) I have sort-of built a SOAP server (two methods). It is very limited and only there because I had to have it. You might have guessed that SOAP is not my favorite protocol. I do have some general advice and experiences: • See if it can be done by something other than php. SOAP is not PHPs strongest point. Java loves it and even .net looks a lot more comfortable in the examples I have seen. • Read up on SOAP, a lot. I found that I initially understood very little and php-related info was scarse. • Make sure YOU write the WSDL and decide any namespaces and any other aspect of the API. (Conforming to some advanced Java-API was not easy for me) • Choose your weapon. PHP-SOAP, PEAR-SOAP, NuSOAP are the prime candidates. • NuSOAP is a popular library... try to avoid it since it is a dead project with limited documentation. I had to use it because I needed some of it's unique features (mime attachements). I can't say wether the other two are any better, though. PEAR-SOAP is not past 1.0 either and has no end user documentation. Looking like pain and suffering? There are good news too... For Cake there is WebServices Controller by RoSoft. It allows you to work abstracted one layer away from NuSOAP. Still a pain is the rear but a lot better than flying solo. If your needs are reasonable it will save you a world of trouble. Since I needed to conform to namespaces and other annoying details in headers and envelopes I ended up with a total hack. Part WebServices Controller and part dumping hard-coded xml-strings into NuSOAP... I think it works though. Goog luck, /Martin On Apr 29, 11:33 am, eagerterrier eagerterr...@gmail.com wrote: We have a current site built in cake 1.2 and the client has requested that we build a SOAP server for them to use. I have never built one before (have queried plenty), so have no idea how long it would take. Has anyone any experience of this? Specifically, I need to know how long setting it up and writing the WDSL. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: SOAP Server
you can throw ZF into vendors... http://framework.zend.com/manual/en/zend.soap.html On Apr 29, 11:33 am, eagerterrier eagerterr...@gmail.com wrote: We have a current site built in cake 1.2 and the client has requested that we build a SOAP server for them to use. I have never built one before (have queried plenty), so have no idea how long it would take. Has anyone any experience of this? Specifically, I need to know how long setting it up and writing the WDSL. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: SOAP Server
I agree with majna's comment, assuming the WebServices Controller from RoSoft does not work as expected/needed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: SOAP Server
Also, Mark Story has his own Web Service Behavior, although I believe it's using REST, not SOAP. Also, it's RosSoft, not RoSoft (http:// rossoft.wordpress.com/). I believe RosSoft's version is for CakePHP 1.1 however. For WSDL+SOAP requests, that still leaves using the Zend Framework as a vendor the best bet. On Apr 29, 12:07 pm, Brendon Kozlowski brendon...@hotmail.com wrote: I agree with majna's comment, assuming the WebServices Controller from RoSoft does not work as expected/needed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
SOAP server. Handle by controller.
I want to make SOAP service with WSDL generation like this http://bakery.cakephp.org/articles/view/a-component-to-help-creating-soap-services, but with handle by controller like this http://bakery.cakephp.org/articles/view/implementing-soap-on-cakephp. With authorization. app/controllers/components/soap.php ?php vendor('wshelper/lib/soap/IPReflectionClass.class'); vendor('wshelper/lib/soap/IPReflectionCommentParser.class'); vendor('wshelper/lib/soap/IPXMLSchema.class'); vendor('wshelper/lib/soap/IPReflectionMethod.class'); vendor('wshelper/lib/soap/WSDLStruct.class'); vendor('wshelper/lib/soap/WSDLException.class'); /** * Class SoapComponent * * Generate WSDL and handle SOAP calls */ class SoapComponent extends Component { var $params = array(); function initialize($controller) { $this-params = $controller-params; } /** * Get WSDL for specified model. * * @param string $modelClass : model name in camel case * @param string $serviceMethod : method of the controller that will handle SOAP calls */ function getWSDL($modelId, $serviceMethod = 'call') { $modelClass = $this-__getModelClass($modelId); $expireTime = '+1 year'; $cachePath = $modelClass . '.wsdl'; // Check cache if exist $wsdl = cache($cachePath, null, $expireTime); // If DEBUG 0, compare cache modified time to model file modified time if ((Configure::read() 0) (! is_null($wsdl))) { $cacheFile = CACHE . $cachePath; if (is_file($cacheFile)) { $modelMtime = filemtime($this- __getModelFile($modelId)); $cacheMtime = filemtime(CACHE . $cachePath); if ($modelMtime $cacheMtime) { $wsdl = null; } } } // Generate WSDL if not cached if (is_null($wsdl)) { App::import('Controller',array($modelClass)); $refl = new IPReflectionClass($this- __getFullNameClass($modelId)); $controllerName = $this-params['controller']; $serviceURL = Router::url(/$controllerName/ $serviceMethod, true); $wsdlStruct = new WSDLStruct('http:// schema.example.com', $serviceURL . '/' . $modelId, SOAP_RPC, SOAP_LITERAL); $wsdlStruct-setService($refl); try { $wsdl = $wsdlStruct-generateDocument(); // cache($cachePath, $wsdl, $expireTime); } catch (WSDLException $exception) { if (Configure::read() 0) { $exception-Display(); exit(); } else { return null; } } } return $wsdl; } /** * Handle SOAP service call * * @param string $modelId : underscore notation of the called model * without _service ending * @param string $wsdlMethod : method of the controller that will generate the WSDL */ function handle($modelId, $wsdlMethod = 'wsdl') { $modelClass = $this-__getModelClass($modelId); $wsdlCacheFile = CACHE . $modelClass . '.wsdl'; // Try to create cache file if not exists if (! is_file($wsdlCacheFile)) { $this-getWSDL($modelId); } if (is_file($wsdlCacheFile)) { $server = new SoapServer($wsdlCacheFile); } else { $controllerName = $this-params['controller']; $wsdlURL = Router::url(/$controllerName/$wsdlMethod, true); $server = new SoapServer($wsdlURL . '/' . $modelId); } //$server-setClass($modelClass.Controller); $server-setClass($controllerName.'Controller'); $server-handle(); } /** * Get model class for specified model id * * @access private * @return string : the model id */ function __getModelClass($modelId) { $inflector = new Inflector; return ($inflector-camelize($modelId) . 'service'); } function __getFullNameClass($modelId) { $inflector = new Inflector; return ($inflector-camelize($modelId) . 'serviceController'); } /** * Get model file for specified model id * * @access private * @return string : the filename */ function __getModelFile($modelId) { $modelDir = dirname(dirname(dirname(__FILE__))) . DS . 'controllers'; return $modelDir . DS . $modelId . '_controller.php'; } } ? app/controllers/service_controller.php ?php class ServiceController extends AppController { public $name = 'Service'; public $uses = array(); public $helpers = array(); public $components = array('Soap'); public function call() { CakeLog::write(LOG_DEBUG,'Begin
Yet another SOAP server implementation on CakePHP
Hi all, I just wrote down my example of SOAP server implementation on CakePHP. My idea is to create the SOAP handler and the WSDL in Controller, and create all method in the model. You may read it here: http://mykm.wordpress.com/2008/01/23/implementing-soap-server-on-cakephp Please give me some suggestions especially about how to make auto-create WSDL by scanning all methods in the model. Thanks. -- Regards, Ananda Putra --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
I have implemented it in my application, mail me I can send you the files. On Jul 16, 5:21 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: the domain ros-soft.net isn't valid now, therefore those classes mentioned in the blog aren't available for download. On Jul 13, 5:39 pm, francky06l [EMAIL PROTECTED] wrote: The Rossoft blog http://rossoft.wordpress.com/2006/02/17/web-services-in-cakephp-compl... On Jul 13, 4:16 pm, pigeon [EMAIL PROTECTED] wrote: thanks, i did try google cache but i couldnt retrieve the last file :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
Could someone put al that files in the Code-Snippets secition on the CAkeForge? Stef. On 16 Lug, 08:12, francky06l [EMAIL PROTECTED] wrote: I have implemented it in my application, mail me I can send you the files. On Jul 16, 5:21 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: the domain ros-soft.net isn't valid now, therefore those classes mentioned in the blog aren't available for download. On Jul 13, 5:39 pm, francky06l [EMAIL PROTECTED] wrote: The Rossoft blog http://rossoft.wordpress.com/2006/02/17/web-services-in-cakephp-compl... On Jul 13, 4:16 pm, pigeon [EMAIL PROTECTED] wrote: thanks, i did try google cache but i couldnt retrieve the last file :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
the domain ros-soft.net isn't valid now, therefore those classes mentioned in the blog aren't available for download. On Jul 13, 5:39 pm, francky06l [EMAIL PROTECTED] wrote: The Rossoft blog http://rossoft.wordpress.com/2006/02/17/web-services-in-cakephp-compl... On Jul 13, 4:16 pm, pigeon [EMAIL PROTECTED] wrote: thanks, i did try google cache but i couldnt retrieve the last file :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
The problem is that blog contains an old link to a class named web_services_controller.php from an external expired domain :( On Jul 13, 5:39 pm, francky06l [EMAIL PROTECTED] wrote: The Rossoft blog http://rossoft.wordpress.com/2006/02/17/web-services-in-cakephp-compl... On Jul 13, 4:16 pm, pigeon [EMAIL PROTECTED] wrote: thanks, i did try google cache but i couldnt retrieve the last file :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
thanks, i did try google cache but i couldnt retrieve the last file :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
The Rossoft blog http://rossoft.wordpress.com/2006/02/17/web-services-in-cakephp-complex-types/ On Jul 13, 4:16 pm, pigeon [EMAIL PROTECTED] wrote: thanks, i did try google cache but i couldnt retrieve the last file :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
Looks amazing , but i'm getting Your requested host www.ros-soft.net could not be resolved by DNS. when trying to follow the links for the source code. This is really pissing me off :) i've finally found a proper SOAP implementation (actually, nusoap hack which has been also driving me up the wall) and now the host is unavailable? thats just so me.. so me.. could someone please c/p the code or attach it to a reply? thanks! andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
Andrew, try here: http://tinyurl.com/ynvvpb On 09/07/07, pigeon [EMAIL PROTECTED] wrote: when trying to follow the links for the source code. This is really pissing me off :) i've finally found a proper SOAP implementation (actually, nusoap hack which has been also driving me up the wall) and now the host is unavailable? thats just so me.. so me.. could someone please c/p the code or attach it to a reply? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
There are three articles on implementing a SOAP server with Cake using Nusoap here: http://rossoft.wordpress.com/?s=nusoapsearchbutton=go%21 @John - how did you go about auth? Using the Nusoap approach above ended up creating a 40-char API key which has to be submitted and verified before a soap request can be returned. I am having trouble figuring out how to change the returned data package depending on whether the request was authorized or not though. Cheers, Ian On Jun 4, 11:58 pm, Greg [EMAIL PROTECTED] wrote: Great. Do you have any suggestions on where to start? Or, perhaps, any links to some good tutorials or examples? I have been googling for a while with no good results. Thanks. On Jun 4, 3:40 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On Jun 4, 2007, at 4:33 PM, Greg wrote: Does anyone know how to implement a SOAP server with cake? I'm currently working on an app with soap services. Works great. Still working on some basic auth issues, but on the whole its really nice to expose a controller action as a soap service. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
My question is, what's the big deal about SOAP? With google no longer offering it up as part of their API (except for legacy, and no doubt they eventually turn it off), and most services using REST - SOAP seems a bit dead in the water these days. I'd certainly like to see more about adding REST to my app. Tane On 6/4/07, Greg [EMAIL PROTECTED] wrote: Does anyone know how to implement a SOAP server with cake? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
Well sometimes external sender really wants to send request using Soap and not REST .. that;s the main reason. Using the Rossoft Nusoap implementation is very easy. On Jun 5, 9:25 am, Tane Piper [EMAIL PROTECTED] wrote: My question is, what's the big deal about SOAP? With google no longer offering it up as part of their API (except for legacy, and no doubt they eventually turn it off), and most services using REST - SOAP seems a bit dead in the water these days. I'd certainly like to see more about adding REST to my app. Tane On 6/4/07, Greg [EMAIL PROTECTED] wrote: Does anyone know how to implement a SOAP server with cake? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
On Jun 4, 2007, at 4:33 PM, Greg wrote: Does anyone know how to implement a SOAP server with cake? I'm currently working on an app with soap services. Works great. Still working on some basic auth issues, but on the whole its really nice to expose a controller action as a soap service. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: soap server
Great. Do you have any suggestions on where to start? Or, perhaps, any links to some good tutorials or examples? I have been googling for a while with no good results. Thanks. On Jun 4, 3:40 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On Jun 4, 2007, at 4:33 PM, Greg wrote: Does anyone know how to implement a SOAP server with cake? I'm currently working on an app with soap services. Works great. Still working on some basic auth issues, but on the whole its really nice to expose a controller action as a soap service. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---