Package org.apache.cxf.databinding

Examples of org.apache.cxf.databinding.DataReaderFactory


        return Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE));
    }

    protected DataReader getDataReader(Message message, Class<?> input) {
        Service service = ServiceModelUtil.getService(message.getExchange());
        DataReaderFactory factory = service.getDataBinding().getDataReaderFactory();
        setSchemaInMessage(service, message);
        DataReader dataReader = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == input) {
                dataReader = factory.createReader(input);
                break;
            }
        }
        if (dataReader == null) {
            throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAREADER",
View Full Code Here


        return dataReader;
    }

    protected DataReader<Message> getMessageDataReader(Message message) {
        Service service = ServiceModelUtil.getService(message.getExchange());
        DataReaderFactory factory = service.getDataBinding().getDataReaderFactory();
        setSchemaInMessage(service, message);
        DataReader<Message> dataReader = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == Message.class) {
                dataReader = factory.createReader(Message.class);
                break;
            }
        }
        if (dataReader == null) {
            throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAREADER",
View Full Code Here

        return dataReader;
    }

    protected DataReader<XMLStreamReader> getDataReader(Message message) {
        Service service = ServiceModelUtil.getService(message.getExchange());
        DataReaderFactory factory = service.getDataBinding().getDataReaderFactory();
        setSchemaInMessage(service, message);
        DataReader<XMLStreamReader> dataReader = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == XMLStreamReader.class) {
                dataReader = factory.createReader(XMLStreamReader.class);
                break;
            }
        }
        if (dataReader == null) {
            throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAREADER",
View Full Code Here

        return dataReader;
    }

    protected DataReader<Node> getNodeDataReader(Message message) {
        Service service = ServiceModelUtil.getService(message.getExchange());
        DataReaderFactory factory = service.getDataBinding().getDataReaderFactory();
        setSchemaInMessage(service, message);
        DataReader<Node> dataReader = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == Node.class) {
                dataReader = factory.createReader(Node.class);
                break;
            }
        }
        if (dataReader == null) {
            throw new Fault(
View Full Code Here

TOP

Related Classes of org.apache.cxf.databinding.DataReaderFactory

Copyright © 2018 www.massapicom. 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.