Hi, I'm trying to write a JAXB/JAXWS client for this service:
http://www.cbs.dtu.dk/ws/SpindleP/ws_spindlep_2_0_ws0.xsd Just using wsdl2java on that URL with no extra parameters gives this error: WSDLToJava Error: Thrown by JAXB : undefined simple or complex type 'spindlep:seqlookup' ... presumably because all the types in use in that WSDL are defined in imported schemas with relative paths: <xsd:import namespace="http://www.cbs.dtu.dk/ws/ws-common" schemaLocation="../common/ws_common_1_0b.xsd" /> <xsd:import namespace="http://www.cbs.dtu.dk/ws/ws-spindlep" schemaLocation="ws_spindlep_2_0_ws0.xsd" /> ... so I tried supplying a JAXB catalog (SpindleP.cat) as described here: https://jaxb.dev.java.net/guide/Fixing_broken_references_in_schema.html This contains the following lines: PUBLIC "http://www.cbs.dtu.dk/ws/ws-common" "http://www.cbs.dtu.dk/ws/common/ws_common_1_0b.xsd" PUBLIC "http://www.cbs.dtu.dk/ws/ws-spindlep" "http://www.cbs.dtu.dk/ws/SpindleP/ws_spindlep_2_0_ws0.xsd" I know those XSD URLs work (you can check them yourself...). But when I re-ran wsdl2java like this: wsdl2java -catalog SpindleP.cat http://www.cbs.dtu.dk/ws/SpindleP/SpindleP_2_0_ws0.wsdl ... I got exactly the same error. Weirdly, even with -verbose, there's no indication that wsdl2java is trying and failing to read the imported schemas. It's as if it's completely ignoring the catalog file. Any idea what I'm doing wrong? I also tried using SYSTEM paths rather than PUBLIC in the catalog file, same result. Also tried both CXF 2.2 and 2.1.4 with no difference. I could probably contact the maintainers of that service and get them to provide a URL instead of a relative path, and for now I'll just download and modify the appropriate files myself. But it's a bit of a shame if it doesn't work as designed, especially since SoapUI just resolves the locations for me automatically. If this is unexpected behaviour, let me know and I'll JIRA it. Thanks, Andrew. -- :: http://biotext.org.uk/ ::
