Error reading xml document in Asp

Error reading xml document in Asp

am 21.03.2007 15:30:25 von Pim75

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?WSD L")
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:



33
200
1984



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.

Re: Error reading xml document in Asp

am 21.03.2007 15:54:45 von Anthony Jones

"Pim75" wrote in message
news:1174487424.968552.165160@p15g2000hsd.googlegroups.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?WSD L")
> 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:
>
>
>
> 33
> 200
> 1984
>

>

>
> 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.

Re: Error reading xml document in Asp

am 21.03.2007 16:03:37 von Pim75

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.

Re: Error reading xml document in Asp

am 21.03.2007 23:27:26 von Anthony Jones

"Pim75" wrote in message
news:1174489417.796103.202050@b75g2000hsg.googlegroups.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.