用户定义值集的验证和错误处理
UDDI 注册中心用户控制台会在构建保存 tModel 实体请求时(即在执行发布前)执行验证。
例如,如果您尝试添加两个 customTaxonomy:displayName keyedReference 元素,那么会显示以下消息:
Advice: Only one 'urn:x-ibm:uddi:customTaxonomy:displayName' key name is
allowed for the 'Other' taxonomy.
如果包含以 urn:x-ibm:uddi:customTaxonomy: 开头的 keyName 值的 keyedReference 元素后跟 displayName 以外的任何内容,那么显示以下消息:
Advice: Only key name values of 'urn:x-ibm:uddi:customTaxonomy:displayName'
are supported.
对于 save_tModel 实体消息可能具有多个 tModel 实体的请求,如果任何一个 tModel 实体是分类 tModel 实体并且它验证失败,那么请求失败,并带有 UDDIInvalidValueException(加上说明原因的附加信息)并且不发布 tModel 实体。例如:
E_invalidValue (20200) A value that was passed in a keyValue attribute did not
pass validation. This applies to checked categorizations, identifiers and
other validated code lists. The error text will clearly indicate the key and
value combination that failed validation. Invalid 'customTaxonomy:dbKey'
keyValue [naics] in keyedReference. KeyValue already in use by
tModelKey[UUID:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2]