Page 1 of 1

WSDL File Problem

Posted: Fri Jun 12, 2009 9:47 am
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

Re: WSDL File Problem

Posted: Fri Jun 12, 2009 10:33 am
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.