【问题标题】:Generate WSDL with XSD schema from JAX-WS从 JAX-WS 生成带有 XSD 模式的 WSDL
【发布时间】:2015-01-01 19:07:40
【问题描述】:

我有一个带有 JAX-WS 注释的 Web 服务,当我将它部署到 WildFly 8.1.0 Final 中时,我有这样的东西:

<wsdl:types>
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.viactt.pt" targetNamespace="http://www.viactt.pt" version="1.0">
    <xs:import namespace="http://www.viactt.pt"/>
    <xs:element name="wsAccountArray" type="ns1:wsAccountArray"/>
  </xs:schema>
</wsdl:types>

当我想要的是这样的:

<wsdl:types>
  <xsd:schema>
    <xsd:import namespace="http://www.viactt.pt" schemaLocation="ViaCTTIntegrationService_schema1.xsd"/>
  </xsd:schema>
</wsdl:types>

所以,基本上,我希望 WildFly/JAX-WS 将某些类型放在单独的 XSD 架构文件中,而不是仅在 WSDL 文件中显示它们。

我可以通过一些注释或通过一些配置文件来做到这一点吗?

【问题讨论】:

    标签: java xml web-services xsd wsdl


    【解决方案1】:

    我们使用 maven(maven-jaxb2-plugin) 的 XJC 插件从 wsdl 重新生成 JAXB 对象。 Click Here 用于教程。 你也可以see。 还有一个博客有完整的教程。 Click Here 查看。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-28
      • 1970-01-01
      • 2011-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多