Hi there,
i tried expose some class methods to WSService.
class TestService
{
public function __construct()
{
}
/**
* @param string $name
* (xs:string)
* @return string $return
* (xs:string)
*/
public static function helloworld($name)
{
$res = 'HALLO '.$name. ' ;
return array('return' => $res);
}
}
$operations = array("hello"=>"helloworld");
$opParams = array("helloworld"=>"MIXED");
$actions = array("http://www.test.net/hello" => "hello");
$classes = array("TestService"=>array( "operations" =>$operations, "actions"=>$actions, "opParams"=>$opParams));
$srv = new WSService(array("bindingStyle"=>"doclit",
"policy" => $policy,
"securityToken" => $security_token,
"serviceName" => "TestWebservice",
"classes" => $classes));
This gives me the following error, while calling the operation hello from a client.
[Wed May 21 13:04:36 2008] [error] rampart_engine.c(266) [rampart][rampart_engine] Operation is NULL.
[Wed May 21 13:04:36 2008] [error] rampart_engine.c(84) [rampart][rampart_engine] Policy creation failed.
[Wed May 21 13:04:36 2008] [error] rampart_in_handler.c(113) [rampart][rampart_in_handler] ramaprt_context creation failed.
Without a classmap and the method helloworld not capsuled in the TestService class it works correct.
$srv = new WSService(array("operations"=>$operations,
"bindingStyle"=>"doclit",
"opParams"=>$opParams,
"policy" => $policy,
"securityToken" => $security_token,
"serviceName" => "TestWebservice",
"actions" => $actions));
-> no errors
Any idea what's wrong here?