Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behavior of Microsoft.XMLHTTP
Message
From
25/10/2001 01:16:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
Strange behavior of Microsoft.XMLHTTP
Miscellaneous
Thread ID:
00573044
Message ID:
00573044
Views:
45
I have found a strange behavior of Microsoft.XMLHTTP under a Web Service. Some of my methods are calling this method. This method queries a transaction to the other server. It can either receive an XML or a string. So, this is why I am checking for EMPTY(loXML.XML). If it is, I am returning the error message. Otherwise, the XML is returned.
FUNCTION GetData(tcQuery as String) as string
LOCAL loHttp,loXML
loHTTP=CREATEOBJECT('Microsoft.XMLHTTP')
loHTTP.Open('GET','http://...',.F.)
loHTTP.Send()

* Directly get an XMLDOM object
loXML=loHTTP.ResponseXML

* Check for error
IF EMPTY(loXML.XML)
   RETURN loHTTP.ResponseBody
ENDIF
If I do this from the client, it'll work. When it is not an XML, I am receiving the error message ok. However, having the same code on a Web Service will make the returned string of loHTTP.ResponseBody to be encrypted. I have to do this to avoid that.
* Check for error
IF EMPTY(loXML.XML)
   RETURN ''+loHTTP.ResponseBody
ENDIF
Why is that?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform