WSDL File Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
PatelNehal
Forum Newbie
Posts: 21
Joined: Mon Mar 23, 2009 7:27 am
Location: Gujarat, India

WSDL File Problem

Post by PatelNehal »

Code: Select all

class DomOrderHelper
{
    var $serviceObj;
    var $requestedMethod;
    
    var $returnValue;
    var $result;
    
    function DomOrderHelper()
    {
            $this->serviceObj = new DomOrder($_SERVER['DOCUMENT_ROOT'] . "Testing5/PHP_DomainKIT/lib/wsdl/DomOrder.wsdl");
            $this->requestedMethod = $_POST['functionRequest'];
    }
    
    function getResultFromAPI()
    {
        include("constants.php");
        if($requestedMethod == "getDetails")
        {
            $orderId = $_POST['orderId'];
            $option = getVectorFromString($_POST['option']);
 
            $returnValue = $serviceObj->getDetails($SERVICE_USERNAME, $SERVICE_PASSWORD, $SERVICE_ROLE, $SERVICE_LANGPREF, $SERVICE_PARENTID, $orderId, $option);
            $this->returnValue = $returnValue;
        }   
               elseif($this->requestedMethod == "checkAvailabilityMultiple")
        {
            $domainNames = getArrayFromString2($_POST['domainNames']);
            
//          var_dump($_POST['domainNames']);
            $tlds = $_POST['tlds'];
            $suggestAlternative = 'TRUE';
 
            $returnValue = $this->serviceObj->checkAvailabilityMultiple($SERVICE_USERNAME, $SERVICE_PASSWORD, $SERVICE_ROLE, $SERVICE_LANGPREF, $SERVICE_PARENTID, $domainNames, $tlds, $suggestAlternative);
            
            $this->returnValue = $returnValue;
        }
       }
}
This code is working fine and returning result in array,but i have many other function to call from the API so i divided all IF condition in different function. Implemented version is :

Code: Select all

    class DomOrder
    {
        var $serviceObj;
        var $wsdlFileName;
        function DomOrder($wsdlFileName="wsdl/DomOrder.wsdl")
        {
            $this->wsdlFileName = $wsdlFileName;
            $this->serviceObj = new soapclient_nusoap($this->wsdlFileName,"wsdl");
        }
        function getDetails(
            $SERVICE_USERNAME, $SERVICE_PASSWORD, $SERVICE_ROLE, $SERVICE_LANGPREF, $SERVICE_PARENTID, $orderId, $option)
        {
            $return = $this->serviceObj->call("getDetails",array($SERVICE_USERNAME, $SERVICE_PASSWORD, $SERVICE_ROLE, $SERVICE_LANGPREF, $SERVICE_PARENTID, $orderId, $option));
            debugfunction($this->serviceObj);
            return $return;
        }
        function checkAvailabilityMultiple(
            $SERVICE_USERNAME, $SERVICE_PASSWORD, $SERVICE_ROLE, $SERVICE_LANGPREF, $SERVICE_PARENTID, $domainNames, $tlds, $suggestAlternative)
        {
            $return = $this->serviceObj->call("checkAvailabilityMultiple",array($SERVICE_USERNAME, $SERVICE_PASSWORD, $SERVICE_ROLE, $SERVICE_LANGPREF, $SERVICE_PARENTID, $domainNames, $tlds, $suggestAlternative));
            debugfunction($this->serviceObj);
            echo "<PRE>Return Value:";
            var_dump($return);
            print_r($this->serviceObj);
            echo "</PRE>";            
            return $return;
        }
Now when i m printing the serviceObj it is returing but not result :
soapclient_nusoap Object
(
[username] =>
[password] =>
[requestHeaders] =>
[responseHeaders] =>
[endpoint] =>
[error_str] => no transport found, or selected transport is not yet supported!
.............
The [endpoint] should be like this
but it is blank.
Someone please help me why it is not returning result and the
User avatar
mikemike
Forum Contributor
Posts: 355
Joined: Sun May 24, 2009 5:37 pm
Location: Chester, UK

Re: WSDL File Problem

Post by mikemike »

Can I just note that sending private messages to all users who are currently online and asking for their help in this post is not likely to get you help, instead it'll get you ignored by the most active members.
Post Reply