473,396 Members | 1,743 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,396 software developers and data experts.

Newbie Help

I am so new to ASP I'm not sure I am breathing. A company one of my clients deals with provides information over the web. They provided the ASP code for a default web site that is used to communicate with them and I have installed it and coded a VB6 app to provide the interface. Here is the problem. The ASP gets an error "Exception occurred" message. When I respond to the error, the returned XML is not received. Also, the ASP stops via the debugger at the statement and stops the whole process. The guys who supplied the code don't know why and they have been less than helpful. Here is the complete code for the ASP:

<%
'& Response.Write("version 1.0.1" & vbcrlf)
Server.ScriptTimeout = 60000
Dim xmlDoc
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.preserveWhiteSpace = TRUE

IF len(Request("XML") & "" ) > 0 THEN ''*** Error occurs here ***"
' Validate the XML String
xmlDoc.loadXML(Request("XML"))
ELSE
' Validate the XML String
xmlDoc.load(Request)
END IF

IF xmlDoc.parsed THEN
' Send Valid XML to Processor
Dim NodeName
Set xNode = xmlDoc.firstChild
IF NOT xNode IS NOTHING THEN
NodeName = xNode.nodename
IF ucase(xNode.nodename) = "XML" THEN
Set xNode = xNode.NextSibling
END IF
END IF

IF NOT xNode IS NOTHING THEN
NodeName = xNode.nodename
SELECT CASE xNode.nodename
CASE "OrderStatusResponse"
Dim objFSO, intX, fname
set objFSO = Nothing
Set objFSO = CreateObject("Scripting.FileSystemObject")
intX = 0
Do
intX = intX + 1
fname = ("E:\dac\report_received_" & Cstr(intX) & ".xml")
Loop Until objFSO.FileExists(fname) = False
IF Request.TotalBytes > 0 then
Const ForAppending = 8
Set objTextFile = objFSO.OpenTextFile(fname, ForAppending, True)
objTextFile.WriteLine(xmlDoc.xml)
END IF
objTextFile.Close
Response.Write "<XML><Status>ACCEPTED</Status></XML>"
CASE ELSE
Response.Write "<OrderStatusResponse>"
Response.Write "<ErrorDescription>"
Response.Write "<Element>XML Root</Element>"
Response.Write "<Description>ERROR - INVALID TRANSACTION</Description>"
Response.Write "<Code>Posting CSD System - default.asp: Invalid Transaction</Code>"
Response.Write "<Help>Valid transactions are OrderStatusResponse or XML. Contact IT for Help.</Help>"
Response.Write "</ErrorDescription>"
Response.Write "</OrderStatusResponse>"
END SELECT
END IF
ELSE

' Return an Error
Response.Write "<OrderStatusResponse>"
Response.Write "<ErrorDescription>"
Response.Write "<Element>XML</Element><br>"
Response.Write "<Description>XML String could not be parsed:" & xmlDoc.parseError & "</Description><br>"
Response.Write "<Code>Posting CSD System - default.asp: XML not Valid</Code><br>"
Response.Write "<Help>Make sure all tags match and are of the same case.</Help><br>"
Response.Write "</ErrorDescription>"
Response.Write "</OrderStatusResponse>"
Response.Write "<ErrorDescription>"
Response.Write "<Element>XML</Element>"
Response.Write "<Description>XML String could not be parsed:" & xmlDoc.parseError & "</Description>"
Response.Write "<Code>Customer to USIS-CSD System - default.asp: XML not Valid</Code>"
Response.Write "<Help>Make sure all tags match and are of the same case.</Help>"
Response.Write "</ErrorDescription>"
Response.Write "</OrderStatusResponse>"
END IF
%>


Any ideas?????
Jun 7 '07 #1
1 1422
danp129
323 Expert 256MB
Don't have any idea. Does this cause the error too?
Expand|Select|Wrap|Line Numbers
  1. s=Request("XML")
Jun 8 '07 #2

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

Similar topics

0
by: igmox | last post by:
hi, i am a complete newbie and got stuck. my question is about costumers and prices Customer_ID CustomerName CustomerType 1 John 2 2 Joe ...
0
by: bradvanwick | last post by:
I've got URLs that look like: www.mysite.com/template.php?id=pagetitle www.mysite.com/template.php?id=folder/pagetitle I want the URLs to look like: www.mysite.com/pagetitle...
23
by: Gunnerman6875 | last post by:
Hi everyone, Well I'm a newbie to Access and your site so forgive me if my terminology is a little out. I'm currently trying to create what i thought would be a simple database for work. I'm in...
3
by: R69D | last post by:
Hi, I'm real new to Java and need some help...was going through some old tutorials and need help with these questions: 1)What is “composition of methods?” How do u define the composition of...
5
by: yoyoz | last post by:
Help!!!! i am newbie to php, i was trying to establish the connection to another machine (solaris) so that i can retrieve data from the database stored inside there using my own PC. for your...
1
by: uberboyz | last post by:
hi all! i am new to this forum! trying to get some help here. i want to validate 2 users before proceeding to the next function. i have no idea of how to do it, but i tried using the login function...
11
by: itgetsharder | last post by:
can anyone help me? code errors! -------------------------------------------------------------------------------- im creating a code for a printer. the question i am trying to answer is : ...
3
by: lrheeza | last post by:
Hello, i am a newbie at ms access, please help this is a code i created to be able to get the multiple users i have selected in the form. i was able to select the users in the form an select...
2
by: r_ahimsa_m | last post by:
Could you recommend me some free JavaScript validator? I was using JSlint but it reports nonsense errors. Please help. Thanks. /RAM/
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.