Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 27th, 2012, 01:41 PM
Registered User
Points: 14, Level: 1
Points: 14, Level: 1 Points: 14, Level: 1 Points: 14, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help How to receive an XML request. HELP!

I write code everyday using standard HTML & classic ASP. I have been asked to build a small API which will use our ASP/html platform and MS SQL DB. I have no trouble dealing with the ASP/SQL, HTML etc. I can even write the XML requests to query our servers and write the XML responses. But I have no idea where to start in setting up a service to "listen" for inbound XML requests. I have prepared about a dozen request/response routines, but do not know how to code the page that receives that request. Can anyone out there offfer a hand?

One of our methods/functions for them to request is a simple Category List request. I can make the request just fine, It is just that I do not know how to receive the request at server and parse in order to use my own response routine.

I have made a sample request below, I just need to know how to handle the web service page to receive this request and respond with the data. I am already committed with my web application to Classic ASP. Any help would be greatly appreciated. Please see below. It may be as simple as a few line, but I have not seen anywhere I've searched.



REQUEST:
<code>
<%
'Request ******

WAGconnect = "http://www....."
set xmldom = server.CreateObject("Microsoft.XMLDOM")
set xmlhttp = server.CreateObject("Microsoft.XMLHTTP")

xmlhttp.open "POST", WAGconnect, false
xmlhttp.setRequestHeader "Man", POST & " " & WAGconnect & " HTTP/1.1"
xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlhttp.setRequestHeader "SOAPAction", "http://www.MyDomainConnection...."

StrSoap = StrSoap & "<?xml version=""1.0"" encoding=""utf-8""?>"
StrSoap = StrSoap & "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"
StrSoap = StrSoap & "<soap:Body>"
StrSoap = StrSoap & "<Get_Categories>"
StrSoap = StrSoap & "<Authentication>"
StrSoap = StrSoap & "<UserID>"&UserID&"</UserID>"
StrSoap = StrSoap & "<Password>"&Password&"</Password>"
StrSoap = StrSoap & "</Authentication>"
StrSoap = StrSoap & "<DealerInfo>"
StrSoap = StrSoap & "<DealerID>"&DealerID&"</DealerID>"
StrSoap = StrSoap & "<StoreID>"&StoreID&"</StoreID>"
StrSoap = StrSoap & "</DealerInfo>"
StrSoap = StrSoap & "<CatInfo>"
StrSoap = StrSoap & "<Dept>"&Dept&"</Dept>"
StrSoap = StrSoap & "</CatInfo>"
StrSoap = StrSoap & "</Get_Categories>"
StrSoap = StrSoap & "</soap:Body>"
StrSoap = StrSoap & "</soap:Envelope>"

WAGRequest = StrSoap

xmlhttp.send(WAGRequest)

%>

</code>



*********
NEED HELP HERE !

The problem is HERE. not knowing how to listen for and receive the above request at my server. Ive never done it before so I do not know what to look for.
*********



RESPONSE
<code>
<%
' Response ******
StrSoap = StrSoap & "<?xml version=""1.0"" encoding=""utf-8"" ?>"
StrSoap = StrSoap & "<soapenv:Envelope xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/"">"
StrSoap = StrSoap & "<soap:Body>"
StrSoap = StrSoap & "<Get_Categories xmlns=""urn:externalwsdl"">"
StrSoap = StrSoap & "<Result-Code>"&ResultCode&"</Result-Code>"
StrSoap = StrSoap & "<CatCount>"&CatCount&"</CatCount>"
StrSoap = StrSoap & "<Category>"
StrSoap = StrSoap & "<CatName>"&CatName&"</CatName>"
StrSoap = StrSoap & "<CatDesc>"&CatDesc&"</CatDesc>"
StrSoap = StrSoap & "<CatPic>"&CatPic&"</CatPic>"
StrSoap = StrSoap & "<CatMemo>"&CatMemo&"</CatMemo>"
StrSoap = StrSoap & "</Category>"
StrSoap = StrSoap & "</Get_Categories>"
StrSoap = StrSoap & "</soapenv:Body>"
StrSoap = StrSoap & "</soapenv:Envelope>"
responseTxt = StrSoap
%>
</code>


Any helkp you could offer would great.

thanks much
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make user send and receive friends request? Stiward BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 0 August 15th, 2011 05:27 PM
Send and Receive XML content through browser kj875 ASP.NET 2.0 Basics 0 July 27th, 2007 01:10 AM
about XML receive by tomcatand XML parse by java taianmhzy Servlets 0 May 20th, 2004 02:59 AM
about XML receive ang XML parse by tomcat taianmhzy Apache Tomcat 0 May 20th, 2004 02:56 AM
not able to receive xml data unniml Classic ASP XML 0 January 30th, 2004 09:00 AM



All times are GMT -4. The time now is 06:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.