Frage

I am using Oracle's JDK 1.7 wsimport tool to build a client for a JAX-WS service using the top-down approach and I would like to understand what happens when I feed it with a *.wsdl file that uses or imports namespaces defined on the web. Will the wsimport tool try to de-reference and obtain the corresponding xsd files? Is there a way to feed it the schema files it needs from the local filesystem so that one can support offline builds?

E.g. the top of my wsdl file reads like:

<?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">

Do I understand right that the wsimport will try to download, e.g. the schema file for the adql namespace preffix:

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

... over the web and is there a way to feed it this and other transitive schema dependencies myself so that it doesn't have to access them over the network?

War es hilfreich?

Lösung

Yes, there is a way: use a catalog file. E.g. as in here or as described in this blog post

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top