Opps, forgot about the two types:
<simpleType name="Pool">
<restriction base="xsd:string">
<enumeration value="underground"/>
<enumeration value="aboveground"/>
</restriction>
</simpleType>
<simpleType name="FirePlace">
<restriction base="xsd:string">
<enumeration value="gas"/>
<enumeration value="wood"/>
</restriction>
</simpleType>
<simpleType name="Building">
<restriction base="xsd:string">
</restriction>
</simpleType>
<complexType name="House" mixed="true">
<simpleContent>
<extension base="yourTargetName:Building">
<attribute name="swimingPool" type="yourTargetName:Pool"
use="optional"/>
<attribute name="firePlace" type="yourTargetName:FirePlace"
use="optional"/>
</extension>
</simpleContent>
</complexType>
<complexType name="Property">
<sequence>
<element name="myHouse" type="csta:House" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
Just simply copy and paste the above XML into any working (.NET importable)
wsdl file and replace "yourTargetName" with your target name.
Thanks,
"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:uN**************@tk2msftngp13.phx.gbl...
Is the schema you posted the complete schema? If it is then it is not
valid. You dont have typed defined for Pool and Fireplace which would lead to
failure to compile the schema. If you have the complete schema, please
give its contents.
"trexim" <tr****@hotmail.com> wrote in message
news:2s*************@uni-berlin.de... Hi,
Thank you for the reply.
This is the schema I just tested:
<simpleType name="Building">
<restriction base="xsd:string">
</restriction>
</simpleType>
<complexType name="House" mixed="true">
<simpleContent>
<extension base="csta:Building">
<attribute name="swimingPool" type="csta:Pool" use="optional"/>
<attribute name="firePlace" type="csta:FirePlace" use="optional"/>
</extension>
</simpleContent>
</complexType>
<complexType name="Property">
<sequence>
<element name="myHouse" type="csta:House" minOccurs="1"
maxOccurs="1"/> </sequence>
</complexType>
When I load this into a .NET project, House is serialized as a
System.Object If I try to use it:
Dim myHouse As Testing.House
The only function that can be invoked is: myHouse.GetType()
Did I do something incorrect?
Thanks,
"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:uL**************@tk2msftngp13.phx.gbl... It does support the following. Please give your use case.
"trexim" <tr****@hotmail.com> wrote in message
news:2s*************@uni-berlin.de...
> It seems that .NET does not support xsd:extension and xsd:attribute.
What is
> the alternative?
>
> Thanks,
>
>