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

  • SEARCH
  • Home
  • 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 382727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:12:49+00:00 2026-05-12T15:12:49+00:00

I’m getting this error from Mono’s wsdl utility while trying to process eBay’s WSDL

  • 0

I’m getting this error from Mono’s wsdl utility while trying to process eBay’s WSDL file –

( http://developer.ebay.com/webservices/latest/eBaySvc.wsdl )

$ wsdl eBaySvc.wsdl 
Web Services Description Language Utility
Mono Framework v2.0.50727.1433
Error: XmlSchema error: Ambiguous element label which is contained by -any- particle was detected: urn:ebay:apis:eBLBaseComponents:PreferenceLevel Related schema item SourceUri: file:///home/manger/projects/ebay/eBaySvc.orig.wsdl, Line 10296, Position 7.
Stack:
   at System.Xml.Schema.ValidationHandler.RaiseValidationEvent (System.Xml.Schema.ValidationEventHandler handle, System.Exception innerException, System.String message, System.Xml.Schema.XmlSchemaObject xsobj, System.Object sender, System.String sourceUri, XmlSeverityType severity) [0x00000] 
  at System.Xml.Schema.XmlSchemaObject.error (System.Xml.Schema.ValidationEventHandler handle, System.String message, System.Exception innerException, System.Xml.Schema.XmlSchemaObject xsobj, System.Object sender) [0x00000] 
  at System.Xml.Schema.XmlSchemaObject.error (System.Xml.Schema.ValidationEventHandler handle, System.String message) [0x00000]

Searching Google for solutions reveals a suggestion of changing elements that start with <xs:any ... to <xs:any namespace="##other" ... – this certainly makes Mono’s wsdl utility able to process the file, to make a .cs file out of it. But then I get a runtime exception from my C# program when I try to instantiate the webservice helper class ( eBayAPIInterfaceService service = new eBayAPIInterfaceService(); ) :

Unhandled Exception: System.InvalidOperationException: There was an error reflecting type 'AddDisputeRequestType'. ---> System.InvalidOperationException: There was an error reflecting field 'DetailLevel'. ---> System.InvalidOperationException: There was an error reflecting type 'DetailLevelCodeType'. ---> System.InvalidOperationException: There was an error reflecting type 'System.Object'. ---> System.InvalidOperationException: There was an error reflecting type 'AbstractResponseType'. ---> System.InvalidOperationException: There was an error reflecting field 'Errors'. ---> System.InvalidOperationException: There was an error reflecting type 'ErrorType'. ---> System.InvalidOperationException: There was an error reflecting field 'ErrorParameters'. ---> System.InvalidOperationException: There was an error reflecting type 'ErrorParameterType'. ---> System.InvalidOperationException: There was an error reflecting field 'Any'. ---> System.InvalidOperationException: The element Any has been attributed with an XmlAnyElementAttribute and a namespace '', but no name. When a namespace is supplied, a name is also required. Supply a name or remove the namespace.                                           
  at System.Xml.Serialization.XmlReflectionImporter.ImportAnyElementInfo (System.String defaultNamespace, System.Xml.Serialization.XmlReflectionMember rmember, System.Xml.Serialization.XmlTypeMapMemberElement member, System.Xml.Serialization.XmlAttributes atts) [0x00000]                                                                                            
  at System.Xml.Serialization.XmlReflectionImporter.CreateMapMember (System.Type declaringType, System.Xml.Serialization.XmlReflectionMember rmember, System.String defaultNamespace) [0x00000]                                                   
  at System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping (System.Xml.Serialization.TypeData typeData, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace) [0x00000]                                     
  --- End of inner exception stack trace ---

Is Mono’s wsdl tool at fault here, or eBay’s WSDL/schema? – several forum posts I’ve seen say that the WSDL doesn’t match the schema, so Mono is doing the right thing, but how do I fix it so I can instantiate the webservice helper class from C#?

Versions of my tools :

$ wsdl
Web Services Description Language Utility
Mono Framework v2.0.50727.1433

$ gmcs –version
Mono C# compiler version 2.4.2.3

Generated code for ErrorParameterType :

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:ebay:apis:eBLBaseComponents")]
public partial class ErrorParameterType {

    private System.Xml.XmlElement[] anyField165;

    ... more class members follow ...

    /// <remarks/>
    [System.Xml.Serialization.XmlAnyElement(Namespace="")]
    public System.Xml.XmlElement[] Any {
        get {
            return this.anyField165;
        }
        set {
            this.anyField165 = value;
        }
    }
}

The eBayAPIInterfaceService.cs file which wsdl generates after my ‘fix’ is here

  • 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-05-12T15:12:50+00:00Added an answer on May 12, 2026 at 3:12 pm

    I don’t know if this solves your problem, but the xs:any wildcard in your question is missing two '#':

    <xs:any namespace="##other" ...
                       ↑
    

    The generated C# code contains lots of definitions like this:

    [System.Xml.Serialization.XmlAnyElement(Namespace="")]
    public System.Xml.XmlElement[] Any {
        get {
            return this.anyFieldXXX;
        }
        set {
            this.anyFieldXXX = value;
        }
    }
    

    From MSDN:

    Apply the XmlAnyElementAttribute to a field that returns an array of XmlElement or XmlNode objects. Such a field can be used in two ways, depending on whether an object is being serialized or deserialized. When serialized, the object is generated as XML elements or nodes, even though they have no corresponding member (or members) in the object being serialized. If you specify a Name property value when applying the attribute, all XmlElement or XmlNode objects inserted into the array must have the same element name and default namespace, or an exception is thrown. If you set the Namespace property value, you must set the Name property as well, and the XmlElement or XmlNode objects must also have the same name and namespace values. If no Name value is specified, the XmlElement or XmlNode objects can have any element name.

    So I’d guess the solution is to simply remove the Namespace property values:

    [System.Xml.Serialization.XmlAnyElement]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 222k
  • Answers 222k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Start->Control Panel->Administrative Tools->Services Find Your service in the list, right… May 13, 2026 at 12:22 am
  • Editorial Team
    Editorial Team added an answer It seems that, unfortunately, there is no API fo Google… May 13, 2026 at 12:22 am
  • Editorial Team
    Editorial Team added an answer No. I believe that "autosize" is not supported in the… May 13, 2026 at 12:22 am

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.