Forums / Developer / Problem with soap in Exponential

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Problem with soap in Exponential

Author Message

Fabien Garnier

Wednesday 16 April 2008 8:57:21 am

Hello,
i installed Exponential 4.0.0 and i try to use a soap client with.

So i created an extension/module inspired by "Building an Exponential module" (eurofxref example) and here is the content of my my_extension\modules\my_extension\classes\test.php file :

<?php

require_once('lib/ezsoap/classes/ezsoapclient.php');

require_once('lib/ezsoap/classes/ezsoaprequest.php');

class TestSoap
{
   function fetchSOAP()
   {
       $result = '';

       $icao='ENRS';

       $client=new eZSOAPClient("live.capescience.com","/ccx/GlobalWeather?wsdl");

       $request=new eZSOAPRequest("getStation","GlobalWeather:StationInfo");

       $request->addParameter("station",$icao);

       $response = $client->send($request);

       if( $response->isFault() )
       {
         $result = 'ERREUR' ;

       } else {

         $result = $response->value() ;

         }

       return $result ;

   }
}

?>

I call the function in my my_extension\design\standard\templates\overview.tpl file with something like :

<h1>**************** TEST SOAP *****************</h1>
{let rates=fetch( 'testsoap', 'soap' )}

Value : {$rates}<br />

and i've got only :

**************** TEST SOAP *****************
Value :

on the display and no error.

I'm a beginner with both Exponential and soap and i don't know what i'm doing wrong.
Someone can help me ?

Thank you.

Maxime Thomas

Wednesday 16 April 2008 11:27:51 pm

Try to put this in your code, just befor $result :

eZDebug::writeDebug($result);

Then, enable the debug via admin interface. The line of debug will appear in purple color.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas