/** * @deprecated Please use the {@link OMXMLBuilderFactory} API. */ public StAXSOAPModelBuilder(XMLStreamReader parser, String soapVersion) { this(OMAbstractFactory.getMetaFactory(), parser, soapVersion); }
/** * Get the meta factory instance for the default Axiom implementation. This method is equivalent * to {@link #getMetaFactory(String)} with {@link #FEATURE_DEFAULT} as parameter. * * @return the meta factory instance for the default Axiom implementation * @throws OMException * if no Axiom implementation with {@link #FEATURE_DEFAULT} could be located */ public static OMMetaFactory getMetaFactory() { return getMetaFactory(FEATURE_DEFAULT); }
/** * @deprecated Please use the {@link OMXMLBuilderFactory} API. */ public StAXSOAPModelBuilder(XMLStreamReader parser) { this(OMAbstractFactory.getMetaFactory(), parser); }
/** * Get the default SOAP 1.1 OM factory instance. This method has the same effect as calling * {@link OMMetaFactory#getSOAP11Factory()} on the {@link OMMetaFactory} instance returned by * {@link #getMetaFactory()}. * * @return the default SOAP 1.1 OM factory instance * @throws OMException if the factory's implementation class can't be found * or if the class can't be instantiated */ public static SOAPFactory getSOAP11Factory() { return getMetaFactory().getSOAP11Factory(); }
/** * Create an object model builder for SOAP that reads a message from the provided {@link Source}. * The method will select the appropriate {@link SOAPFactory} based on the namespace URI of * the SOAP envelope. * * @param source * the source of the SOAP message * @return the builder */ public static SOAPModelBuilder createSOAPModelBuilder(Source source) { return createSOAPModelBuilder(OMAbstractFactory.getMetaFactory(), source); }
/** * Get the default OM factory instance. This method has the same effect as calling * {@link OMMetaFactory#getOMFactory()} on the {@link OMMetaFactory} instance returned by * {@link #getMetaFactory()}. * * @return the default OM factory instance * @throws OMException if the factory's implementation class can't be found * or if the class can't be instantiated */ public static OMFactory getOMFactory() { return getMetaFactory().getOMFactory(); }
/** * Create an object model builder for SOAP that reads a message from the provided character * stream. The method will select the appropriate {@link SOAPFactory} based on the namespace URI * of the SOAP envelope. It will configure the underlying parser as specified by * {@link StAXParserConfiguration#SOAP}. * * @param in * the character stream containing the SOAP message * @return the builder */ public static SOAPModelBuilder createSOAPModelBuilder(Reader in) { return createSOAPModelBuilder(OMAbstractFactory.getMetaFactory(), in); }
/** * Get the default SOAP 1.2 OM factory instance. This method has the same effect as calling * {@link OMMetaFactory#getSOAP12Factory()} on the {@link OMMetaFactory} instance returned by * {@link #getMetaFactory()}. * * @return the default SOAP 1.2 OM factory instance * @throws OMException if the factory's implementation class can't be found * or if the class can't be instantiated */ public static SOAPFactory getSOAP12Factory() { return getMetaFactory().getSOAP12Factory(); } }
public Result getResult() { DOMMetaFactory domMetaFactory = ((DOMMetaFactory)OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM)); try { document = domMetaFactory.newDocumentBuilderFactory().newDocumentBuilder().newDocument(); } catch (ParserConfigurationException e) { handleException("Unable to create empty DOOM document", e); } return new DOMResult(document); }
public Source getSource(OMElement node) { return new DOMSource( ((Element) ElementHelper.importOMElement(node, OMAbstractFactory.getMetaFactory( OMAbstractFactory.FEATURE_DOM).getOMFactory())).getOwnerDocument()); }
/** * Create an object model builder that reads a plain XML document from the provided * {@link Source}. When used with a {@link DOMSource} or {@link SAXSource}, entities are * expanded, i.e. the method has the same behavior as {@link #createOMBuilder(Node, boolean)} * and {@link #createOMBuilder(SAXSource, boolean)} with {@code expandEntityReferences} set to * {@code true}. * * @param source * the source of the XML document * @return the builder */ public static OMXMLParserWrapper createOMBuilder(Source source) { OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(); return metaFactory.createOMBuilder(metaFactory.getOMFactory(), source); }
public TextImplEx(String data) { this(OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM).getOMFactory().createOMText(data)); }
public static Element getElementFromAssertion(XMLObject xmlObj) throws TrustException { try { MarshallerFactory marshallerFactory = org.opensaml.xml.Configuration.getMarshallerFactory(); Marshaller marshaller = marshallerFactory.getMarshaller(xmlObj); Element assertionElement = marshaller.marshall(xmlObj, ((DOMMetaFactory)OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM)).newDocumentBuilderFactory().newDocumentBuilder().newDocument()); log.debug("DOM element is created successfully from the OpenSAML2 XMLObject"); return assertionElement; } catch (Exception e) { throw new TrustException("Error creating DOM object from the assertion", e); } }
/** * Create a DOM Document using the org.apache.axiom.soap.SOAPEnvelope * * @param env An org.apache.axiom.soap.SOAPEnvelope instance * @return the org.apache.axis2.soap.impl.dom.SOAPEnvelopeImpl of the given SOAP Envelope */ public static Element toDOOMSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope env) { return (Element)OMXMLBuilderFactory.createStAXSOAPModelBuilder( OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM), env.getXMLStreamReader()).getSOAPEnvelope(); }
/** * @param unattachedReference The unattachedReference to set. */ public void setUnattachedReference(OMElement unattachedReference) { if (unattachedReference != null) { OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM); this.unattachedReference = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(), unattachedReference.getXMLStreamReader()).getDocumentElement(); } }
/** * @param presivousToken The presivousToken to set. */ public void setPreviousToken(OMElement presivousToken) { OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM); this.previousToken = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(), presivousToken.getXMLStreamReader()).getDocumentElement(); }
/** * @param attachedReference The attachedReference to set. */ public void setAttachedReference(OMElement attachedReference) { if (attachedReference != null) { OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM); this.attachedReference = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(), attachedReference.getXMLStreamReader()).getDocumentElement(); } }
public Token(String id, OMElement tokenElem, Date created, Date expires) throws TrustException { this.id = id; OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM); OMXMLStreamReaderConfiguration configuration = new OMXMLStreamReaderConfiguration(); configuration.setNamespaceURIInterning(true); this.token = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(), tokenElem.getXMLStreamReader(true, configuration)).getDocumentElement(); this.created = created; this.expires = expires; }
public Element convert(OMElement s) { try { return (Element) OMXMLBuilderFactory.createStAXOMBuilder( OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM).getOMFactory(), s.getXMLStreamReader()).getDocumentElement(); } catch (OMException err) { // likely no DOOM return new StaxToDOMConverter().convert(s.getXMLStreamReader()); } }
public Token(String id, OMElement tokenElem, OMElement lifetimeElem) throws TrustException { this.id = id; OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM); OMXMLStreamReaderConfiguration configuration = new OMXMLStreamReaderConfiguration(); configuration.setNamespaceURIInterning(true); this.token = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(), tokenElem.getXMLStreamReader(true, configuration)).getDocumentElement(); this.processLifeTime(lifetimeElem); }