Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Receiving XML over HTTP POST using ASP

Posted on 2006-11-23
12
Medium Priority
?
1,554 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
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 

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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

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
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
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 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.
Suggested Courses

610 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