If there is a problem with the catalog file for a webservice client, JAX-WS provides very unhelpful error messages, or none at all.
This applies both at build time (using wsimport), and at runtime (when initializing the web service client).
To reproduce:
Download the JAXWS distribution
navigate to the catalog sample under samples/catalogs
manipulate the example:
use a wrong catalog filename in build.xml, under target "generate-client" (catalog=)
OR: use a wrong filename in the jax-ws-catalog.xml file (e.g. replace AddNumbers.wsdl by AddNumbers.wsdl2)
run "ant client"
Output:
If an internet connection is available, the build just hangs (apparently trying to download something).
Without internet connection, it fails mysteriously:
setup:
generate-client:
[wsimport] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
[wsimport] parsing WSDL...
[wsimport]
[wsimport]
[wsimport] [ERROR] java.net.UnknownHostException: example.org
[wsimport]
[wsimport]
[wsimport] [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s):
[wsimport]
[wsimport] At least one WSDL with at least one service definition needs to be provided.
[wsimport]
[wsimport]
[wsimport] Failed to parse the WSDL.
[wsimport] Command invoked: wsimport "C:\Program Files\Java\jdk1.6.0_27\jre\bin\java.exe"
-d C:\Users\user\jaxws-ri\samples\catalog\build\classes -g -Xendorsed -keep
-catalog C:\Users\user\jaxws-ri\samples\catalog\etc\META-INF\jax-ws-catalog.xml2 http://example.org/wsdl -p catalog.client
BUILD FAILED
Expected:
The build should clearly indicate what went wrong. Something like
catalog file "bla" not found
in catalog file "bla": referenced file "blabla" not found
or similar.
The present behaviour makes it very difficult to debug problems with catalogs, because there is no indication when there is some problem finding the catalog file, or a WSDL file.
If there is a problem with the catalog file for a webservice client, JAX-WS provides very unhelpful error messages, or none at all.
This applies both at build time (using wsimport), and at runtime (when initializing the web service client).
To reproduce:
Output:
If an internet connection is available, the build just hangs (apparently trying to download something).
Without internet connection, it fails mysteriously:
Expected:
The build should clearly indicate what went wrong. Something like
or similar.
The present behaviour makes it very difficult to debug problems with catalogs, because there is no indication when there is some problem finding the catalog file, or a WSDL file.
Environment
SUN JDK 1.6.0_27
Affected Versions
[2.2.5]