Published on WSO2 Oxygen Tank (http://wso2.org)

actions parameter not working for classmaps?

By skraft2
Created 2008-05-21 03:46

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?


Source URL:
http://wso2.org/forum/thread/3620