Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   XmlSchemaProvider w/ abstract class (http://www.velocityreviews.com/forums/t786387-xmlschemaprovider-w-abstract-class.html)

Jiho Han 07-29-2006 08:02 PM

XmlSchemaProvider w/ abstract class
 
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("LoadSc hemaFile")]
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
jhan@infinityinfo.com
www.infinityinfo.com





All times are GMT. The time now is 02:43 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.