Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6135621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:30:06+00:00 2026-05-23T17:30:06+00:00

When trying to instantiate my nuSoap method authenticateUser , it says: Fatal error: Uncaught

  • 0

When trying to instantiate my nuSoap method authenticateUser, it says:

Fatal error: Uncaught SoapFault exception: [Client] Function (“authenticateUser”) is not a valid method for this service in /Applications/MAMP/htdocs/projo/dev/home.php:14

But when I replace that method name for one that already works, everything works just fine. So I think the instantiation syntax isn’t wrong.

/*-----------
Authenticate User
------------*/
$server->register(
    // method name
    'authenticateUser',

    // input parameters
    array('sessionUserName' => 'xsd:string', 'sessionHash' => 'xsd:string', 'user' => 'xsd:string', 'pass' => 'xsd:string'),        

    // output parameters
    array('return' => 'xsd:string'),

    // namespace
    $namespace,

    // soapaction
    $namespace . '#authenticateUser',

    // style
    'rpc',

    // use
    'encoded',

    // documentation
    'authenticates a user and returns a json array of the user info'
);

function authenticateUser($sessionUserName, $sessionHash, $user, $pass)
{
    //Check to see if a countryCode was provided
    if ($sessionUserName != '' && $sessionHash != '' && $user == $GLOBALS['wsUser'] && $pass == $GLOBALS['wsPass'])
    {

        $suid = 'AUTH'.$GLOBALS['guid'].'SESSION';


        $database   = new SQLDatabase();
        $database->openConnection();
        $database->selectDb();

        //Query
        $sql    = "SELECT * FROM members WHERE member_email='" . $sessionUserName . "' LIMIT 1";

        //Query MySQL
        $return = $database->query($sql);
        $userDetails = $database->fetch_array( $return );



        if(!empty($userDetails)) {
            $userDetails[0]['authSession'] = $suid;
            $newArr = $userDetails[0];
            $response = json_encode($newArr);
        }

        /*print $sql.'<br /><pre>';
        print_r($response);
        echo '</pre>';*/

        //Throw SQL Errors
        if (!mysql_query($sql))
        {
                die('Error: ' . mysql_error());
        }

        //Return on Success
        return $response;   

        //Close Connection
        mysql_close($con);
    }
    else
    {
        return 'Error: You must supply all of the inputs!x';
    }
}

There are two things I can think of that would cause this error:

  1. More likely: my registration of the function is somehow incorrect, even though the wsdl gui shows that the function is registered correctly and I’ve been able to successfully consume the method via the SoapUI program.

  2. Less likely: somehow, the function isn’t broken anymore, but its cached and so I’m seeing an old error.

The Question: When trying to consume this soap service method via PHP, why do I get an output error stating that this function doesn’t exist in the service, when it clearly is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:30:06+00:00Added an answer on May 23, 2026 at 5:30 pm

    Set

    ini_set("soap.wsdl_cache_enabled", "0"); 
    

    In every file you use soap from, or set wsdl_cache_enabled
    to 0 in your php.ini file.

    [soap]
    ; Enables or disables WSDL caching feature.
    soap.wsdl_cache_enabled=0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get a fatal error when trying to instantiate a Model in Magento and
trying to instantiate a Query in SubSonic using the below method (as it apparently
I'm trying to instantiate a class using the Constructor.newInstance() method but am running into
I'm trying to instantiate a generic class in Spring, but I get following exception:
I'm trying to figure out how to instantiate a case class object with reflection.
I'm trying to create a class that can instantiate arrays at runtime by giving
Title: Eclipse plug-in development Unable to instantiate class due to java.lang.NoClassDefFoundError: Trying to build
I'm trying to instantiate a class within a class, so that the outer class
I'm trying to load a .NET assembly with Reflection (using the Assembly.LoadFrom method), and
I'm trying to load an assembly, instantiate a class from that assembly, and then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.