XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 29th, 2003, 01:05 PM
ranjankumar17 ranjankumar17 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 57 ranjankumar17 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Unhappy Xmlhttp

Hi,

I have a directory which contains some XML files. These XML files need to be posted to a webservice.

The code I have now is a simple HTML page with a Javascript function which uploads the file.

What I want to do is write an application which finds all the XML files in that directory and then post these files to the webservice. After posting successfully, it will then read the response and if successful it will move these XML files to an archive directory.

Is it possible using a C# windows application to do this.

The code I have is:

function SendRS.onclick() {

var xmlstream = new ActiveXObject("ADODB.Stream");
var mypath = filename.value;
var myport = portname.value;

xmlstream.Mode = 3;
xmlstream.Open();
xmlstream.Type = 1;

xmlstream.LoadFromFile(mypath);

divOutputRequest.innerText = xmlstream.Size;

var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.Open("POST",myport,false);
xmlhttp.setRequestHeader("Content-Length",xmlstream.Size);
xmlhttp.setRequestHeader("Content-Type","text/xml");

xmlhttp.send(xmlstream.Read(xmlstream.Size));

divOutputResponse.innerText = xmlhttp.responseText;

}

Can anybody share his experience.

Thanks,

Ranjan.
__________________
Ranjan Kumar

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Xmlhttp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway