This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

ckWebServicePlugin and empty parameters

Ask help about existing plugins, or find advice about the way to build up your own.

ckWebServicePlugin and empty parameters

by RookFrank » Wed Jan 15, 2014 2:39 pm


I work with symfony 1.4. and ckWebServicePlugin.

My service works perfectly

However I have problems with functionals tests.
My web service receives a request with empty parameters.

My service:
Code: Select all
    * MyService.
    * @WSMethod(name='MyService', webservice='myAppSOAPI')
    * @WSHeader(name='AuthHeader', type='AuthData')
         * @param string  $param1      parameter number 1
    * @return ResultMyService
   public function executeMyService($request) {

      $param1 = $request->getParameter('param1'   , '');
      $message ='$param1 = '.$param1 ;
      $this->result = new ResultMyService( '1', 'Test', $message);

Code: Select all
  //ResultMonService  :
  public function __construct($id, $name, $message)
    $this->id =  $id;
    $this->name     =  $name;
    $this->message    = $message;

My functional test :
Code: Select all
$app   = 'myAPi';
$debug = true;

ini_set('display_errors', '1');

$authData = new ClientAuthData('xxx', 'xxx');

$param1  = 'plop';


$c = new ckTestSoapClient($options);
$c ->addRequestHeader('AuthHeaderElement', $authData)

$result = $c->getResult();

Test my service returns a fault because $param1 is empty.
$result var_dump:

Code: Select all
  string(9) "$param1 ="

I don't understand why ...

I did this manipulation :

But it doesn't work better.

I have an error message probably related to my problem :

Code: Select all
PHP Strict Standards:  Declaration of ckTestSoapClient::__doRequest() should be compatible with SoapClient::__doRequest($request, $location, $action, $version, $one_way = NULL) in /xxxxxxx/plugins/ckWebServicePlugin/lib/test/ckTestSoapClient.class.php on line 506

anybody can help me ?
Junior Member
Posts: 2
Joined: Wed Jan 15, 2014 2:35 pm