/* */ }
/* */
/* 126 */ if (configURL == null) {
/* 127 */ throw new IllegalArgumentException("Cannot load config from: " + configLocation);
/* */ }
/* 129 */ Configuration config = new Configuration();
/* 130 */ InputStream is = configURL.openStream();
/* */ try
/* */ {
/* 133 */ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
/* 134 */ unmarshaller.setNamespaceAware(true);
/* 135 */ unmarshaller.setSchemaValidation(true);
/* 136 */ unmarshaller.setValidation(true);
/* 137 */ unmarshaller.unmarshal(is, this, config);
/* */ }
/* */ catch (JBossXBException ex)
/* */ {
/* 141 */ IOException ioex = new IOException("Cannot parse config: " + ex.getMessage());
/* 142 */ ioex.initCause(ex);
/* 143 */ throw ioex;
/* */ }
/* */ finally
/* */ {
/* 147 */ is.close();
/* */ }
/* */
/* 150 */ if ((config.getJavaToWSDLConfig(false) == null) && (config.getWSDLToJavaConfig(false) == null)) {
/* 151 */ throw new WSException("Invalid configuration file, either java-wsdl, or wsdl-java must be present");
/* */ }
/* 153 */ log.trace("Exit readConfig");
/* 154 */ return config;
/* */ }