Solved

Receiving XML over HTTP POST using ASP

Posted on 2006-11-23
12
1,547 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
 

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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now