Source:
private Map<String, ProxyProfileConfig> getProxyProfiles(TransportOutDescription transportOut) throws AxisFault { Parameter proxyProfilesParam = transportOut.getParameter("proxyProfiles"); if (proxyProfilesParam == null) { return null; } if (log.isDebugEnabled()) { log.debug(name + " Loading proxy profiles for the HTTP/S sender"); } QName profileQName = new QName("profile"); QName targetHostsQName = new QName("targetHosts"); OMElement proxyProfilesParamEle = proxyProfilesParam.getParameterElement(); Iterator<?> profiles = proxyProfilesParamEle.getChildrenWithName(profileQName); Map<String, ProxyProfileConfig> proxyProfileMap = new HashMap<String, ProxyProfileConfig>(); while (profiles.hasNext()) { OMElement profile = (OMElement) profiles.next(); OMElement targetHostsEle = profile.getFirstChildWithName(targetHostsQName); if (targetHostsEle == null || targetHostsEle.getText() == null) { String msg = "Each proxy profile must define at least one host " + "or a wildcard matcher under the targetHosts element"; log.error(name + " " + msg); throw new AxisFault(msg); } HttpHost proxy = getHttpProxy(profile, targetHostsEle.getText()); UsernamePasswordCredentials proxyCredentials = getUsernamePasswordCredentials(profile); Set<String> proxyBypass = getProxyBypass(profile); ProxyProfileConfig proxyProfileConfig = new ProxyProfileConfig(proxy, proxyCredentials, proxyBypass); String[] targetHosts = targetHostsEle.getText().split(","); for (String endPoint : targetHosts) { endPoint = endPoint.trim(); if (!proxyProfileMap.containsKey(endPoint)) { proxyProfileMap.put(endPoint, proxyProfileConfig); } else { log.warn(name + " Multiple proxy profiles were found for the endPoint : " + endPoint + ". Ignoring the excessive profiles."); } } } if (proxyProfileMap.size() > 0) { log.info(name + " Proxy profiles initialized for " + proxyProfileMap.size() + " targetHosts"); return proxyProfileMap; } return null; }

Target:
private Map<String, ProxyProfileConfig> getProxyProfiles(TransportOutDescription transportOut) throws AxisFault { Parameter proxyProfilesParam = transportOut.getParameter("proxyProfiles"); if (proxyProfilesParam == null) { return null; } if (log.isDebugEnabled()) { log.debug(name + " Loading proxy profiles for the HTTP/S sender"); } OMElement proxyProfilesParamEle = proxyProfilesParam.getParameterElement(); Iterator<?> profiles = proxyProfilesParamEle.getChildrenWithName(Q_PROFILE); Map<String, ProxyProfileConfig> proxyProfileMap = new HashMap<String, ProxyProfileConfig>(); while (profiles.hasNext()) { OMElement profile = (OMElement) profiles.next(); OMElement targetHostsEle = profile.getFirstChildWithName(Q_TARGET_HOSTS); if (targetHostsEle == null || targetHostsEle.getText().isEmpty()) { String msg = "Each proxy profile must define at least one host " + "or a wildcard matcher under the targetHosts element"; log.error(name + " " + msg); throw new AxisFault(msg); } HttpHost proxy = getHttpProxy(profile, targetHostsEle.getText()); UsernamePasswordCredentials proxyCredentials = getUsernamePasswordCredentials(profile); Set<String> proxyBypass = getProxyBypass(profile); ProxyProfileConfig proxyProfileConfig = new ProxyProfileConfig(proxy, proxyCredentials, proxyBypass); String[] targetHosts = targetHostsEle.getText().split(","); for (String endpoint : targetHosts) { endpoint = endpoint.trim(); if (!proxyProfileMap.containsKey(endpoint)) { proxyProfileMap.put(endpoint, proxyProfileConfig); } else { log.warn(name + " Multiple proxy profiles were found for the endpoint: " + endpoint + ". Ignoring the excessive profiles."); } } } if (proxyProfileMap.size() > 0) { log.info(name + " Proxy profiles initialized for " + proxyProfileMap.size() + " targetHosts"); return proxyProfileMap; } return null; }