Wednesday 16 April 2008 8:57:21 am
Hello, i installed eZ publish 4.0.0 and i try to use a soap client with. So i created an extension/module inspired by "Building an eZ publish 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 eZ publish and soap and i don't know what i'm doing wrong. Someone can help me ? Thank you.
|