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

Error reading xml document in Asp

Hello,

I've written a simple asp code that has to read an xml file from an
Asp.net webservice.
The code looks like:

set soapclient = Server.CreateObject("MSSOAP.SoapClient30")
soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit("http://webservice/Webservice.asmx?WSDL")
soapclient.ConnectorProperty("Timeout") = 120000
strXML = soapclient.GetModellen("4", "2001", "3")

set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async=false
xmlDoc.loadXML(strXML)

When executing the code I get an error on the last instruction:
Type mismatch: 'xmlDoc.loadXML'

This is the XML returned by the webservice:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfTAutoModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://
tempuri.org/">
<TAutoModel>
<ModelId>33</ModelId>
<Omschrijving>200</Omschrijving>
<Beginjaar>1984</Beginjaar>
</TAutoModel>
</ArrayOfTAutoModel>

Can anyone tell me why I get this strange message Type mismatch:
'xmlDoc.loadXML' ?

When I try to load the xml from a string into the xmlDoc, there's no
problem. Only when the Xml is returned from the webservice I get the
error.

I hope someone can help me.

Mar 21 '07 #1
3 6129

"Pim75" <p.******@tiscali.nlwrote in message
news:11**********************@p15g2000hsd.googlegr oups.com...
Hello,

I've written a simple asp code that has to read an xml file from an
Asp.net webservice.
The code looks like:

set soapclient = Server.CreateObject("MSSOAP.SoapClient30")
soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit("http://webservice/Webservice.asmx?WSDL")
soapclient.ConnectorProperty("Timeout") = 120000
strXML = soapclient.GetModellen("4", "2001", "3")

set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async=false
xmlDoc.loadXML(strXML)

When executing the code I get an error on the last instruction:
Type mismatch: 'xmlDoc.loadXML'

This is the XML returned by the webservice:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfTAutoModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://
tempuri.org/">
<TAutoModel>
<ModelId>33</ModelId>
<Omschrijving>200</Omschrijving>
<Beginjaar>1984</Beginjaar>
</TAutoModel>
</ArrayOfTAutoModel>

Can anyone tell me why I get this strange message Type mismatch:
'xmlDoc.loadXML' ?

When I try to load the xml from a string into the xmlDoc, there's no
problem. Only when the Xml is returned from the webservice I get the
error.

I hope someone can help me.
replace:-

xmlDoc.loadXML(strXML)

with:-

Response.Write VarType(strXML)

What do you get back?

Also try:-

xmlDoc.loadXML strXML

Probably won't make a difference but the parentheses were superflous.

Mar 21 '07 #2
Hello Anthony,

Thanks for your reply.
Changing xmlDoc.loadXML(strXML) in xmlDoc.loadXML strXML makes no
difference, I get the same error message.

When I try Response.Write VarType(strXML) , the value 8201 is
returned.
Does this mean anything to you?

Thanks in advance.

Mar 21 '07 #3

"Pim75" <p.******@tiscali.nlwrote in message
news:11**********************@b75g2000hsg.googlegr oups.com...
Hello Anthony,

Thanks for your reply.
Changing xmlDoc.loadXML(strXML) in xmlDoc.loadXML strXML makes no
difference, I get the same error message.

When I try Response.Write VarType(strXML) , the value 8201 is
returned.
Does this mean anything to you?
Yes it means the return type is an array of objects.
Mar 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joao Santa Barbara | last post by:
Hi all i have this error reading one registry key , can anyone assist me .. please very urgent i try in one computer, and work fine, but in other computer it didnīt work and throws this error...
1
by: Duncan Allen | last post by:
I'm trying to use aspnet_setreg to encrypt user names & password used in the web.config file for use in the indentity element. When the website runs I get the message 'Error reading the password...
2
by: Kel Good | last post by:
I have a component which I want to register for COM interop. At the top of my code file I have the following lines. Imports System.Reflection <Assembly: AssemblyKeyFileAttribute("myKey.snk")>...
4
by: liuliuliu | last post by:
hello -- i'm running python/pygame on maemo (nokia 770). my situation is that i'm continually scouring this one directory for incoming files. if i see if there's a new file (coming in via...
0
by: tmsprowl | last post by:
Greetings! I was wondering if someone could help me with a problem I'm having. My department is just one of many within my organization. My organization has control over the network domain,...
2
by: Ben | last post by:
Hi We have setup a Strong Name for our Applications, but are having problems with the essembly throwing an error: Error creating assembly manifest: Error reading key file...
1
by: williamcorrea85 | last post by:
HI , I HAVE TO CHANGE AN APLICATION MADE IN BORLAND C++ BUILDER 6, BUT WHEN I OPEN IT, IT SHOWS THE NEXT ERROR: ERROR READING FORM Class TabcShapeForm not found ANYONE KNOWS WHAT TO...
2
by: herat007 | last post by:
hi , i have developed a prog in vb to send sms , but i get an error error:8020 "Error reading from comm port" my prog for mscomm_oncomm() is Private Sub MSComm1_OnComm() Dim strMessage As...
2
by: =?Utf-8?B?eWtmZmM=?= | last post by:
I try to experiment deploying my Vb.net application by following the basic steps but encounter this error. I follow every step and every display agrees with what the tutorial says and the IDE...
0
Guido Geurs
by: Guido Geurs | last post by:
I'm writing a program that list the contents of a CDrom and also the contents of the ZIP files. When there is a bad Zip file on the CD, the program keeps traying to reed the file and after +- 50...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.