Package org.apache.cxf.databinding

Examples of org.apache.cxf.databinding.DataWriterFactory


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

    protected DataWriter<XMLStreamWriter> getDataWriter(Message message) {
        Service service = ServiceModelUtil.getService(message.getExchange());
        DataWriterFactory factory = service.getDataBinding().getDataWriterFactory();

        DataWriter<XMLStreamWriter> dataWriter = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == XMLStreamWriter.class) {
                dataWriter = factory.createWriter(XMLStreamWriter.class);
                break;
            }
        }

        if (dataWriter == null) {
View Full Code Here


        return Boolean.TRUE.equals(message.containsKey(Message.REQUESTOR_ROLE));
    }
   
    protected DataWriter getDataWriter(Message message, Class<?> output) {
        Service service = ServiceModelUtil.getService(message.getExchange());
        DataWriterFactory factory = service.getDataBinding().getDataWriterFactory();
        setSchemaOutMessage(service, message);
        DataWriter dataWriter = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == output) {
                dataWriter = factory.createWriter(output);
                break;
            }
        }

        if (dataWriter == null) {
View Full Code Here

    }

    protected DataWriter<Message> getMessageDataWriter(Message message) {
       
        Service service = ServiceModelUtil.getService(message.getExchange());
        DataWriterFactory factory = service.getDataBinding().getDataWriterFactory();
        setSchemaOutMessage(service, message);
        DataWriter<Message> dataWriter = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == Message.class) {
                dataWriter = factory.createWriter(Message.class);
                break;
            }
        }

        if (dataWriter == null) {
View Full Code Here

        return dataWriter;
    }

    protected DataWriter<XMLStreamWriter> getDataWriter(Message message) {
        Service service = ServiceModelUtil.getService(message.getExchange());
        DataWriterFactory factory = service.getDataBinding().getDataWriterFactory();
        setSchemaOutMessage(service, message);
        DataWriter<XMLStreamWriter> dataWriter = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == XMLStreamWriter.class) {
                dataWriter = factory.createWriter(XMLStreamWriter.class);
                break;
            }
        }

        if (dataWriter == null) {
View Full Code Here

                Method method = cause.getClass().getMethod("getFaultInfo", new Class[0]);
                Object faultInfo = method.invoke(cause, new Object[0]);

                Service service = message.getExchange().get(Service.class);

                DataWriterFactory writerFactory = service.getDataBinding().getDataWriterFactory();
                DataWriter<Node> writer = writerFactory.createWriter(Node.class);

                OperationInfo op = message.getExchange().get(BindingOperationInfo.class).getOperationInfo();
                QName faultName = getFaultName(ex);
                MessagePartInfo part = getFaultMessagePart(faultName, op);
                writer.write(faultInfo, part, f.getOrCreateDetail());
View Full Code Here

TOP

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

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.