Forum Discussion

vinodtc's avatar
vinodtc
Contributor
14 years ago

Getting error while calling webservice methods as Object required

Hi,


I am using below wsdl to work with webservices. This ws is contains 3 methods (countryInforByIana, getIANAInfo, regionsInfoByIana). I could not able to work with any of mehods as it giving error. 


wsdl: http://www.mobilefish.com/services/web_service/countries.php?wsdl


For Method "countryInfoByIana", it is taking one input called "ianacode" and return a object of "CountryData". I have written below code and getting VBscript error as "object required for
country1 "


I have also tired with created a object of return class and catching returned value. But that is also failed.


Even I am unable to work with other methods too. Please provide me the code for work with other 2 mothods. I have also provided the WSDL file also.


code:


function countryinfo



       dim country1

       ainaid="in"

       ainaid=aqConvert.VarToStr(ainaid)

       set country1 = WebServices.MobileFish.countryInfoByIana(ainaid) 

       txt1= country1.countryname

       msgbox txt1

   

end function


Any kind of help should be appreciated.


Regards,


Vinod




  • Hello Vinod,


    We failed to reproduce the problem you describe. The WSDL document you provided is not available.


    To help us to reproduce the problem, could you please provide us with a WSDL we would be able to access to call the web service methods?




    Also, could you please obtain a response your tested web service generates when you call the problematic method? To obtain the response, please use the WebService.LastResponse method.




    For example, you can call the WebService.MobileFish.LastResponse.Save("C:\Response.xml") command in your script to obtain the response and save its content to an XML file:






    function countryinfo

      dim country1


      ainaid="in"


      ainaid=aqConvert.VarToStr(ainaid)


      ' Calls the countryInfoByIana method of the web service


      set country1 = WebServices.MobileFish.countryInfoByIana(ainaid)


      ' Obtains the web service response and saves the response content to an XML file 


      WebServices.MobileFish.LastResponse.Save("C:\Response.xml")





    end function



    Please post the content of the web service response here, or send it to our Support Team via the Contact Support web form (please give a link to this thread in the text of the query).









    Thanks in advance.