cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2909
Views
0
Helpful
1
Replies

PHP SoapClient error in returnedTags property for list methods

Petr Kriz
Level 1
Level 1

Hello,

by the following example I was able to implement reading 1 record in PHP:

https://developer.cisco.com/site/collaboration/management/axl/learn/how-to/use-the-axl-wsdl-with-php.gsp

I can't read any lists (in the example below listPhone) where I end with Fatal error: Uncaught SoapFault exception.

Is there somewhere an example please? I not found it, for completeness, I attach a piece of code with error.

Using:

System version: 9.1.2.10000-28

Used AXL WSDL version: http://www.cisco.com/AXL/API/9.1

Example:

<h1>List of phones</h1>

<?php

    $client = new SoapClient("AXLAPI.wsdl",

        array('trace'=>true,

       'exceptions'=>true,

       'location'=>"https://HostName:8443/axl",

       'login'=>'*************',

       'password'=>'**************',

    ));

   

    // [437] => ListPhoneRes listPhone(ListPhoneReq $axlParams)

    //

    // echo '<pre>';

    // print_r($client->__getFunctions());

    // echo '<pre>';

   

    // I try different array and multi-array combinations

    $response = $client->listPhone(

        array("searchCriteria"=>

            array("name"=>"%")

        )

    );

   

    echo '<pre>';

    print_r($response->phone);

    echo '</pre>';

   

    // Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'returnedTags'

    // property in /var/www/Test.php:59 Stack trace: #0 /var/www/Test.php(59):

    // SoapClient->__call('listPhone', Array) #1 /var/www/Test.php(59): SoapClient->listPhone(Array)

    // #2 {main} thrown in /var/www/Test.php on line 59

?>

Thank you and best regards,

Peter

1 Reply 1

tinghche
Level 5
Level 5

Hi Peter,

You need to add the returnedTags as part of request.

The request should look like this

$response = $client->listPhone(

        array("searchCriteria"=>

            array("name"=>"%"),

           "returnedTags" =>

            array("name"=>"", "model"=>"", "callingSearchSpaceName"=>"")

        )

);

    echo '<pre>';

    print_r($response->return->phone);

    echo '</pre>';

Hope this help

Howard

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: