Forum Discussion
Hi Alex,
Thank you for your answer, now I used the code generated by test complete with the "Code" button and got the following:
function ArrayOfProgrammeMemberActivity()
{
var Result;
var TypeFactory;
//Get the type factory for the web service
TypeFactory = WebServices.MemberWebService.TypeFactory;
Result = TypeFactory.ArrayOfProgrammeMemberActivity;
//Generating the array property. Choose the lower and upper array bounds that meet your needs
Result.ProgrammeMemberActivity = BuiltIn.CreateVariantArray(0, 10);
var i;
for(i = BuiltIn.VarArrayLowBound(Result.ProgrammeMemberActivity, 1); i <= BuiltIn.VarArrayHighBound(Result.ProgrammeMemberActivity, 1); i++)
{
Result.ProgrammeMemberActivity(i) = TypeFactory.ProgrammeMemberActivity;
Result.ProgrammeMemberActivity(i).PmaType = "";
Result.ProgrammeMemberActivity(i).Merged = "";
Result.ProgrammeMemberActivity(i).Cancelled = "";
Result.ProgrammeMemberActivity(i).RecordLocator = "";
}
return Result;
}
This was generated by test complete but I still get an array with "undefined" entries, the example I posted at the begging was an example based on this code, sorry if I didnt post it to begin with. I hope this helps you out more Alex in uderstanding the issue. I attach an image of what test complete gives me as a result when I run this code.
Hi,
As I said, it's not easy to provide you with the actual code without having either the service wsdl file or the contents of the WebServices subfolder of TestComplete project, but the general approach is:
-- you create the request. This gives you the request object and its parameters (first level);
-- if some of the first-level parameters are complex ones, then you must create and initialize their structure and assign the structure to the parameter.
You might consider the sample from the <Users>\Public\Documents\TestComplete 11 Smaples\Common\Web Service Testing folder and adopt it to your case .
Related Content
- 7 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 6 days ago