web service php help

Posted on 2007-07-24
Last Modified: 2012-08-14
hello there,

i have a php code which calls a web service.but the problem is it does not recognise the recognises other functions.
what could be the problem

Question by:zolf

    Author Comment


    Fatal error: Uncaught SoapFault exception: [Client] Function ("GetTargetServer") is not a valid method for this service in /usr/local/www/data-dist/testsoap3.php:14 Stack trace: #0 [internal function]: SoapClient->__call('GetTargetServer', Array) #1 /usr/local/www/data-dist/testsoap3.php(14): SoapClient->GetTargetServer(Array) #2 /usr/local/www/data-dist/theme.php(14): include('/usr/local/www/...') #3 {main} thrown in /usr/local/www/data-dist/testsoap3.php on line 14
    LVL 6

    Accepted Solution

    Given that we don't have your code....

    From the error, I'd check out what's going on in line 14, verify the function you're refrencing i spelled correctly and exists.

    Author Comment


    the wsdl displays the service when i paste the ws link in the browser.but when i use soap to display the functions it does not display the function.

    $UserName =  2122217214;
    $client = new SoapClient("");
    $UserNamepar = array ( UserName => $UserName);

    $getserID = $client->GetTargetServer($UserNamepar);
    $serverID = $getserID->GetTargetServerResult;
    //echo "TelCenter=$objectresult";
    echo "targetserver=$serverID;AccType=1;TelCenter=$telcenter";
    echo "<pre>";
    echo "</pre>";
    // Get the response
    $theXML= $client->response;
    // To see the response, uncomment the following lines

    echo "<pre>";
    echo "<xmp>".$theXML."</xmp>";
    echo "</pre>";

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Referer ID 5 28
    password_verify with prepared statements 10 26
    session variable - help 5 18
    phpMyAdmin simple sql statement 3 16
    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to dynamically set the form action using jQuery.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now