cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1289
Views
2
Helpful
7
Replies

AXL 11.5 AssociatedEndUser

nathan.vannay
Level 1
Level 1

Hi,

I would like to make a configuration for our user to can associated End User by a web page make in php.

I tried with this:

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

    array('trace'=>true,

        'exceptions'=>true,

        'location'=>"https://".$AxlServerIP.":8443/axl",

        'login'=>$AxlServerLogin,

        'password'=>$AxlServerPass

    ));

    $updateResponse = $client->UpdatePhone(

        array(

            'name' => $phoneNameMacAddress,

            'description' => "Test",

            'lines' => array(

                'line' => array(

                    'index' => $lineIndex,

                    'dirn' => array('pattern' => '8888'),

                    'display' => "Test",

                    'displayAscii' => "Test",

                    'label' => "test",

                    'associatedEndusers' => array(

                        'enduser' => array(

                            'userId'=> $user

                           ))))));


But with this, it seems that all the update for the line is not working. The display, the displayAscii and the label is not changing. And also the associatedEndusers.

Someone have did it ?

7 Replies 7

AXLSoap - XDirn

element XDirn/routePartitionName minOccurs="1"

So

'dirn' => array('pattern' => '0213140363', 'routePartitionName' => 'Some_Partition'),

Hi Vlad,

Thanks for this answer.

I try to add the route PartitionName, but it change nothing.

It is the same, like the lines parameter is not taken.

Do you have an idee ?

I test this code, its working.


$updateResponse = $cilent->UpdatePhone(

        array(

            'name' => 'SEP70F35AD20454',

            'description' => "Nathan Test",

            'lines' => array(

                'line' => array(

                    'index' => '1',

                    'dirn' => array('pattern' => '8887', 'routePartitionName' => 'Internal' ),

                    'display' => "Nathan Test",

                    'displayAscii' => "Test",

                    'label' => "test",

                    'associatedEndusers' => array(

                        'enduser' => array(

                            'userId'=> 'ptest'

                           ))))));


may be you have some wrong param...

nathan.vannay
Level 1
Level 1

Thanks for this information.

I try to put all of this configuration in a clean page to be sur and add all the param directly like you, but it still not working.

With which version did you do the test?

I try with a 11.5.1.11900-26 and 11.5.1.13900-52

But all is the same

11.5.1.12900-21

Do you check connection?

var_dump($client);

Do you check result UpdatePhone?

var_dump($updateResponse);


How do you run your code? http or console php? Have you receive any error on log/console?

The connexion is fine.

When I check the result, The lines parameter is not present.

I try with an addLines instead of the Lines and now it works.

Do you have any idea why?

$updateResponse = $cilent->UpdatePhone(

        array(

            'name' => 'SEP70F35AD20454',

            'description' => "Nathan Test",

            'addLines' => array(

                'line' => array(

                    'index' => '1',

                    'dirn' => array('pattern' => '8887', 'routePartitionName' => 'Internal' ),

                    'display' => "Nathan Test",

                    'displayAscii' => "Test",

                    'label' => "test",

                    'associatedEndusers' => array(

                        'enduser' => array(

                            'userId'=> 'ptest'

                           ))))));

I believe this is probably due to a bug/limitation in SoapClient, which does not provide correct handling for 'choice' type sub-elements in a request.  Note <updatePhone> includes the option of using a <lines> object _or_ <addLines>/<removeLines>.  However if only specifying the <lines> object (as in your sample), SoapClient infers that <addLines> and <removeLines> will be null, but _doesn't_ consider them as 'not specified' and so fails to parse and create the <lines> element.

See this bug report: https://github.com/wsdl2phpgenerator/wsdl2phpgenerator/issues/277

You may need to use another PHP SOAP framework, or simply generate the full XML document string yourself and send it via HTTP.

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: