locked
What are all the possible causes for a "There is an error in XML document" error?? RRS feed

  • Question

  • User-899943225 posted

    Hello all,

    What are all the possible causes for a "There is an error in XML document" error??

    I am getting this error when my Windows class dll calls a web method from a web service residing in a different server machine.

    The inner exception says: "'Element' is an invalid node type".

    The crazy thing is that there has not been any changes to the web service code nor the dll code! They are intact!

    Only thing I did was to update the web references from the class dll project because we just upgraded the application that exposes the web services in question. After that it stopped working. Before the web reference update it was working just fine. We know the upgraded application is not the cause. It has been independently tested and verified.

    One thing I am suspicious about: This happened last week with another dll I have and I noticed that the .wsdl file at the web service location had their web services described with an alias as the hostname. I changed the hostname to localhost and did the update again in the dll project, and it started working again. Now with this other dll having the same problem I am doing the same thing and it is not working. I have even compared both web reference code (this dll's and last week's dll's) and everything is exactly the same. I don't understand what would be the cause of this error.

    I have searched the internet and most of the sites point to an error in the XML document structure. However, I know that is not the problem because the web service I am consuming has not changed. That's the reason for my question: What are all/other possible causes for a "There is an error in XML document" error??

    I will greatly appreciate any help provided! Thank you!

    BTW, this is VS 2003, .Net 1.1. Can't upgrade this to a newer version for good reasons.

    Monday, May 6, 2013 7:26 PM

Answers

  • User260886948 posted

    Hi,

    criveraf

    There is an error in XML document

    WSDL uses the documentation element (<documentation>) to make human-readable documentation. The human-readable documentation may include HTML tags. 

    However, when your WSDL file has HTML tags in documentation elements, and then you try to create an XML Web services proxy file for your WSDL file by using Wsdl.exe, you may receive the warning message or the error message in the "Symptoms" section.

    In order to solve this problem, please try to refer to:

    http://support.microsoft.com/kb/820123 .

    Hope it can help you.

    Best Regards,
    Amy Peng 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 8, 2013 9:15 PM

All replies

  • User-899943225 posted

    Please! Any kind of help will be appreciated! What should I look for? In general, what triggers such an error? Could there be a case in which it may have something to do with hostname conflicts/issues in the .wsdl file?

    Tuesday, May 7, 2013 3:25 PM
  • User260886948 posted

    Hi,

    criveraf

    There is an error in XML document

    WSDL uses the documentation element (<documentation>) to make human-readable documentation. The human-readable documentation may include HTML tags. 

    However, when your WSDL file has HTML tags in documentation elements, and then you try to create an XML Web services proxy file for your WSDL file by using Wsdl.exe, you may receive the warning message or the error message in the "Symptoms" section.

    In order to solve this problem, please try to refer to:

    http://support.microsoft.com/kb/820123 .

    Hope it can help you.

    Best Regards,
    Amy Peng 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 8, 2013 9:15 PM