Forum Discussion

charles_1's avatar
charles_1
Occasional Contributor
12 years ago

Webservice Testing - setting up the correct Object type

Hi,



I am testing a webserivce which wants an input as an xmlDocType, I have the data in an XML file, but I have not been successfull in getting the webservice to accept the data.



I have tried using the file directly, using ReadWholeFile(), storing it as an xmlCheckpoint and other methods to extract the content and make into the correct type. Some methods have just given back a blank object.



From the Generated Code box for the relevant Type, I get the following:



function xmlDocType()

{

  var Result;

  var TypeFactory;

  //Get the type factory for the web service

  TypeFactory = WebServices.FundRaisingWebServices.TypeFactory;

  Result = TypeFactory.xmlDocType;

  return Result;

}



While the help file says I can copy this to my scipt unit and use it to make the correct object type, I have no idea how this would work.



Any suggestions on how to take the xml file and end up with the correct object type?



3 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Charles,


     


    I see that you are working with Allen from our Support team on a similar question. Please let us know whether you could sort out the question from this thread.


     

  • charles_1's avatar
    charles_1
    Occasional Contributor
    Tanya,



    The issue I am working with Allen on is related to a webservice reply and the format of that data, not creating the webservice request. The two issues are completely seperate.



    Any answer to the above would be very useful.



    Thanks
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Charles,



    I think that the referenced xmlDocType is a complex type parameter and it is not easy to advice something without seen either web service wsdl or what was generated by TestComplete (the contents of the <project>\WebServices\FundRaisingWebServices\ folder.

    Can you share somehow (post here or send privately) any of these?