This project is read-only.

'##other' WSCF Blue

Sep 21, 2010 at 1:47 PM

I have a set of schemas that define extension points, as shown below:

 <xs:complexType name="MyType" mixed="false">
  <xs:complexContent mixed="false">
   <xs:extension base="baseactivity:MyBaseType">
    <xs:sequence>
     <xs:element name="SomeElement" type="SomeElementType"/>
     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>

however, when I generate code and point either the Managed Services Engine test client or wcftetsclient at it, i get the following:

Validation Error: Wildcard '##any' allows element '<some name>', and causes the content model to become ambiguous.

 

The code associated with the '##other' element looks like this:

        /// <remarks/>
        [System.Xml.Serialization.XmlAnyElementAttribute()]
        public System.Collections.Generic.List<System.Xml.XmlElement> Any
        {
            get
            {
                return this.anyField;
            }
            set
            {
                this.anyField = value;
            }
        }
 

Any ideas how I can achieve having the extension points, but generating the classes that play nice with clients?