Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange behavior of Microsoft.XMLHTTP
Message
De
25/10/2001 01:16:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Titre:
Strange behavior of Microsoft.XMLHTTP
Divers
Thread ID:
00573044
Message ID:
00573044
Vues:
44
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform