I have a problem when I use dervied types in a schema combined with using the xsi:type attribute in the XML.
Here is the sample schema.. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:complexType name="_Transaction"> <xsd:sequence> <xsd:element name="user_id" type="xsd:string"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="_Transaction_Login"> <xsd:complexContent> <xsd:extension base="_Transaction"> <xsd:sequence> <xsd:element name="password" type="xsd:string"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="_Transaction_Submit"> <xsd:complexContent> <xsd:extension base="_Transaction"> <xsd:sequence> <xsd:element name="application_number" type="xsd:string"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:element name="Request"> <xsd:complexType> <xsd:sequence> <xsd:element name="Transaction" type="_Transaction"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> and here is the XML <?xml version="1.0" encoding="UTF-8"?> <Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <Transaction xsi:type="_Transaction_Login"> <user_id>test</user_id> <password>xxx</password> </Transaction> </Request> When I try to validate the XML it returns the following : unable to instantiate a new type of: castor_gen_1._Transaction_Login The reason for the error is class _Transaction_Login is generated as abstract. How do I solve this? Thanks in advance. Jasbir
================================================== HFC Bank Disclaimer The information in this Email belongs to HFC Bank plc. It is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this Email is prohibited. If you have received this Email in error, please notify us immediately by telephone on 01344 890000 and delete the Email from your system and destroy all copies which you have made of the same. Thank you. HFC Bank plc Company Registration Number - 1117305 England Registered Office: North Street, Winkfield Berkshire SL4 4TD.
