Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 January 5th, 2007, 12:35 PM
Authorized User
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Default MSXML Object Required Error???

Ok, I am somewhat new to this object and am totally confused at this point, any help would be wonderful! I am using VBScript and ASP to attempt to parse an xml packet that was posted to my site from a number of various domains. The post from the other sites look like this:

xmlDoc = "<?xml version=""1.0"" encoding=""UTF-8""?>" & _
         "<PINGXB_REQUEST>"
             "<Lead_Metadata>" & _
                  "<LEAD_ID>12345678A</LEAD_ID>" & _
             ""</Lead_Metadata>" & _
         "</PINGXB_REQUEST>"

set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
xmlHttp.Open "POST", pingUrl, False
xmlhttp.setRequestHeader "Content-Type", "text/xml"
xmlHttp.Send xmlDoc

Simple and straight forward right? The pingUrl is the url to the below script and the xmlDoc is just a well formed xml string...

So in my page, I have the following in place to accept and parse (just showing 1 node here as an example but there are many single nodes to parse):

set xmlObj = Server.CreateObject("Msxml2.DomDocument.4.0")
xmlObj.async = False
xmlObj.validateOnParse = False
xmlObj.setProperty "ServerHTTPRequest", True
xmlObj.setProperty "SelectionLanguage","XPath"

bLoaded = xmlObj.load(Request)
If bLoaded Then
     set lead_id = xmlObj.selectSingleNode("//Lead_Metadata/LEAD_ID").text
Else
 'invalid xml error
End if

When this gets ran I get a "Object required" error?

PLEEEEEEEEEEASE, someone show me the way!

Thanks.

 
Old January 5th, 2007, 12:43 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I dont see where you are loading an XML Doc into the XML Object.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature





Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Required Error JeffGirard Access 5 October 2nd, 2009 08:09 AM
Object Required error voyeur Javascript 9 January 25th, 2008 11:50 AM
Object Required Error when using MoveNext idossa Classic ASP Databases 1 July 19th, 2006 10:56 AM
Object required error ?? hman SQL Server ASP 11 June 21st, 2004 10:59 AM
error....Object required: '' sassenach Classic ASP Databases 2 August 4th, 2003 03:27 PM





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