Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wsimport and wsdl file with external namespaces

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?

like image 687
Marcus Junius Brutus Avatar asked Nov 26 '25 04:11

Marcus Junius Brutus


1 Answers

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

like image 65
Marcus Junius Brutus Avatar answered Nov 27 '25 23:11

Marcus Junius Brutus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!