CXF 2.x 代码生成不生成引用类

问题描述

我正在尝试使用 Eclipse 的 Web 服务 > 生成客户端功能(右键单击 wsdl 时)从 wsdl 生成 Java 客户端。

它确实生成了很多类,但是缺少一些类!!!

我看到至少一种类型没有处理

<s:complexType name="Participant">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="ParticipantId" type="s:int" />
          <s:element minOccurs="0" maxOccurs="1" name="NameOrNumber" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="EmailAddress" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="ParticipantCallType" type="tns:ParticipantType" />
        </s:sequence>
      </s:complexType>
      <s:simpleType name="ParticipantType">
        <s:restriction base="s:string">
          <s:enumeration value="TMS" />
          <s:enumeration value="IP Video &lt;-" />
          <s:enumeration value="IP Tel &lt;-" />
          <s:enumeration value="ISDN Video &lt;-" />
          <s:enumeration value="Telephone &lt;-" />
          <s:enumeration value="IP Video -&gt;" />
          <s:enumeration value="IP Tel -&gt;" />
          <s:enumeration value="ISDN Video -&gt;" />
          <s:enumeration value="Telephone -&gt;" />
          <s:enumeration value="Directory" />
          <s:enumeration value="User" />
          <s:enumeration value="SIP &lt;-" />
          <s:enumeration value="SIP -&gt;" />
          <s:enumeration value="3G &lt;-" />
          <s:enumeration value="3G -&gt;" />
          <s:enumeration value="TMS Master Participant" />
          <s:enumeration value="SIP Tel &lt;-" />
          <s:enumeration value="SIP Tel -&gt;" />
        </s:restriction>
      </s:simpleType>

因此生成了 Participant 类,但 ParticipantType 不是,ParticipantCallType 字段作为字符串而不是枚举出现。

我在向导中尝试了几个选项,但没有一个解决了这个问题(生成了参考类 ParticipantCallType)

enter image description here

我应该注意到我使用 CXF 3.4.3 作为我的运行时

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...