Solved

Receiving XML over HTTP POST using ASP

Posted on 2006-11-23
12
1,549 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
  • 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Read about why website design really matters in today's demanding market.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

823 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