Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


XML Posting

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,2475
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> XML Posting
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 XML Posting - 3/25/2005 5:41:24 AM   
  zrocool97

 

Posts: 4
Score: 0
Joined: 3/23/2005
From:
Status: offline
I am attempting to post an XML file to a webserver. The url for posting is https: ..... .jsp. Does anyone have an idea on how to write this in vbscript? Help.
 
 
Post #: 1
 
 Re: XML Posting - 3/25/2005 9:24:59 AM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
what do you mean by "post"? using a web form to upload it or via ftp?

(in reply to zrocool97)
 
 
Post #: 2
 
 Re: XML Posting - 3/25/2005 10:04:48 AM   
  zrocool97

 

Posts: 4
Score: 0
Joined: 3/23/2005
From:
Status: offline
Currently, I am attempting to use the HTTP Request object to call on a "POST" function (class) to take an XML file and upload it to web server url. Here's the script so far:

Dim HttpRequest, PostUrl, XmlDocument, Loaded, FileName

PostUrl = "https://cobra.sat.rackspace.com:8443/rtsaudit/upload/index.jsp"
FileName = "c:\Metrics.xml"

Set XmlDocument = WScript.CreateObject("Msxml2.DOMDocument.3.0")
XmlDocument.async = False
Loaded = XmlDocument.load(FileName)
If Loaded Then
Set HttpRequest = WScript.CreateObject("Msxml2.XMLHTTP.3.0")
HttpRequest.open "POST", PostUrl, false
HttpRequest.send XmlDocument
' If (HttpRequest.status = 200) Then
' succesful POST
' process response here e.g.
' WScript.Echo HttpRequest.responseXML.xml
' Else
' handle HTTP error here
' WScript.Echo "Error: " & HttpRequest.status & " "
'HttpRequest.statusText
' End If
End If


During debug of the script, I received an error right at the "HttpRequest.send XmlDocument" line. The error msg:

msxml3.dll: The download of the specified resource has failed

Now, i'm attempting to troubleshoot this issue. I was hoping that someone would have a script that has been "tried and true" to post an XML file to an uploading url which is HTTPS: ..........

Transport wiil be through HTTP on an intranet.

Thanx for the help.

(in reply to zrocool97)
 
 
Post #: 3
 
 Re: XML Posting - 3/25/2005 6:06:29 PM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
you might be having a cert problem with the ssl

references:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q304420
http://www.codecomments.com/Dot_Net_XML/message419755.html

(in reply to zrocool97)
 
 
Post #: 4
 
 Re: XML Posting - 3/27/2005 2:39:42 PM   
  zrocool97

 

Posts: 4
Score: 0
Joined: 3/23/2005
From:
Status: offline
I read the references but they were no help. Sorry.

Could i create a Const of the user credentials for the https url and plug that into the script?

(in reply to zrocool97)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> XML Posting Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts