Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't

Version 1
    This document was generated from CDN thread

    Created by: Jason Rohm on 06-09-2011 09:10:58 PM
    I'm not sure if this is an AXL issue or a PHP/SOAP bug (probably the later) but..
     
    Running simple line add code:
     
    <?php
        $client = new SoapClient("AXLAPI.wsdl",
            array('trace'=>true,
                'exceptions'=>true,
                'location'=>"https://callmanager:8443/axl",
                'login'=>'adminUser',
                'password'=>'adminPwd',
            )
        );

        $response = $client->addLine(array("newLine"=>array(
            "pattern"=>'14795385',
            "routePartitionName"=>"Cluster DN Presence Allowed",
            "usage"=>"Device"
        )));
        echo $response;
    ?>
    I get the following error back:
     
    SOAP-ERROR: Encoding: object hasn't 'line' property
    Uncaught SoapFault exception:  SOAP-ERROR: Encoding: object hasn't 'line' property
    Stack trace:
    #0 [internal function]: SoapClient->__call('addLine', Array)
    #1 /var/www/html/axl/testit.php(17): SoapClient->addLine(Array)
    #2 {main}
      thrown in /var/www/html/axl/testit.php on line 17
     

    Subject: RE: Uncaught SoapFault exception:  SOAP-ERROR: Encoding: object has
    Replied by: Jason Rohm on 12-09-2011 01:27:53 AM
    Found my own issue yet again (is there anyone reading this forum or am I talking to myself? LOL)


    Working code is as follows:



    try {
    $isException = 0;
    #$response = $client->addLine(array("newLine"=>array("line"=>array(
    $response = $client->__soapCall("addLine", array("newLine"=>array("line"=>array(

    "pattern"=>"14795385",
    "routePartitionName"=>"Cluster DN Presence Allowed",
    "usage"=>"Device"
    ))));
    }


    Notice two things... first, I needed the extra array layer to create the "line" XML tag, which seemed obvious to me originally but...

    The commented line is the standard PHP SOAP call for the function. The commented line DOES NOT WORK even though the the two calls should be functionally IDENTICAL in terms of the XML created and the way the server sees them.

    I'm now 99.99% sure this is a PHP/SOAP bug. It only cost me 5 days of development time. FML.