public MessageExchangeFactory createExchangeFactoryForService(QName serviceName) { return channel.createExchangeFactoryForService(serviceName); }
public MessageExchangeFactory createExchangeFactoryForService(QName serviceName) { return delegate.createExchangeFactoryForService(serviceName); }
public MessageExchangeFactory createExchangeFactoryForService(QName qName) { return getChannel().createExchangeFactoryForService(qName); }
/** * creates a msg object * * @param qname * the service which will be the receiver * @param inOut * should it be inOut or InOnly * @return the created exchange * @throws MessagingException */ public MessageExchange getNewExchange(QName qname, boolean inOut) throws MessagingException { MessageExchange exchange = null; if (inOut) { exchange = getChannel().createExchangeFactoryForService(qname).createInOutExchange(); } else { exchange = getChannel().createExchangeFactoryForService(qname).createInOnlyExchange(); } return exchange; }
protected boolean transform(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) throws MessagingException { NormalizedMessage curIn = in; MessageExchange curExchange = exchange; for (int i = 0; i < services.length; i++) { InOut mexchange = this.getDeliveryChannel() .createExchangeFactoryForService(services[i]) .createInOutExchange(); copyProperties(curExchange, mexchange); curIn = invokeService(mexchange, curIn, services[i]); curExchange = mexchange; } getMessageTransformer().transform(exchange, curIn, out); copyProperties(curExchange, exchange); return true; }
/** * sends the given DOMSource as message to the given service (inOut) * * @param service * the service name to send the message to * @param source * the source to put in the in message content * @return the DOMSource of the out message or null * @throws MessagingException * on any messaging exception */ public MessageExchange sendRawInOutRequest(QName service, Source source) throws MessagingException { InOut inOut = getChannel().createExchangeFactoryForService(service).createInOutExchange(); NormalizedMessage msg = inOut.createMessage(); msg.setContent(source); inOut.setInMessage(msg); if (getChannel().sendSync(inOut)) { return inOut; } else { return null; } }
/** * Creates a new InOnly exchange for the given service, interface and/or operation (any of which can be null). */ public InOnly createInOnlyExchange(QName service, QName interfaceName, QName operation) throws MessagingException { DeliveryChannel channel = getDeliveryChannel(); MessageExchangeFactory factory = null; if (service != null) { factory = channel.createExchangeFactoryForService(service); } else if (interfaceName != null) { factory = channel.createExchangeFactory(interfaceName); } else { factory = getExchangeFactory(); } InOnly outExchange = factory.createInOnlyExchange(); if (service != null) { outExchange.setService(service); } if (interfaceName != null) { outExchange.setInterfaceName(interfaceName); } if (operation != null) { outExchange.setOperation(operation); } return outExchange; }
/** * Creates a new InOut exchange for the given service, interface and/or operation (any of which can be null). */ public InOut createInOutExchange(QName service, QName interfaceName, QName operation) throws MessagingException { DeliveryChannel channel = getDeliveryChannel(); MessageExchangeFactory factory = null; if (service != null) { factory = channel.createExchangeFactoryForService(service); } else if (interfaceName != null) { factory = channel.createExchangeFactory(interfaceName); } else { factory = getExchangeFactory(); } InOut outExchange = factory.createInOutExchange(); if (service != null) { outExchange.setService(service); } if (interfaceName != null) { outExchange.setInterfaceName(interfaceName); } if (operation != null) { outExchange.setOperation(operation); } return outExchange; }
/** * sends the given DOMSource as message to the given service (inOnly) * * @param service * the service name to send the message to * @param source * the source to put in the in message content * @return true on sucessful delivering or false on failure * @throws MessagingException * on any messaging exception */ public boolean sendMessage(QName service, Source source) throws MessagingException { InOnly inOnly = getChannel().createExchangeFactoryForService(service).createInOnlyExchange(); NormalizedMessage msg = inOnly.createMessage(); msg.setContent(source); inOnly.setInMessage(msg); if (getChannel().sendSync(inOnly)) { return inOnly.getStatus() == ExchangeStatus.DONE; } else { return false; } }
/** * sends the given DOMSource as message to the given service (inOut) * * @param service * the service name to send the message to * @param source * the source to put in the in message content * @return the DOMSource of the out message or null * @throws MessagingException * on any messaging exception */ public Source sendRequest(QName service, Source source) throws MessagingException { InOut inOut = getChannel().createExchangeFactoryForService(service).createInOutExchange(); NormalizedMessage msg = inOut.createMessage(); msg.setContent(source); inOut.setInMessage(msg); if (getChannel().sendSync(inOut)) { try { Source result = sourceTransformer.toDOMSource(inOut.getOutMessage().getContent()); done(inOut); return result; } catch (Exception ex) { ex.printStackTrace(); return null; } } else { return null; } }
/** * Creates a new InOnly exchange for the given service, interface and/or operation (any of which can be null). */ public InOnly createInOnlyExchange(QName service, QName interfaceName, QName operation) throws MessagingException { MessageExchangeFactory factory = null; if (service != null) { factory = getDeliveryChannel().createExchangeFactoryForService(service); } else if (interfaceName != null) { factory = getDeliveryChannel().createExchangeFactory(interfaceName); } else { factory = getExchangeFactory(); } InOnly outExchange = factory.createInOnlyExchange(); if (service != null) { outExchange.setService(service); } if (interfaceName != null) { outExchange.setInterfaceName(interfaceName); } if (operation != null) { outExchange.setOperation(operation); } return outExchange; }
/** * Creates a new InOut exchange for the given service, interface and/or operation (any of which can be null). */ public InOut createInOutExchange(QName service, QName interfaceName, QName operation) throws MessagingException { MessageExchangeFactory factory = null; if (service != null) { factory = getDeliveryChannel().createExchangeFactoryForService(service); } else if (interfaceName != null) { factory = getDeliveryChannel().createExchangeFactory(interfaceName); } else { factory = getExchangeFactory(); } InOut outExchange = factory.createInOutExchange(); if (service != null) { outExchange.setService(service); } if (interfaceName != null) { outExchange.setInterfaceName(interfaceName); } if (operation != null) { outExchange.setOperation(operation); } return outExchange; }
MessageExchangeFactory factory = channel.createExchangeFactoryForService(serviceName); LOG.info(new org.apache.cxf.common.i18n.Message("CREATE.MESSAGE.EXCHANGE", LOG).toString() + serviceName);
MessageExchangeFactory factory = channel.createExchangeFactoryForService(serviceName); LOG.info(new org.apache.cxf.common.i18n.Message("CREATE.MESSAGE.EXCHANGE", LOG).toString() + serviceName);