/** {@inheritDoc} */ public Document newDocument() throws XMLParserException { DocumentBuilder builder = getBuilder(); Document document = builder.newDocument(); returnBuilder(builder); return document; }
/** {@inheritDoc} */ public Document newDocument() throws XMLParserException { DocumentBuilder builder = getBuilder(); Document document = builder.newDocument(); returnBuilder(builder); return document; }
private Response parseResponse(String authnResponse) throws SAMLException { try { final Document doc = parsers.getBuilder() .parse(new InputSource(new StringReader(authnResponse))); final Element root = doc.getDocumentElement(); return (Response) Configuration.getUnmarshallerFactory() .getUnmarshaller(root) .unmarshall(root); } catch (org.opensaml.xml.parse.XMLParserException | org.opensaml.xml.io.UnmarshallingException | org.xml.sax.SAXException | java.io.IOException e) { throw new SAMLException(e); } }
/** {@inheritDoc} */ public Document parse(Reader input) throws XMLParserException { DocumentBuilder builder = getBuilder(); try { Document document = builder.parse(new InputSource(input)); return document; } catch (SAXException e) { throw new XMLParserException("Invalid XML", e); } catch (IOException e) { throw new XMLParserException("Unable to read XML from input stream", e); } finally { returnBuilder(builder); } }
/** {@inheritDoc} */ public Document parse(Reader input) throws XMLParserException { DocumentBuilder builder = getBuilder(); try { Document document = builder.parse(new InputSource(input)); return document; } catch (SAXException e) { throw new XMLParserException("Invalid XML", e); } catch (IOException e) { throw new XMLParserException("Unable to read XML from input stream", e); } finally { returnBuilder(builder); } }
/** {@inheritDoc} */ public Document parse(InputStream input) throws XMLParserException { DocumentBuilder builder = getBuilder(); try { Document document = builder.parse(input); return document; } catch (SAXException e) { throw new XMLParserException("Invalid XML", e); } catch (IOException e) { throw new XMLParserException("Unable to read XML from input stream", e); } finally { returnBuilder(builder); } }
/** {@inheritDoc} */ public Document parse(InputStream input) throws XMLParserException { DocumentBuilder builder = getBuilder(); try { Document document = builder.parse(input); return document; } catch (SAXException e) { throw new XMLParserException("Invalid XML", e); } catch (IOException e) { throw new XMLParserException("Unable to read XML from input stream", e); } finally { returnBuilder(builder); } }
private Response parseResponse(String authnResponse) throws SAMLException { try { Document doc = parsers.getBuilder() .parse(new InputSource(new StringReader(authnResponse))); Element root = doc.getDocumentElement(); return (Response) Configuration.getUnmarshallerFactory() .getUnmarshaller(root) .unmarshall(root); } catch (org.opensaml.xml.parse.XMLParserException e) { throw new SAMLException(e); } catch (org.opensaml.xml.io.UnmarshallingException e) { throw new SAMLException(e); } catch (org.xml.sax.SAXException e) { throw new SAMLException(e); } catch (java.io.IOException e) { throw new SAMLException(e); } }