Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to XMLHTTP a client XML string to server ASP
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
01066797
Message ID:
01067079
Views:
26
This message has been marked as the solution to the initial question of the thread.
An article on just this very topic, Terry - it would be helpful if you would start doing your own research.
>http://p2p.wrox.com/topic.asp?TOPIC_ID=4016
>
>PS - You better star me for this.

You think you're so smart. How gracious of you to rip your hand from the nail to google up that link. I spent hours trying to get it to work - you know - my little VFP PRG xml sender to an ASP web service project that would break down the xml for the text body of an email? You remember my little issue with the the limitations of a URL and that something with a little more capacity, like an xml, would be a useable alternative? You know the stuff I was begging for. Well as it turns out, plus signs (+) don't work in ASP, you have to use ampersandssssss. So here, FYI, are the two components.

A VFP PRG that sends an XML String to an ASP:
lcXML=[<?xml version="1.0"?><rows><row>Mr. East Coast</row>];
     +[<row>Terry_at_MyISP.com</row>];
     +[<row>1010 Retentive Ln</row><row>Arlington, VA 10069</row>];
     +[<row>202.737.0002</row></rows>]
*!*The XML File would look like this
*!*  <?xml version="1.0"?>
*!*    <rows>
*!*       <row>Mr. East Coast</row>
*!*       <row>Terry_at_MyISP.com</row>
*!*       <row>1010 Retentive Ln</row>
*!*       <row>Arlington, VA 10069</row>
*!*       <row>202.737.0002</row>
*!*   </rows>
lcURL=[http://www.MyISP.com/ReceiveXML.asp]
oHTTP=NewOBJECT("MSXML2.XMLHTTP")
oHTTP.open([POST],lcURL,.f.)
oHttp.setRequestHeader("Content-Type", "text/xml")
oHttp.send(lcXML)
oHTTP.abort
And an ASP structured to receive it:
'ReceiveXML.ASP
dim oXML
set oXML = Server.CreateObject("Msxml2.DOMDocument")
oXML.async = false
oXML.resolveExternals = false
oXML.load(Request)
cBody="/r"
dim oItems
set oItems=oXML.Childnodes(1).Childnodes 'Rows Node
for i = 0 to oItems.length-1
cBody = cBody & oItems.item(i).text & "/r"
next 
So I hope your happy with yourself Mr. "Save me and why don't you do your own research" guy. Sheeesh!
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform