For Programmers: Free Programming Magazines  


Home > Archive > Microsoft Webservices > April 2006 > Re: System.InvalidCastException: Unable to cast object of type 'System.Xml.XmlDocumen









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: System.InvalidCastException: Unable to cast object of type 'System.Xml.XmlDocumen
John Smith

2006-04-13, 8:04 am

Xref: TK2MSFTNGP01.phx.gbl microsoft.public.webservices:6997


When I change this line:

results = this.Invoke("validate", new object[] { xmlDocument });

into this:

results = this.Invoke("validate", new object[] {
xmlDocument.OuterXml.ToString() });

it (almost) works. The problem is that it wraps my XML document into <url
http://www.example.org/Avtentikacija"> my xml here...</url> inside
<soap:body>, like this:

<soap:Body>
<url xmlns="http://sigen.si/Avtentikacija">
MyXML here...
</url>
</soap:Body>

Why? I don't want this! Webservice that I call can't parse it. It doesn't
expects <url></url> :(


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com