Results 1 to 4 of 4

Thread: Problem posting XML file to server

  1. #1
    Join Date
    May 2009
    Posts
    3,613

    Problem posting XML file to server

    I successfully posted an xml file to a server in order to achieve 2 files (one for the poster and the second for the receiver of the xml file. My problem lies in how to process the posted xml file inside the receiver file? Any help would be greatly appreciated.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Problem posting XML file to server

    If you want to create the XML while making the HTTP POST request, use the OpenWrite method of WebClient and then create an XmlTextWriter on the stream and write the XML as needed. You can try using a debugging tool like Fiddler if you are facing any problem.

  3. #3
    Join Date
    May 2008
    Posts
    685

    Re: Problem posting XML file to server

    With XMLHTTPRequest, you can post a generic HTTP request to a Web server and use XML to send and receive data. Two useful properties of XMLHTTPRequestare are the status and responseText. The status property returns the HTTP status from the page to which you send the XML Document Object Model (XMLDOM), and the responseText property gives you a textual representation of the response from the page.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Problem posting XML file to server

    Here is a simple example for your request:

    Code:
    Set x = CreateObject("MSXML2.DOMDocument")
    Set y = CreateObject("MSXML2.DOMDocument")
    Set z = CreateObject("MSXML2.DOMDocument")
    x.Load (App.Path & "\Request.xml")
    Set h = CreateObject("MSXML2.ServerXMLHTTP")
    
    While (Val(DateDiff("s", GetTimeBeforePost, Now)) <= moFinalResponseTime) And h.readyState <> 4
    moErrorLogger.LogInformation "Posting the Soap HTTP request...."
    'TCS Changes to catch the exception when the web server is down
    On Error Resume Next
    GetTimeBeforePostNew = Now
    h.Open "POST", sURL, True
    h.send x
    h.waitForResponse (moResponseTime)
    If h.readyState <> 4 Then
    'Waits for 10 min
    While Val(DateDiff("s", GetTimeBeforePostNew, Now)) <= moResponseTime
    Wend
    h.abort
    End If
    Wend

Similar Threads

  1. MSI K9N 570 v.1 is just not posting to monitor
    By KJo in forum Motherboard Processor & RAM
    Replies: 4
    Last Post: 20-03-2012, 03:49 PM
  2. Setup Apache Web Server and File Server on Windows
    By Rudra.J in forum Guides & Tutorials
    Replies: 1
    Last Post: 11-05-2011, 09:09 AM
  3. User cannot access file on file server Windows 2008
    By Wahab4 in forum Windows Server Help
    Replies: 3
    Last Post: 13-12-2010, 05:56 PM
  4. PS3 Media server AVI file problem
    By BANGER1987 in forum Video Games
    Replies: 1
    Last Post: 14-12-2009, 10:09 AM
  5. Job Posting
    By kcswitzer in forum Education Career and Job Discussions
    Replies: 2
    Last Post: 06-03-2009, 04:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,395,169.13924 seconds with 16 queries