/** * Constructs an XmlRuntimeException from an {@link XmlException}. */ public XmlRuntimeException ( XmlException xmlException ) { super( xmlException.getMessage(), xmlException.getCause() ); Collection errors = xmlException.getErrors(); if (errors != null) _errors = Collections.unmodifiableList( new ArrayList( errors ) ); }
/** * Constructs an XmlRuntimeException from an {@link XmlException}. */ public XmlRuntimeException ( XmlException xmlException ) { super( xmlException.getMessage(), xmlException.getCause() ); Collection errors = xmlException.getErrors(); if (errors != null) _errors = Collections.unmodifiableList( new ArrayList( errors ) ); }
/** * Constructs an XmlRuntimeException from an {@link XmlException}. */ public XmlRuntimeException ( XmlException xmlException ) { super( xmlException.getMessage(), xmlException.getCause() ); Collection errors = xmlException.getErrors(); if (errors != null) _errors = Collections.unmodifiableList( new ArrayList( errors ) ); }
/** * Compiles WSDL file resource to a XmlObject. * @return * @throws IOException */ private XmlObject compileWsdl(Resource wsdlResource) { try { File wsdlFile = wsdlResource.getFile(); return XmlObject.Factory.parse(wsdlFile, (new XmlOptions()).setLoadLineNumbers().setLoadMessageDigest().setCompileDownloadUrls()); } catch (XmlException e) { for (Object error : e.getErrors()) { log.error(((XmlError)error).getLine() + "" + error.toString()); } throw new SimulatorException("WSDL could not be parsed", e); } catch (Exception e) { throw new SimulatorException("WSDL could not be parsed", e); } }
schemaTypeSystem = XmlBeans.compileXsd(xsd, XmlBeans.getContextTypeLoader(), new XmlOptions()); } catch (XmlException e) { for (Object error : e.getErrors()) { log.error("Line " + ((XmlError)error).getLine() + ": " + error.toString());