Absent Member.. Absent Member..
Absent Member..
491 views

How ot get big XML responce from web servicet (QTP, POST request)

Hello All,

 

Have a next code:

 

Set HTTP = CreateObject("MSXML2.XMLHTTP")
    request
="URL"
    HTTP
.Open "POST", (request), False
    HTTP
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
   
'HTTP.setRequestHeader "Content-Type", "text/xml"
    HTTP.send("recordName=some parameters")
    set response=HTTP.responseXML

 

The question is: When responce is not so big, Im able to get xml DOM object

set response=HTTP.responseXML

But if this response is bigger that some amount, the HTTP.responseXML object is empty. The same behaviour could be seen for GET request. Is there any other objects that could be used instead of XMLHTTP? Will really appreciate, if somebody could help with that.

 

Solved. add .xml to "some URL" helped

 

Tags (1)
0 Likes
1 Reply
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Checking HTTP.readyState == 4 will help too, incase you are doing for asynchronous webservice.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.