nishay_patel
12 years agoOccasional Contributor
Web Service returns an array of objects
I am using a web service in which a method returns an array of custom objects.
Example:
Method Name - GetProducts
Input - String
Output - ProductType[]
where ProductType is an object type that is defined in the web service (just a collection of strings).
My problem is after i parse the response returned from the web service, I have no idea how to access this object. I am working in Jscript, so I know I need to convert the array from a VB safe array to a Jscript array, but what is the syntax for doing this?
var ResponseXml = XmlHttpRequest.responseXML;
var response = webservice.ParseResponse("GetProducts", ResponseXml);
The "response" object should contain a reference to the array of ProductTypes. Now, how do I go about accessing the array from the response?
var array = (new VBArray(________?______).toArray();
Thanks in advance
Example:
Method Name - GetProducts
Input - String
Output - ProductType[]
where ProductType is an object type that is defined in the web service (just a collection of strings).
My problem is after i parse the response returned from the web service, I have no idea how to access this object. I am working in Jscript, so I know I need to convert the array from a VB safe array to a Jscript array, but what is the syntax for doing this?
var ResponseXml = XmlHttpRequest.responseXML;
var response = webservice.ParseResponse("GetProducts", ResponseXml);
The "response" object should contain a reference to the array of ProductTypes. Now, how do I go about accessing the array from the response?
var array = (new VBArray(________?______).toArray();
Thanks in advance