10-16-2017 01:38 AM
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 ?
10-16-2017 09:27 PM
element XDirn/routePartitionName minOccurs="1"
So
'dirn' => array('pattern' => '0213140363', 'routePartitionName' => 'Some_Partition'),
10-17-2017 02:43 AM
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 ?
10-17-2017 03:19 AM
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...
10-17-2017 05:44 AM
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
10-17-2017 08:50 PM
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?
10-19-2017 12:00 AM
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'
))))));
10-19-2017 11:06 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide