protected void prepareConduitSelector(Message message, URI currentURI, boolean proxy) { try { cfg.prepareConduitSelector(message); } catch (Fault ex) { LOG.warning("Failure to prepare a message from conduit selector"); } message.getExchange().put(ConduitSelector.class, cfg.getConduitSelector()); message.getExchange().put(Service.class, cfg.getConduitSelector().getEndpoint().getService()); String address = (String)message.get(Message.ENDPOINT_ADDRESS); // custom conduits may override the initial/current address if (address.startsWith(HTTP_SCHEME) && !address.equals(currentURI.toString())) { URI baseAddress = URI.create(address); currentURI = calculateNewRequestURI(baseAddress, currentURI, proxy); message.put(Message.ENDPOINT_ADDRESS, currentURI.toString()); message.put(Message.REQUEST_URI, currentURI.toString()); } message.put(Message.BASE_PATH, getBaseURI().toString()); }
protected void prepareConduitSelector(Message message, URI currentURI, boolean proxy) { try { cfg.prepareConduitSelector(message); } catch (Fault ex) { LOG.warning("Failure to prepare a message from conduit selector"); } message.getExchange().put(ConduitSelector.class, cfg.getConduitSelector()); message.getExchange().put(Service.class, cfg.getConduitSelector().getEndpoint().getService()); String address = (String)message.get(Message.ENDPOINT_ADDRESS); // custom conduits may override the initial/current address if (address.startsWith(HTTP_SCHEME) && !address.equals(currentURI.toString())) { URI baseAddress = URI.create(address); currentURI = calculateNewRequestURI(baseAddress, currentURI, proxy); message.put(Message.ENDPOINT_ADDRESS, currentURI.toString()); message.put(Message.REQUEST_URI, currentURI.toString()); } message.put(Message.BASE_PATH, getBaseURI().toString()); }
protected void prepareConduitSelector(Message message, URI currentURI, boolean proxy) { try { cfg.prepareConduitSelector(message); } catch (Fault ex) { LOG.warning("Failure to prepare a message from conduit selector"); } message.getExchange().put(ConduitSelector.class, cfg.getConduitSelector()); message.getExchange().put(Service.class, cfg.getConduitSelector().getEndpoint().getService()); String address = (String)message.get(Message.ENDPOINT_ADDRESS); // custom conduits may override the initial/current address if (address.startsWith(HTTP_SCHEME) && !address.equals(currentURI.toString())) { URI baseAddress = URI.create(address); currentURI = calculateNewRequestURI(baseAddress, currentURI, proxy); message.put(Message.ENDPOINT_ADDRESS, currentURI.toString()); message.put(Message.REQUEST_URI, currentURI.toString()); } message.put(Message.BASE_PATH, getBaseURI().toString()); }
/** * Gets the conduit responsible for a transport-level * communication with the remote service. * @return the conduit */ public Conduit getConduit() { Message message = new MessageImpl(); Exchange exchange = new ExchangeImpl(); message.setExchange(exchange); exchange.put(MessageObserver.class, new ClientMessageObserver(this)); if (conduitSelector != null) { exchange.put(Endpoint.class, conduitSelector.getEndpoint()); } exchange.put(Bus.class, bus); prepareConduitSelector(message); return getConduitSelector().selectConduit(message); }
/** * Gets the conduit responsible for a transport-level * communication with the remote service. * @return the conduit */ public Conduit getConduit() { Message message = new MessageImpl(); Exchange exchange = new ExchangeImpl(); message.setExchange(exchange); exchange.put(MessageObserver.class, new ClientMessageObserver(this)); if (conduitSelector != null) { exchange.put(Endpoint.class, conduitSelector.getEndpoint()); } exchange.put(Bus.class, bus); prepareConduitSelector(message); return getConduitSelector().selectConduit(message); }
/** * Gets the conduit responsible for a transport-level * communication with the remote service. * @return the conduit */ public Conduit getConduit() { Message message = new MessageImpl(); Exchange exchange = new ExchangeImpl(); message.setExchange(exchange); exchange.put(MessageObserver.class, new ClientMessageObserver(this)); if (conduitSelector != null) { exchange.put(Endpoint.class, conduitSelector.getEndpoint()); } exchange.put(Bus.class, bus); prepareConduitSelector(message); return getConduitSelector().selectConduit(message); }