/** * Write the default namespace * * @param writer * @param ns * @throws ProcessingException */ public static void writeDefaultNameSpace(XMLStreamWriter writer, String ns) throws ProcessingException { try { writer.writeDefaultNamespace(ns); } catch (XMLStreamException e) { throw logger.processingError(e); } }
/** * Flush the stream writer * * @param writer * @throws ProcessingException */ public static void flush(XMLStreamWriter writer) throws ProcessingException { try { writer.flush(); } catch (XMLStreamException e) { throw logger.processingError(e); } }
/** * Flush the stream writer * * @param writer * * @throws ProcessingException */ public static void flush(XMLStreamWriter writer) throws ProcessingException { try { writer.flush(); } catch (XMLStreamException e) { throw logger.processingError(e); } }
public static XMLStreamWriter getXMLStreamWriter(final Result result) throws ProcessingException { XMLOutputFactory factory = XMLOutputFactory.newInstance(); try { return factory.createXMLStreamWriter(result); } catch (XMLStreamException xe) { throw logger.processingError(xe); } }
public static Element assertionToElement(final String assertion) throws ProcessingException { try { Document document = DocumentUtil.getDocument(assertion); return (Element) document.getFirstChild(); } catch (final ConfigurationException e) { throw logger.processingError(e); } catch (final ParsingException e) { throw logger.processingError(e); } }
public static Element assertionToElement(final String assertion) throws ProcessingException { try { Document document = DocumentUtil.getDocument(assertion); return (Element) document.getFirstChild(); } catch (final ConfigurationException e) { throw logger.processingError(e); } catch (final ParsingException e) { throw logger.processingError(e); } }
public static Node getNodeFromSource(Source source) throws ProcessingException, ConfigurationException { try { Transformer transformer = TransformerUtil.getTransformer(); DOMResult result = new DOMResult(); transformer.transform(source, result); return result.getNode(); } catch (TransformerException te) { throw logger.processingError(te); } }
public static XMLStreamWriter getXMLStreamWriter(final Result result) throws ProcessingException { XMLOutputFactory factory = getXMLOutputFactory(); try { return factory.createXMLStreamWriter(result); } catch (XMLStreamException xe) { throw logger.processingError(xe); } }
public static Document getDocumentFromSource(Source source) throws ProcessingException, ConfigurationException { try { Transformer transformer = TransformerUtil.getTransformer(); DOMResult result = new DOMResult(); transformer.transform(source, result); return (Document) result.getNode(); } catch (TransformerException te) { throw logger.processingError(te); } }
public static XMLStreamWriter getXMLStreamWriter(final Result result) throws ProcessingException { XMLOutputFactory factory = getXMLOutputFactory(); try { return factory.createXMLStreamWriter(result); } catch (XMLStreamException xe) { throw logger.processingError(xe); } }
public static Node getNodeFromSource(Source source) throws ProcessingException, ConfigurationException { try { Transformer transformer = TransformerUtil.getTransformer(); DOMResult result = new DOMResult(); TransformerUtil.transform(transformer, source, result); return result.getNode(); } catch (ParsingException te) { throw logger.processingError(te); } }
public static Document getDocumentFromSource(Source source) throws ProcessingException, ConfigurationException { try { Transformer transformer = TransformerUtil.getTransformer(); DOMResult result = new DOMResult(); TransformerUtil.transform(transformer, source, result); return (Document) result.getNode(); } catch (ParsingException te) { throw logger.processingError(te); } }
public static Node getNodeFromSource(Source source) throws ProcessingException, ConfigurationException { try { Transformer transformer = TransformerUtil.getTransformer(); DOMResult result = new DOMResult(); TransformerUtil.transform(transformer, source, result); return result.getNode(); } catch (ParsingException te) { throw logger.processingError(te); } }
public static Document getDocumentFromSource(Source source) throws ProcessingException, ConfigurationException { try { Transformer transformer = TransformerUtil.getTransformer(); DOMResult result = new DOMResult(); TransformerUtil.transform(transformer, source, result); return (Document) result.getNode(); } catch (ParsingException te) { throw logger.processingError(te); } }
private DOMSource createSourceFromRequest(RequestSecurityToken request) throws WSTrustException { try { DOMResult result = new DOMResult(DocumentUtil.createDocument()); WSTrustRequestWriter writer = new WSTrustRequestWriter(result); writer.write(request); return new DOMSource(result.getNode()); } catch (Exception e) { throw new WSTrustException(logger.processingError(e)); } }
private DOMSource createSourceFromRequest(RequestSecurityToken request) throws WSTrustException { try { DOMResult result = new DOMResult(DocumentUtil.createDocument()); WSTrustRequestWriter writer = new WSTrustRequestWriter(result); writer.write(request); return new DOMSource(result.getNode()); } catch (Exception e) { throw new WSTrustException(logger.processingError(e)); } }
public static Document getXACMLResponse(ResponseType responseType) throws ProcessingException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); JAXBElement<?> jaxb = (new ObjectFactory()).createResponse(responseType); StreamResult result = new StreamResult(baos); try { TransformerUtil.transform(SAMLXACMLUtil.getJAXBContext(), jaxb, result); return DocumentUtil.getDocument(new String(baos.toByteArray())); } catch (Exception e) { throw logger.processingError(e); } }
public static Document getXACMLResponse(ResponseType responseType) throws ProcessingException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); JAXBElement<?> jaxb = (new ObjectFactory()).createResponse(responseType); StreamResult result = new StreamResult(baos); try { TransformerUtil.transform(SAMLXACMLUtil.getJAXBContext(), jaxb, result); return DocumentUtil.getDocument(new String(baos.toByteArray())); } catch (Exception e) { throw logger.processingError(e); } }
public static Document getXACMLRequest(RequestType requestType) throws ProcessingException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); // Marshaller marshaller = getMarshaller(); JAXBElement<?> jaxb = (new ObjectFactory()).createRequest(requestType); StreamResult result = new StreamResult(baos); try { TransformerUtil.transform(getJAXBContext(), jaxb, result); return DocumentUtil.getDocument(new String(baos.toByteArray())); } catch (Exception e) { throw logger.processingError(e); } } }
public static Document getXACMLRequest(RequestType requestType) throws ProcessingException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); // Marshaller marshaller = getMarshaller(); JAXBElement<?> jaxb = (new ObjectFactory()).createRequest(requestType); StreamResult result = new StreamResult(baos); try { TransformerUtil.transform(getJAXBContext(), jaxb, result); return DocumentUtil.getDocument(new String(baos.toByteArray())); } catch (Exception e) { throw logger.processingError(e); } } }