php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52219 More useful return values for SoapClient::__getFunctions() / __getTypes()
Submitted: 2010-07-01 12:29 UTC Modified: -
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: php_bugs at m-h-it dot de Assigned:
Status: Open Package: SOAP related
PHP Version: 5.2.13 OS: irrelevant
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php_bugs at m-h-it dot de
New email:
PHP Version: OS:

 

 [2010-07-01 12:29 UTC] 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)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-01 12:31 UTC] php_bugs at m-h-it dot de
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'),
    )
  ),
...
)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC