473,386 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Posting an XML document to another server using ASP

I am having a problem with data that is being posted to another
server. The problem is I collect the data from our database through
an .cfm file (and all data is correct), which then the data is saved
to an .xml document and posted to another server though an .asp file.
The problem is the other server is either not receiving the data (it
says it exports without an problems on our end) or it is not receiving
the data correctly. The only thing I have is our .cfm file and
our .asp file. Is there a way to see what is being sent before it is
posted to their server? Can I save the .xml document on our server?
Would I have to change or rewrite all of the code? Right now the .asp
file opens the sql, performs the select statement, saves it to xmldoc,
then post it to the other server (postURL) which is an .asp file on
their server.

example of code:
<%@ Language=VBScript Transaction=Required %>
<%Option Explicit

function GetDBConnection()
dim tmp
set tmp = server.CreateObject("ADODB.Connection")
tmp.Open OHGetConnectionString()
set GetDBConnection = tmp
end function

function OHGetConnectionString()
OHGetConnectionString = "DSN=<server>;UID=<username>;PWD=<password>"
end function

dim dbConn, objSession, xmlDoc, postObj, postURL

set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
set postObj = Server.CreateObject("Microsoft.XMLHTTP")
set dbConn = GetDBConnection()

'URL to post XML data to
postURL = "https://www2.theirserver.com/dataexchange/
xmlclientdataimport.asp?uid=<username>&pwd=<passwo rd>"

dim sql, rs, returnHTML
set rs = server.createobject("ADODB.Recordset")
'Data extraction could be from a VIEW with the name of the basetable
we look for
sql = "SELECT * FROM ourdatatable"
rs.Open sql, dbConn, 3, 3
rs.save xmlDoc, 1
rs.close

postObj.open "POST", postURL, false
postObj.send xmlDoc.xml
set rs = nothing

returnHTML = postObj.responseText
'check results to see if STATUS=OK
response.write returnHTML

set postObj = nothing
%>

Mar 7 '07 #1
0 2610

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Daniel | last post by:
Ah, new question =) (Well, half-new, I asked something similar a while ago, but disregarded the question myself) Is there any way to post data to Javascript in a new page without using a form...
3
by: Itai | last post by:
I have an aspx file named index.aspx which contains two ‘form' sections, one that has the runat=server attribute (e.g From1) and one which is a regular HTML form (e.g SignInForm). I am trying...
9
by: Denise | last post by:
I have posted a similar message in 2 other forums but got no response. I have spent more hours than I can count researching this. Can anyone provide some insight...? Our ASP.Net application...
2
by: Esa | last post by:
Hi, I'm having problems with one strange web system where submitting an application and making queries about its handling status require a series of form submits and response parsing - all in...
5
by: Lis | last post by:
Hi, I have inconsistent behavior of document() function which I hope someone can explain. I have Windows Service (runs as LocalSystem) that perform some Xslt transformation. In the stylesheet...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
1
by: TheDude5B | last post by:
Hi, I have the following code which accesses an XML document and then displays the document using XSL....
2
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - What do I have to do before posting to clj?...
14
by: Tom Cole | last post by:
I have a rather complicated business application that uses Ajax. Part of this form requires uploading documents, which I cannot do using Ajax, so I post the form to an IFrame. This part works just...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.