protected DataReader<XMLStreamReader> getDataReader(Message message) { return getDataReader(message, XMLStreamReader.class); }
protected MessageInfo getMessageInfo(Message message, BindingOperationInfo operation) { return getMessageInfo(message, operation, isRequestor(message)); }
protected <T> DataReader<T> getDataReader(Message message, Class<T> input) { Service service = ServiceModelUtil.getService(message.getExchange()); DataReader<T> dataReader = service.getDataBinding().createReader(input); if (dataReader == null) { throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAREADER", BUNDLE, service.getName())); } dataReader.setAttachments(message.getAttachments()); dataReader.setProperty(DataReader.ENDPOINT, message.getExchange().getEndpoint()); dataReader.setProperty(Message.class.getName(), message); setDataReaderValidation(service, message, dataReader); return dataReader; }
/** * Based on the Schema Validation configuration, will initialise the * DataReader with or without the schema set. * * Can also be called to override schema validation at operation level, thus the reader.setSchema(null) * to remove schema validation */ protected void setDataReaderValidation(Service service, Message message, DataReader<?> reader) { if (shouldValidate(message)) { //all serviceInfos have the same schemas Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); reader.setSchema(schema); } else { reader.setSchema(null); // if this is being called for an operation, then override the service level } }
setMessage(message, lastBoi, client, lastBoi.getBinding().getService(), lastMsgInfo.getMessageInfo());
protected BindingOperationInfo getBindingOperationInfo(Exchange exchange, QName name, boolean client) { BindingOperationInfo bop = ServiceModelUtil.getOperationForWrapperElement(exchange, name, client); if (bop == null) { bop = super.getBindingOperationInfo(exchange, name, client); } if (bop != null) { exchange.put(BindingOperationInfo.class, bop); } return bop; }
protected <T> DataReader<T> getDataReader(Message message, Class<T> input) { Service service = ServiceModelUtil.getService(message.getExchange()); DataReader<T> dataReader = service.getDataBinding().createReader(input); if (dataReader == null) { throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAREADER", BUNDLE, service.getName())); } dataReader.setAttachments(message.getAttachments()); dataReader.setProperty(DataReader.ENDPOINT, message.getExchange().getEndpoint()); dataReader.setProperty(Message.class.getName(), message); setDataReaderValidation(service, message, dataReader); return dataReader; }
/** * Based on the Schema Validation configuration, will initialise the * DataReader with or without the schema set. * * Can also be called to override schema validation at operation level, thus the reader.setSchema(null) * to remove schema validation */ protected void setDataReaderValidation(Service service, Message message, DataReader<?> reader) { if (shouldValidate(message)) { //all serviceInfos have the same schemas Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); reader.setSchema(schema); } else { reader.setSchema(null); // if this is being called for an operation, then override the service level } }
setMessage(message, lastBoi, client, lastBoi.getBinding().getService(), lastMsgInfo.getMessageInfo());
protected BindingOperationInfo getBindingOperationInfo(Exchange exchange, QName name, boolean client) { BindingOperationInfo bop = ServiceModelUtil.getOperationForWrapperElement(exchange, name, client); if (bop == null) { bop = super.getBindingOperationInfo(exchange, name, client); } if (bop != null) { exchange.put(BindingOperationInfo.class, bop); exchange.put(OperationInfo.class, bop.getOperationInfo()); } return bop; }
protected MessageInfo getMessageInfo(Message message, BindingOperationInfo operation) { return getMessageInfo(message, operation, isRequestor(message)); }
protected DataReader<XMLStreamReader> getDataReader(Message message) { return getDataReader(message, XMLStreamReader.class); }
protected <T> DataReader<T> getDataReader(Message message, Class<T> input) { Service service = ServiceModelUtil.getService(message.getExchange()); DataReader<T> dataReader = service.getDataBinding().createReader(input); if (dataReader == null) { throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAREADER", BUNDLE, service.getName())); } dataReader.setAttachments(message.getAttachments()); dataReader.setProperty(DataReader.ENDPOINT, message.getExchange().getEndpoint()); dataReader.setProperty(Message.class.getName(), message); setDataReaderValidation(service, message, dataReader); return dataReader; }
/** * Based on the Schema Validation configuration, will initialise the * DataReader with or without the schema set. * * Can also be called to override schema validation at operation level, thus the reader.setSchema(null) * to remove schema validation */ protected void setDataReaderValidation(Service service, Message message, DataReader<?> reader) { if (shouldValidate(message)) { //all serviceInfos have the same schemas Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); reader.setSchema(schema); } else { reader.setSchema(null); // if this is being called for an operation, then override the service level } }
setMessage(message, lastBoi, client, lastBoi.getBinding().getService(), lastMsgInfo.getMessageInfo());
protected BindingOperationInfo getBindingOperationInfo(Exchange exchange, QName name, boolean client) { BindingOperationInfo bop = ServiceModelUtil.getOperationForWrapperElement(exchange, name, client); if (bop == null) { bop = super.getBindingOperationInfo(exchange, name, client); } if (bop != null) { exchange.put(BindingOperationInfo.class, bop); exchange.put(OperationInfo.class, bop.getOperationInfo()); } return bop; }
protected MessageInfo getMessageInfo(Message message, BindingOperationInfo operation) { return getMessageInfo(message, operation, isRequestor(message)); }