Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2005, 01:49 PM
Registered User
 
Join Date: Apr 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error in sending XML file to server

Hi..This is my problem. I have 2 servers Server A running on Windows NT and Server B running on Windows 2003. I need to send an XML file from the servers to another upstream server, which shall parse the XML and return data which i shall write to another file and perform certain database operations. My problem is this. My VB program works perfectly when i run it on Server A(Windows NT) and i get response from the upstream server properly and iam able to write the file and perform db operations. The same code does not work on Windows 2003 server.

Here is the code i have in place(Its VB)

Set x = 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...."
    
        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

If h.readyState <> 4 Then
moErrorLogger.LogInformation "Server not responding"

Here GetTimeBeforePost,GetTimeBeforePostNew,moResponseT ime are variables and have been assigned values. I am saving the URL in the DB and getting it in sURL. Iam using msxml3 with Service pack 4

I never seem to get a readystate value 4. Its always 1. Any ideas ????

Also do i need IIS to be running on Server B(Windows 2003) and any other configurational settings needed ??

Please help.

Regards





Similar Threads
Thread Thread Starter Forum Replies Last Post
Import a XML file into SQL Server tables Cha BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 April 1st, 2008 09:54 PM
how to send xml file from server to client samarjit_mishra XML 1 January 27th, 2007 09:22 AM
Error in Sending XMl file to Server r_arvindk2000 XML 0 April 8th, 2005 01:52 PM
URGENT!!! Sending file to server in browser kengyiam Beginning PHP 4 September 19th, 2003 02:19 PM
Help sending XML file to server, reading response bradartigue XML 1 September 5th, 2003 07:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.