Examples of XMLizer


Examples of org.apache.excalibur.xmlizer.XMLizer

     * @throws CascadingIOException
     */
    protected byte[] readXMLResponse(Source source, byte[] binary, ServiceManager manager)
    throws SAXException, IOException, CascadingIOException {
        XMLSerializer serializer = null;
        XMLizer xmlizer = null;
        byte[] result = null;
        try {
            serializer = (XMLSerializer) manager.lookup(XMLSerializer.ROLE);

            if (source instanceof XMLizable) {
                ((XMLizable) source).toSAX(serializer);
            }
            else {
                if (binary == null) {
                    binary = readBinaryResponse(source);
                }
                final String mimeType = source.getMimeType();
                if (mimeType != null) {
                    xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
                    xmlizer.toSAX(new ByteArrayInputStream(binary),
                                  mimeType,
                                  source.getURI(),
                                  serializer);
                }
            }
View Full Code Here

Examples of org.apache.excalibur.xmlizer.XMLizer

            String mimeType = source.getMimeType();
            if (null == mimeType) {
                mimeType = mimeTypeHint;
            }

            XMLizer xmlizer = null;
            try {
                xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
                xmlizer.toSAX(source.getInputStream(),
                              mimeType,
                              source.getURI(),
                              handler);
            } catch (SourceException e) {
                throw SourceUtil.handle(e);
View Full Code Here

Examples of org.apache.excalibur.xmlizer.XMLizer

            String mimeType = source.getMimeType();
            if (null == mimeType) {
                mimeType = mimeTypeHint;
            }

            XMLizer xmlizer = null;
            try {
                xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
                xmlizer.toSAX(source.getInputStream(),
                              mimeType,
                              source.getURI(),
                              handler);
            } catch (SourceException e) {
                throw SourceUtil.handle(e);
View Full Code Here

Examples of org.apache.excalibur.xmlizer.XMLizer

                    }
                }
                if (mimeType != null && mimeType.equals("text/xml")) {
                    super.contentHandler.startElement(NS_URI, BODY_TAG, NS_PREFIX + BODY_TAG, atts);
                    IncludeXMLConsumer consumer = new IncludeXMLConsumer(super.contentHandler);
                    XMLizer xmlizer = null;
                    try {
                        xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
                        xmlizer.toSAX(in, mimeType, m_target, consumer);
                    } catch (ServiceException ce) {
                        throw new SAXException("Missing service dependency: " + XMLizer.ROLE, ce);
                    } finally {
                        manager.release(xmlizer);
                    }
View Full Code Here

Examples of org.apache.excalibur.xmlizer.XMLizer

     * @throws IOException
     * @throws CascadingIOException
     */
    protected byte[] readXMLResponse(Source source, byte[] binary, ServiceManager manager)
    throws SAXException, IOException, CascadingIOException {
        XMLizer xmlizer = null;
        try {
            XMLByteStreamCompiler serializer = new XMLByteStreamCompiler();

            if (source instanceof XMLizable) {
                ((XMLizable) source).toSAX(serializer);
            } else {
                final String mimeType = source.getMimeType();
                if (mimeType != null) {
                    xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
                    xmlizer.toSAX(new ByteArrayInputStream(binary),
                                  mimeType,
                                  source.getURI(),
                                  serializer);
                }
            }
View Full Code Here

Examples of org.apache.excalibur.xmlizer.XMLizer

        } else {
            String mimeType = source.getMimeType();
            if (null == mimeType) {
                mimeType = mimeTypeHint;
            }
            XMLizer xmlizer = null;
            try {
                xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
                xmlizer.toSAX(source.getInputStream(),
                              mimeType,
                              source.getURI(),
                              handler);
            } catch (SourceException se) {
                throw SourceUtil.handle(se);
View Full Code Here

Examples of org.apache.excalibur.xmlizer.XMLizer

        if (source instanceof XMLizable) {
            ((XMLizable) source).toSAX(handler);
        } else {
            String mimeType = source.getMimeType();
            if (null == mimeType) mimeType = mimeTypeHint;
            XMLizer xmlizer = null;
            try {
                xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
                xmlizer.toSAX(source.getInputStream(),
                              mimeType,
                              source.getURI(),
                              handler);
            } catch (SourceException e) {
                throw SourceUtil.handle(e);
View Full Code Here

Examples of org.apache.excalibur.xmlizer.XMLizer

        if ( source instanceof XMLizable ) {
            ((XMLizable)source).toSAX( handler );
        } else {
            String mimeType = source.getMimeType();
            if ( null == mimeType) mimeType = mimeTypeHint;
            XMLizer xmlizer = null;
            try {
                xmlizer = (XMLizer) manager.lookup( XMLizer.ROLE);
                xmlizer.toSAX( source.getInputStream(),
                               mimeType,
                               source.getURI(),
                               handler );
            } catch (SourceException se) {
                throw SourceUtil.handle(se);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.