Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Location
    Atlanta, GA
    Posts
    171
    Thanks
    5
    Thanked 0 Times in 0 Posts

    SoapFault exception

    I am new to PHP and web services, so this may be a simple nothing to some of you, but I would really appreciate the help.
    What am I doing wrong in this script?

    Code:
    <?php
                 ini_set('display_errors','1');
    	error_reporting (E_ALL);
    
        $GetUserName = new SoapClient("http://idm.east.dev.cox.net/idmwebservices/CoxIdentityServices?wsdl");
    
        $account = array("GetAllAccountInfoAcctNbr" => "6111027582601");
        $username_r = $GetUserName->username($account); <= line 11
        $userId_r   = $GetUserName->userId($account);
    
        echo "<br>Account: $account";
        echo "<br>User Name: $username_r";
        echo "<br>User ID: $userId_r";
    
     ?>
    Here is the message:

    Fatal error: Uncaught SoapFault exception: [Client] Function ("username") is not a valid method for this service in /www/zendcore/htdocs/cox/GetAccountInfo.php:11 Stack trace: #0 [internal function]: SoapClient->__call('username', Array) #1 /www/zendcore/htdocs/cox/GetAccountInfo.php(11): SoapClient->username(Array) #2 {main} thrown in /www/zendcore/htdocs/cox/GetAccountInfo.php on line 11

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    The error is straightforward - $GetUserName->username() is not defined. Consult the API documentation to for the correct function to use.
    Are you a Help Vampire?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •