我得到XML验证错误。试图从文件中使用wsdl。 无法跟踪这里的问题。尝试了我的解决方案但没有奏效。 现有的xsds大小太长,不知道如何附加xml文件。
目前的情况是我的本地目录上有wsdl文件,与多个xsds链接。
1:[Expected element ''GroupNumber@http://www.herman.com/bme/cbsinterface/community'' instead of ''GroupType@http://www.herman.com/bme/cbsinterface/community'' here in element GroupCustomer@http://www.herman.com/bme/cbsinterface/community].
2:[Expected element ''GroupNumber@http://www.herman.com/bme/cbsinterface/community'' instead of ''GroupName@http://www.herman.com/bme/cbsinterface/community'' here in element GroupCustomer@http://www.herman.com/bme/cbsinterface/community].
3:[Expected element ''GroupNumber@http://www.herman.com/bme/cbsinterface/community'' instead of ''GroupCustomerCode@http://www.herman.com/bme/cbsinterface/community'' here in element GroupCustomer@http://www.herman.com/bme/cbsinterface/community].
4:[Expected element ''GroupNumber@http://www.herman.com/bme/cbsinterface/community'' instead of ''SimpleProperty@http://www.herman.com/bme/cbsinterface/community'' here in element GroupCustomer@http://www.herman.com/bme/cbsinterface/community].
下面是我的代码xml snip。
<xs:complexType name="GroupCustomer">
<xs:sequence>
<xs:element minOccurs="0" name="ParentGroupCustomerID">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="23"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="ParentGroupNumber" type="community:GroupNumberType"/>
<xs:element name="GroupNumber">
<xs:simpleType>
<xs:restriction base="community:GroupNumberType">
<xs:maxLength value="30"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="GroupType" type="community:GroupCustomer"/>
<xs:element minOccurs="0" name="GroupName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="GroupCustomerCode">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="23"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="GroupCustomerID">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="23"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="RegisterNo">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="23"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="MaxCountOfCug" type="xs:int"/>
<xs:element minOccurs="0" name="MaxCountOfGroupOut" type="xs:int"/>
<xs:element minOccurs="0" name="MaxHuntingList" type="xs:int"/>
<xs:element minOccurs="0" name="QuotaAmount" type="common:Balance"/>
<xs:element minOccurs="0" name="BelToAreaID">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="SimpleProperty"
type="common:SimpleProperty"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="RatingGroupList">
<xs:complexType>
<xs:sequence>
<xs:element name="RatingGroup" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="OfficeZoneInfo">
<xs:complexType>
<xs:sequence>
<xs:element name="CallingCellID">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="19"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element default="0" minOccurs="0" name="MaxMemNumber" type="xs:int"/>
<xs:element minOccurs="0" name="TimeZone" type="xs:int"/>
</xs:sequence>
</xs:complexType>
答案 0 :(得分:0)
您的架构说GroupNumber元素是必需的;您的错误消息表明它不存在于实例文档中(或者如果它存在,那么它位于错误的位置)。