XmlSchemaProvider w/ abstract class

Discussion in 'ASP .Net Web Services' started by Jiho Han, Jul 29, 2006.

  1. Jiho Han

    Jiho Han Guest

    I have an abstract class and a couple of derived classes. I didn't like
    the default schema exposed by wsdl, so I decided to implement XmlSchemaProvider.
    The schema is exposed properly for the abstract class. However, the derived
    classes are not being exposed at all through wsdl. The child schema is being
    loaded because the schema method is being invoked and the file is getting
    loaded. However, the wsdl only exposed the abstract class.

    Here're the declarations:

    [System.Xml.Serialization.XmlRootAttribute("entity", DataType="ParentEntity",
    Namespace="http://schemas.infinityinfo.com", IsNullable=false)]
    [XmlInclude(typeof(accountEntity))]
    [XmlSchemaProvider("LoadSchemaFile")]
    ublic abstract partial class ParentEntity : IXmlSerializable {}

    ....

    [System.Xml.Serialization.XmlSchemaProvider("LoadSchemaFile")]
    public partial class accountEntity : ParentEntity, IXmlSerializable


    The wsdl exposes a method like this:

    public void Create(ParentEntity entity);

    Here's a relevant portion of the schema:

    <xs:complexType name="ParentEntity" abstract="true" final=""/>
    <xs:element name="entity" type="iis:parentEntity" />
    <xs:complexType name="accountEntity">
    <xs:complexContent mixed="false">
    <xs:extension base="iis:parentEntity">
    <xs:sequence>....

    Thanks

    Jiho Han
    Senior Software Engineer
    Infinity Info Systems
    The Sales Technology Experts
    Tel: 212.563.4400 x216
    Fax: 212.760.0540

    www.infinityinfo.com
    Jiho Han, Jul 29, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthias Kaeppler
    Replies:
    1
    Views:
    421
    R.F. Pels
    May 22, 2005
  2. Sameer
    Replies:
    4
    Views:
    574
    Roedy Green
    Aug 31, 2005
  3. Uzytkownik
    Replies:
    3
    Views:
    579
    Uzytkownik
    Apr 3, 2005
  4. Replies:
    4
    Views:
    802
    Rolf Magnus
    May 17, 2006
  5. Replies:
    0
    Views:
    299
Loading...

Share This Page