Dalibor Andzakovic
2008-01-25 00:28:51 UTC
Hi All,
I Have a problem running consuming SCA exposed as a webservice. If i
create a SCA client based on a local file i get expected behaviour,
however if i create it based on generated WSDL i get
SDO_UnsupportedOperationException: createDocument - cannot find
element.
Any tips would be greatly appreciated.
Following code works:
$weather = SCA::getService('servicetest4.php');
var_dump($weather->sayHello('dali'));
Following doesn't :-(
$weather = SCA::getService('http://localhost/ihug/servicetest4.php?
wsdl', 'soap', array('location' => 'http://localhost/ihug'));
var_dump($weather->sayHello('dali'));
below is the complete servicetest.php
<?php
require_once 'SCA/SCA.php';
/**
* SCA SOAP test
*
* @service
* @binding.soap
*
* @types http://Weather Temperatures.xsd
*/
class servicetest4 {
/**
* Class constructor
*
*/
public function __construct()
{
// Some Constructor
}
/**
* Say Hello to Somebody
* @param string $who
* @return string
*/
public function sayHello($who)
{
return "Hello $who";
}
/**
* Something to return an object
*
* @param string $foo
* @return Temperatures http://Weather
*/
public function returnObject($foo)
{
$Temperatures = SCA::createDataObject('http://Weather',
'Temperatures');
$Pair = $Temperatures->createDataObject('entry');
$Pair->state = 'CA';
$Pair->temperature = 65;
$Pair = $Temperatures->createDataObject('entry');
$Pair->state = 'UT';
$Pair->temperature = 105;
$Pair = $Temperatures->createDataObject('entry');
$Pair->state = 'ND';
$Pair->temperature = -20;
return $Temperatures;
}
private function doSomething()
{
// Some Private Method
}
}
?>
I Have a problem running consuming SCA exposed as a webservice. If i
create a SCA client based on a local file i get expected behaviour,
however if i create it based on generated WSDL i get
SDO_UnsupportedOperationException: createDocument - cannot find
element.
Any tips would be greatly appreciated.
Following code works:
$weather = SCA::getService('servicetest4.php');
var_dump($weather->sayHello('dali'));
Following doesn't :-(
$weather = SCA::getService('http://localhost/ihug/servicetest4.php?
wsdl', 'soap', array('location' => 'http://localhost/ihug'));
var_dump($weather->sayHello('dali'));
below is the complete servicetest.php
<?php
require_once 'SCA/SCA.php';
/**
* SCA SOAP test
*
* @service
* @binding.soap
*
* @types http://Weather Temperatures.xsd
*/
class servicetest4 {
/**
* Class constructor
*
*/
public function __construct()
{
// Some Constructor
}
/**
* Say Hello to Somebody
* @param string $who
* @return string
*/
public function sayHello($who)
{
return "Hello $who";
}
/**
* Something to return an object
*
* @param string $foo
* @return Temperatures http://Weather
*/
public function returnObject($foo)
{
$Temperatures = SCA::createDataObject('http://Weather',
'Temperatures');
$Pair = $Temperatures->createDataObject('entry');
$Pair->state = 'CA';
$Pair->temperature = 65;
$Pair = $Temperatures->createDataObject('entry');
$Pair->state = 'UT';
$Pair->temperature = 105;
$Pair = $Temperatures->createDataObject('entry');
$Pair->state = 'ND';
$Pair->temperature = -20;
return $Temperatures;
}
private function doSomething()
{
// Some Private Method
}
}
?>