Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8998695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:04:15+00:00 2026-06-16T00:04:15+00:00

I added a reference to a Web Service in my project. I’m using the

  • 0

I added a reference to a Web Service in my project. I’m using the generated code to call the methods of the Web Service. One of the methods returns the following structure:

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:typens="urn:AllegroWebApi" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
       <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
          <typens:doGetCatsDataResponse>
             <cats-list xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="typens:CatInfoType[24051]">
                <item xsi:type="typens:CatInfoType">
                   <cat-id xsi:type="xsd:int">26013</cat-id>
                   <cat-name xsi:type="xsd:string">Antyki i Sztuka</cat-name>
                   <cat-parent xsi:type="xsd:int">0</cat-parent>
                   <cat-position xsi:type="xsd:int">0</cat-position>
                   <cat-is-product-catalogue-enabled xsi:type="xsd:int">0</cat-is-product-catalogue-enabled>
                </item>
            ....

            </item>
            <item xsi:type="typens:CatInfoType">
               <cat-id xsi:type="xsd:int">124895</cat-id>
               <cat-name xsi:type="xsd:string">Pozostałe</cat-name>
               <cat-parent xsi:type="xsd:int">124883</cat-parent>
               <cat-position xsi:type="xsd:int">5</cat-position>
               <cat-is-product-catalogue-enabled xsi:type="xsd:int">0</cat-is-product-catalogue-enabled>
            </item>
            <item xsi:type="typens:CatInfoType">
               <cat-id xsi:type="xsd:int">124894</cat-id>
               <cat-name xsi:type="xsd:string">Teleskopy</cat-name>
               <cat-parent xsi:type="xsd:int">124883</cat-parent>
               <cat-position xsi:type="xsd:int">6</cat-position>
               <cat-is-product-catalogue-enabled xsi:type="xsd:int">0</cat-is-product-catalogue-enabled>
            </item>     // Line 168361   <--------------- HERE
         </cats-list>
         <ver-key xsi:type="xsd:long">91632766</ver-key>
         <ver-str xsi:type="xsd:string">1.1.47</ver-str>
      </typens:doGetCatsDataResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The generated code that is responsible for deserializing it throws the following exception:

An unhandled exception of type ‘System.InvalidOperationException’
occurred in System.Xml.dll Additional information: There is an error
in XML document (168361, 13).

I marked the line that is mentioned in the exception in the code sample. I guess it has something to do with the fact that it is the closing tag of the last item object. I have no idea why it is failing. The XML is well formated and does not seem to include any unsupported characters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:04:16+00:00Added an answer on June 16, 2026 at 12:04 am

    Just a guess, but check your data, could be one of the fields has a ‘<‘ or ‘>’ throwing off the formatting of the xml document.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've added a Service Reference for a third-party web service to my project. When
I have added a web reference to a WCF service in my MT project
I added a web service as reference to a project and gave it name
I've got a project which as a reference added to System.Web. However, it can't
In Visual Studio 2010, I have a web service reference added. In the app.config,
I'm trying to use a web service and thus added a web service reference
I have added a WCF service to an existing ASP.Net web project on our
Is there a way to read the web service methods dynamically using a program?
I'm currently working on a Windows Service Project. I have added a reference to
I've made a simple .NET 4 Web Application in VS2010, and added a reference

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.