473,395 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,395 software developers and data experts.

how to retrieve xml data from a remote server

1
I have a simple form that i need to post some data to...

A customer will enter an upgrade id into a form on my server (SERVER-A) and I need to post that form to SERVER-B

Here is my url that I need to hit
https://SERVER-B.COM/webservice/upgrade/v1/registration.php?region=WSTSWPU8&upgid=F0A0B0L250V T&upgpkgid=A2T0DGYTERD0&mode=0

If I load the SERVER-B url into a browser on it's own it will return this...

<response>
<code>609</code>
</response>

I need to grab/manipulate the <code> tag.

I am savy with asp but have not used xml all that much. As I understand it now I cannot use xmlhttp request to get data from an outside server or a server other than my own.

I'm stuck with something that must have been dealt to by someone smarter than I.
Thanks
Sep 16 '08 #1
2 3534
jhardman
3,406 Expert 2GB
try this:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
  3. objHTTP.Open "GET", "http://www.mysite.com", false
  4. objHTTP.Send
  5. Response.Write objHTTP.ResponseText
  6. %>
let me know if this helps.

Jared
Sep 18 '08 #2
You can also use the WinHttpRequest object to retrieve the data from SERVER-B but then I guess you will be stuck with the same problem that I currently have (see http://bytes.com/forum/thread836732.html).

The WinHttpRequest object works a bit like the msxml2 object:

Expand|Select|Wrap|Line Numbers
  1. <%set objWinHttp = Server.createObject("WinHttp.WinHttpRequest.5.1")
  2. objWinHttp.open "POST", SERVER-B-URL
  3. content = FORM-DATA
  4. call objWinHttp.setRequestHeader("Content-type", "Content-type: application/x-www-form-urlencoded")
  5. call objWinHttp.setRequestHeader("Content-length", len(content))
  6. objWinHttp.send(content)
  7. %>
  8.  
Then you can get the response from the property objWinHttp.responseText

From there on I'm stuck with the xml/html-DOM manipulation server-side, therefore I will keep an eye on this thread :)

/KalleMOD
Sep 23 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: serge calderara | last post by:
Dear all, I have a tool which is able to receive any kind of data from a remote system. For that I need to get the ipadress of the remote system. If the system is not connected to a DHCP...
3
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no...
10
by: _(d)IEGO | last post by:
Hello everyone. I need help regarding the following: Given the following table: CREATE TABLE T1 (C1 nvarchar(10), C2 money) INSERT INTO T1 VALUES ('A',1) INSERT INTO T1 VALUES ('B',2) INSERT...
5
by: ggk517 | last post by:
We are trying to develop an Engineering application using PHP, Javascript with Informix as the back-end. Is it possible to retrieve data using Javascript but by accessing the Database. Say...
0
by: acwomble | last post by:
I am working with a database on another system via a ssh tunnel using plink. We have setup an alias the local system for the remote database. I am able to connect and work from within Visual...
7
by: D. Patrick | last post by:
I need to duplicate the functionality of a java applet, and how it connects to a remote server. But, I don't have the protocol information or the java source code which was written years ago. ...
6
by: Senthil | last post by:
Hi All We are having a VB application on SQL. But we need to collect information from persons who will be offline to verify data and insert new data. Generally they will be entering the data in...
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
2
by: Martin Zugec | last post by:
Heya, googling\liveing around, but I found no results - any ideas how to retrieve timestamp of remote file (http\ftp)??? Idea is to build auto update utility that could (based on timestamps)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.