Not handling inheritance properly

Aug 31, 2009 at 7:26 PM

I have an XSD that has complex type inheritance and the Linq proxy objects created do not seem to support the inheritance pattern. The objects do not contain properties of the parent objects nor do they inherit from the parent object directly. I need this since I have web services that have polymorphic parameters using "<xs:extension base=". I am going to work on extending the source to do this but if anyone else has run into this issue, let me know.

 

Btw, this project is ideal for my usage. I have an SOA application that uses java based webservices and the performance of these objects in my prototype code to do the raw serialization/deserialization under load over the xml serializers (WCF wasn't much better) is amazing. I am talking about +250ms vs. 9ms and that is if you don't count the JITed serializer assembly cost. We have been married to the Xsd.exe and Wsdl.exe tools for way too long. So thank you, and kudos to the authors, fabulous job. Also, if anyone has a way to inject these objects into the Wsdl.exe generated web service proxies let me know, I may just end up hand coding a generic replacement.

public sealed class SoapClientMessage : SoapMessage
{
    // Fields
    internal SoapExtension[] initializedExtensions;
    private SoapClientMethod method;
    private SoapHttpClientProtocol protocol;
    private string url;

    // Methods
    internal SoapClientMessage(SoapHttpClientProtocol protocol, SoapClientMethod method, string url)
    {
        this.method = method;
        this.protocol = protocol;
        this.url = url;
    }

    protected override void EnsureInStage()
    {
        base.EnsureStage(SoapMessageStage.BeforeSerialize);
    }

    protected override void EnsureOutStage()
    {
        base.EnsureStage(SoapMessageStage.AfterDeserialize);
    }

    // Properties
    public override string Action
    {
        get
        {
            return this.method.action;
        }
    }

    public SoapHttpClientProtocol Client
    {
        get
        {
            return this.protocol;
        }
    }

    internal SoapClientMethod Method
    {
        get
        {
            return this.method;
        }
    }

    public override LogicalMethodInfo MethodInfo
    {
        get
        {
            return this.method.methodInfo;
        }
    }

    public override bool OneWay
    {
        get
        {
            return this.method.oneWay;
        }
    }

    [ComVisible(false)]
    public override SoapProtocolVersion SoapVersion
    {
        get
        {
            if (this.protocol.SoapVersion != SoapProtocolVersion.Default)
            {
                return this.protocol.SoapVersion;
            }
            return SoapProtocolVersion.Soap11;
        }
    }

    public override string Url
    {
        get
        {
            return this.url;
        }
    }
}
Collapse Methods