/** * Retrieve To EPR from the context. * * @param conduit the Conduit if available * @param message the current message * @return the retrieved EPR */ public static EndpointReferenceType retrieveTo(Conduit conduit, Message message) { EndpointReferenceType to = null; if (conduit != null) { to = conduit.getTarget(); } else { to = (EndpointReferenceType)message.get(TO_PROPERTY); } return to; }
/** * Retrieve To EPR from the context. * * @param conduit the Conduit if available * @param message the current message * @return the retrieved EPR */ public static EndpointReferenceType retrieveTo(Conduit conduit, Message message) { EndpointReferenceType to = null; if (conduit != null) { to = conduit.getTarget(); } else { to = (EndpointReferenceType)message.get(TO_PROPERTY); } return to; }
protected boolean replaceEndpointAddressPropertyIfNeeded(Message message, String endpointAddress, Conduit cond) { String requestURI = (String)message.get(Message.REQUEST_URI); if (requestURI != null && endpointAddress != null && !requestURI.equals(endpointAddress)) { String basePath = (String)message.get(Message.BASE_PATH); if (basePath != null && requestURI.startsWith(basePath)) { String pathInfo = requestURI.substring(basePath.length()); message.put(Message.BASE_PATH, endpointAddress); final String slash = "/"; boolean startsWithSlash = pathInfo.startsWith(slash); if (endpointAddress.endsWith(slash)) { endpointAddress = endpointAddress + (startsWithSlash ? pathInfo.substring(1) : pathInfo); } else { endpointAddress = endpointAddress + (startsWithSlash ? pathInfo : (slash + pathInfo)); } message.put(Message.ENDPOINT_ADDRESS, endpointAddress); message.put(Message.REQUEST_URI, endpointAddress); Exchange exchange = message.getExchange(); String key = String.valueOf(System.identityHashCode(exchange)); InvocationContext invocation = getInvocationContext(key); if (invocation != null) { overrideAddressProperty(invocation.getContext(), cond.getTarget().getAddress().getValue()); } return true; } } return false; }
protected boolean replaceEndpointAddressPropertyIfNeeded(Message message, String endpointAddress, Conduit cond) { String requestURI = (String)message.get(Message.REQUEST_URI); if (requestURI != null && endpointAddress != null && !requestURI.equals(endpointAddress)) { String basePath = (String)message.get(Message.BASE_PATH); if (basePath != null && requestURI.startsWith(basePath)) { String pathInfo = requestURI.substring(basePath.length()); message.put(Message.BASE_PATH, endpointAddress); final String slash = "/"; boolean startsWithSlash = pathInfo.startsWith(slash); if (endpointAddress.endsWith(slash)) { endpointAddress = endpointAddress + (startsWithSlash ? pathInfo.substring(1) : pathInfo); } else { endpointAddress = endpointAddress + (startsWithSlash ? pathInfo : (slash + pathInfo)); } message.put(Message.ENDPOINT_ADDRESS, endpointAddress); message.put(Message.REQUEST_URI, endpointAddress); Exchange exchange = message.getExchange(); String key = String.valueOf(System.identityHashCode(exchange)); InvocationContext invocation = getInvocationContext(key); if (invocation != null) { overrideAddressProperty(invocation.getContext(), cond.getTarget().getAddress().getValue()); } return true; } } return false; }
false); for (Conduit c2 : conduits) { if (c2.getTarget() == null || c2.getTarget().getAddress() == null || c2.getTarget().getAddress().getValue() == null) { continue; String conduitAddress = c2.getTarget().getAddress().getValue(); if (c2.getTarget() == null || c2.getTarget().getAddress() == null || c2.getTarget().getAddress().getValue() == null) { return c2;
if (c2.getTarget() == null || c2.getTarget().getAddress() == null || c2.getTarget().getAddress().getValue() == null) { continue; String conduitAddress = c2.getTarget().getAddress().getValue(); if (c2.getTarget() == null || c2.getTarget().getAddress() == null || c2.getTarget().getAddress().getValue() == null) { return c2;
false); for (Conduit c2 : conduits) { if (c2.getTarget() == null || c2.getTarget().getAddress() == null || c2.getTarget().getAddress().getValue() == null) { continue; String conduitAddress = c2.getTarget().getAddress().getValue(); if (c2.getTarget() == null || c2.getTarget().getAddress() == null || c2.getTarget().getAddress().getValue() == null) { return c2;
if (c2.getTarget() == null || c2.getTarget().getAddress() == null || c2.getTarget().getAddress().getValue() == null) { continue; String conduitAddress = c2.getTarget().getAddress().getValue(); if (c2.getTarget() == null || c2.getTarget().getAddress() == null || c2.getTarget().getAddress().getValue() == null) { return c2;
@Override public void handleMessage(Message message) throws Fault { TimeMeasure timeMeasure = message.getExchange().get(TimeMeasure.class); if (timeMeasure == null) { if (!this.errorLogged) { LOG.warn("Invalid setup - no TimeMeasure present!"); this.errorLogged = true; } return; } Throwable exception = message.getContent(Exception.class); if (exception == null) { timeMeasure.succeed(); } Conduit conduit = message.get(Conduit.class); EndpointReferenceType target = conduit.getTarget(); String url = target.getAddress().getValue(); timeMeasure.log(LOG, url); }
? conduit.getTarget() : ContextUtils.getNoneEndpointReference(); if (conduit != null && !StringUtils.isEmpty(s)
? conduit.getTarget() : ContextUtils.getNoneEndpointReference(); if (conduit != null && !StringUtils.isEmpty(s)