Edit report at http://bugs.php.net/bug.php?id=52219&edit=1

 ID:               52219
 Comment by:       php_bugs at m-h-it dot de
 Reported by:      php_bugs at m-h-it dot de
 Summary:          More useful return values for
                   SoapClient::__getFunctions() / __getTypes()
 Status:           Open
 Type:             Feature/Change Request
 Package:          SOAP related
 Operating System: irrelevant
 PHP Version:      5.2.13

 New Comment:

I'm sorry, i have typo in my suggestion. It should be:



array (

  array(

    'name'=>'loginCustomer',

    'returnType'=>'LoginCustomerResponse',

    'arguments'=>array(

      array('name'=>'loginCustomer','type'=>'LoginCustomer')

    )

  ),

  array(

    'name'=>'findCustomer',

    'returnType'=>'FindCustomerResponse',

    'arguments'=>array(

      array('name'=>'findCustomer','type'=>'FindCustomerResponse'),

    )

  ),

...

)


Previous Comments:
------------------------------------------------------------------------
[2010-07-01 12:29:29] php_bugs at m-h-it dot de

Description:
------------
SoapClient::__getFunctions() / SoapClient::__getTypes() now return both
an array 

of strings. Each string contains a function signature or a structure
description 

respectively. So it's hard to really use this information
programmatically. You 

have to parse the strings into something useful first. 



It would be more useful to get a nested array with all information from
the 

WSDL. For example __getFunctions() now delivers this:



array (

  0 => 'LoginCustomerResponse loginCustomer(LoginCustomer
$loginCustomer)',

  1 => 'FindCustomerResponse findCustomer(FindCustomer $findCustomer)',

  ...

)



it's easier to use this:



array (

  array(

    'name'=>'loginCustomer',

    'returnType'=>'LoginCustomerResponse',

    'arguments'=>array(

      array('name'=>'loginCustomer'),

      array('type'=>'LoginCustomer')

    )

  ),

  array(

    'name'=>'findCustomer',

    'returnType'=>'FindCustomerResponse',

    'arguments'=>array(

      array('name'=>'findCustomer'),

      array('type'=>'FindCustomerResponse')

    )

  ),

...

)



To keep BC i suggest to use default argument:



SoapClient::__getFunctions($asStrings=true) 

SoapClient::__getTypes($asStrings=true)



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52219&edit=1

Reply via email to