从xsd文件生成一些类后,这些类是错误的.@xmlElementRef与required ="false"一起使用,并且不允许该属性.我的.xsd我正在使用:
<xs:schema xmlns:ns="http://shop.pau.softm.com/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="http://shop.pau.softm.com/xsd">
<xs:element name="checkOrder">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="order" nillable="true" type="ns:Order"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Order">
<xs:sequence>
<xs:element minOccurs="0" name="addressNumber" type="xs:int"/>
<xs:element minOccurs="0" name="auftragsNummer" type="xs:int"/>
<xs:element minOccurs="0" name="companyNumber" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="condition" nillable="true" type="ns:Condition"/>
<xs:element minOccurs="0" name="currency" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="customerId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="customerReference" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deliveryAddress" nillable="true" type="ns:Address"/>
<xs:element minOccurs="0" name="deliveryConditions" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deliveryType" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="endCustomerId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="endCustomerReference" nillable="true" …Run Code Online (Sandbox Code Playgroud)