Solved

Receiving XML over HTTP POST using ASP

Posted on 2006-11-23
12
1,551 Views
Last Modified: 2012-08-14
Ok I'm in new land here and need a hint to get me started. I'm setting up the ability to receive MMS messages on our blog system. The way the system works a ASP file on my server will receive a XML page via HTTP POST when an MMS is send to me.

But how does that work. How do I get the XML data into a variable in my ASP page so I can start processing it?
0
Comment
Question by:logicmedia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
12 Comments
 
LVL 2

Expert Comment

by:MSAIT
ID: 18001671
0
 
LVL 2

Expert Comment

by:MSAIT
ID: 18001681
THis will work if you already have an xml file created by your MMS app

0
 
LVL 5

Expert Comment

by:mrneilbarton
ID: 18007632
Is this the first time you have used XML with ASP?  

Do you have an example of the xml file that you can show us (copy and paste it so we can see it)?  I can then write you a simple script and an example to show you how to use xml.  It's quite straight forward once you get an understanding of it.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:logicmedia
ID: 18007967
No it's no my first time with XML and the problem is not processing the XML data - the problem is getting a hold of the XML data since it is not in a file but send to my .asp file through a HTTP POST.

I got this code from my provider:

Set objXML = Server.CreateObject("Microsoft.XMLDOM")

objXML.setProperty "ServerHTTPRequest", True
objXML.async = False

objXML.load(Request)


Can anyone shed some light on what that does?
0
 
LVL 5

Expert Comment

by:mrneilbarton
ID: 18008044
The following code would load the xml file into objXML which you can then access the data in the file.

<%
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False  
strFile = Server.MapPath("http://www.mobileproviders.com/mms.xml")
objXML.Load (strFile)
%>

You can use the above code to load the xml file and if you can send me an exmple of the xml i will give you code to extract the data from it.  Its easier to show you then explain it - honest.
0
 
LVL 5

Expert Comment

by:mrneilbarton
ID: 18008049
bugger, should not have server.mappath

<%
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False  
strFile = "http://www.mobileproviders.com/mms.xml"
objXML.Load (strFile)
%>
0
 

Author Comment

by:logicmedia
ID: 18008609
Again... I don't have my XML data in a file...
0
 
LVL 5

Expert Comment

by:mrneilbarton
ID: 18009036
OK, are they going to query one of your asp pages when ever you receive an MMS message or are you going to run the page on a shedule to query your mms inbox?
0
 

Author Comment

by:logicmedia
ID: 18011046
Yes excatly and the code that does the job is as posted earlier - received a test MMS last night and it worked...

Set objXML = Server.CreateObject("Microsoft.XMLDOM")

objXML.setProperty "ServerHTTPRequest", True
objXML.async = False

objXML.load(Request)

From there on I can process my XML data from the objXML as usual...

So that's the answer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18200099
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question