Search code examples
phpweb-servicesnusoap

Can I redirect/alias one web service call to another?


I've written a simple PHP nusoap web service for an application and wish to change the name of one of the actions so that it makes more sense. However there is a CD-ROM based application in the wild using this web service and this action and so I need to redirect or alias any incoming requests to the new action... any idea how I might go about doing this?


Solution

  • I'm assuming by action you mean a function, why not something as simple as.

    function oldName($a, $b)
    {
        return newName($a, $b);
    }
    
    function newName($a, $b)
    {
        // do something
        return $a + $b;
    }
    

    Seems like a quick and easy solution.