【发布时间】:2012-08-09 00:38:27
【问题描述】:
我正在使用 JAX-WS 2.1 从 xsd 文件为 Web 服务生成工件。
这里是有问题的工件的 XSD 定义:
<xs:simpleType name='Example'>
<xs:annotation>
<xs:documentation>Example</xs:documentation>
</xs:annotation>
<xs:restriction base='xs:string'>
<xs:minLength value='0'/>
<xs:maxLength value='1'/>
</xs:restriction>
</xs:simpleType>
Jax WS 不生成工件示例。我没有看到名为 Example 的类。
但是当我将枚举添加到 XSD 定义中时,JAX-WS 会成功生成它:
<xs:simpleType name='Example'>
<xs:annotation>
<xs:documentation>Example</xs:documentation>
</xs:annotation>
<xs:restriction base='xs:string'>
<xs:minLength value='0'/>
<xs:maxLength value='1'/>
<xs:enumeration value='A'/>
</xs:restriction>
</xs:simpleType>
如果有人知道是什么问题请帮忙
【问题讨论】: