【问题标题】:wsimport and wsdl file with external namespaces具有外部命名空间的 wsimport 和 wsdl 文件
【发布时间】:2013-05-21 14:49:48
【问题描述】:

我正在使用 Oracle 的 JDK 1.7 wsimport 工具使用自上而下的方法为 JAX-WS 服务构建客户端,我想了解当我用一个 *.wsdl 文件来提供它,该文件使用或导入网络上定义的命名空间。 wsimport 工具会尝试取消引用并获取对应的xsd 文件吗?有没有办法从本地文件系统为其提供所需的架构文件,以便支持离线构建?

例如我的 wsdl 文件的顶部内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="IVOARegistrySearch"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:xs="http://www.w3.org/2001/XMLSchema"
             xmlns:adql="http://www.ivoa.net/xml/ADQL/v1.0"
             xmlns:tns="http://www.ivoa.net/wsdl/RegistrySearch/v1.0"
             targetNamespace="http://www.ivoa.net/wsdl/RegistrySearch/v1.0">
   <types>
      <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
                 xmlns:tns="http://www.ivoa.net/wsdl/RegistrySearch/v1.0"
                 targetNamespace="http://www.ivoa.net/wsdl/RegistrySearch/v1.0">

我是否理解正确 wsimport 将尝试下载,例如adql 命名空间前缀的架构文件:

http://www.ivoa.net/xml/ADQL/v1.0

...通过网络,有没有办法自己提供这个和其他传递模式依赖项,这样它就不必通过网络访问它们?

【问题讨论】:

    标签: jax-ws wsimport


    【解决方案1】:

    是的,有一种方法:使用目录文件。例如。 as in here 或如this blog post 中所述

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-16
      • 2011-04-14
      • 1970-01-01
      • 2023-03-06
      • 1970-01-01
      • 2023-03-23
      • 2021-06-27
      相关资源
      最近更新 更多