Author: ningjiang
Date: Fri Nov 6 11:39:33 2009
New Revision: 833354
URL:
http://svn.apache.org/viewvc?rev=833354&view=revLog:
Merged revisions 833289 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk........
r833289 | ningjiang | 2009-11-06 11:22:17 +0800 (Fri, 06 Nov 2009) | 1 line
CAMEL-2138 applied patch with thanks to Stan
........
Modified:
camel/branches/camel-1.x/ (props changed)
camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerStartTwiceTest.java
camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java
camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 6 11:39:33 2009
@@ -1 +1 @@
-/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536,761583,761607,762047,762633,762650,762935,763095,763484,763551,765154,765686,765729,765743,765824,766016,766289,766584,766588,766590,766602,766673,767403,767824,768342,769239,769346,769368,769434,770172,770906,771303,773193,773446,773781,774192,774383,774658-774659,776198,776289,776504,776975,778102,778689-778701,779121,779143,779489,781314-781349,781775,781
923,781974,781993,782557,782594,782681,782886,782918-782923,783204,783248,783363,783639,783704,785564,785584,785599,787206,787581,787598,787605,787928,788393,789121,789703,790560,790936,791379,791476,791767,792038,792381,792398,792899,793359,793518,793547-793555,793862,793935,794237,794368,794550,794967,795790,798027,798052,798063,798489,798864,799252,800340,800785,800797,801084,801196,801960,802307,802478,803559,807476,810751,812937,814493,816105,817654,818063,818182-818354,818744,818747,819475,819483,819956,820152,820168,821272,821290,822655,823013,823018,823031,823102,823177,823575,824218,824721,825760,825765,826977,828288,828333,829900,830052,830493,832647,833285
+/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536,761583,761607,762047,762633,762650,762935,763095,763484,763551,765154,765686,765729,765743,765824,766016,766289,766584,766588,766590,766602,766673,767403,767824,768342,769239,769346,769368,769434,770172,770906,771303,773193,773446,773781,774192,774383,774658-774659,776198,776289,776504,776975,778102,778689-778701,779121,779143,779489,781314-781349,781775,781
923,781974,781993,782557,782594,782681,782886,782918-782923,783204,783248,783363,783639,783704,785564,785584,785599,787206,787581,787598,787605,787928,788393,789121,789703,790560,790936,791379,791476,791767,792038,792381,792398,792899,793359,793518,793547-793555,793862,793935,794237,794368,794550,794967,795790,798027,798052,798063,798489,798864,799252,800340,800785,800797,801084,801196,801960,802307,802478,803559,807476,810751,812937,814493,816105,817654,818063,818182-818354,818744,818747,819475,819483,819956,820152,820168,821272,821290,822655,823013,823018,823031,823102,823177,823575,824218,824721,825760,825765,826977,828288,828333,829900,830052,830493,832647,833285,833289
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerStartTwiceTest.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerStartTwiceTest.java?rev=833354&r1=833353&r2=833354&view=diff==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerStartTwiceTest.java (original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerStartTwiceTest.java Fri Nov 6 11:39:33 2009
@@ -53,6 +53,7 @@
context.start();
fail("Expect an exception here");
} catch (Exception ex) {
+ ex.printStackTrace();
assertTrue("Expect the exception message has a Soap errror", ex.getMessage().equals("Soap 1.1 endpoint already registered on address
http://localhost:7070/test"));
context.stop();
}
Modified: camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java?rev=833354&r1=833353&r2=833354&view=diff==============================================================================
--- camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java (original)
+++ camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/BasicAuthenticationHttpClientConfigurer.java Fri Nov 6 11:39:33 2009
@@ -18,23 +18,23 @@
import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.NTCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
public class BasicAuthenticationHttpClientConfigurer implements HttpClientConfigurer {
private final String username;
private final String password;
+ private final String domain;
- public BasicAuthenticationHttpClientConfigurer(String user, String pwd) {
+ public BasicAuthenticationHttpClientConfigurer(String user, String pwd, String domain) {
username = user;
password = pwd;
+ this.domain = domain;
}
public void configureHttpClient(HttpClient client) {
-
- Credentials defaultcreds = new UsernamePasswordCredentials(username, password);
+ Credentials defaultcreds = new NTCredentials(username, password, null, domain);
client.getState().setCredentials(AuthScope.ANY, defaultcreds);
-
}
}
Modified: camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java?rev=833354&r1=833353&r2=833354&view=diff==============================================================================
--- camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java (original)
+++ camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java Fri Nov 6 11:39:33 2009
@@ -89,11 +89,12 @@
// check the user name and password for basic authentication
String username = getAndRemoveParameter(parameters, "username", String.class);
String password = getAndRemoveParameter(parameters, "password", String.class);
+ String domain = getAndRemoveParameter(parameters, "domain", String.class);
if (username != null && password != null) {
httpClientConfigurer = CompositeHttpConfigurer.combineConfigurers(
httpClientConfigurer,
- new BasicAuthenticationHttpClientConfigurer(username, password));
+ new BasicAuthenticationHttpClientConfigurer(username, password, domain));
}
// check the proxy details for proxy configuration
@@ -102,9 +103,10 @@
if (host != null && port != null) {
String proxyUsername = getAndRemoveParameter(parameters, "proxyUsername", String.class);
String proxyPassword = getAndRemoveParameter(parameters, "proxyPassword", String.class);
+ String proxyDomain = getAndRemoveParameter(parameters, "proxyDomain", String.class);
if (proxyUsername != null && proxyPassword != null) {
httpClientConfigurer = CompositeHttpConfigurer.combineConfigurers(
- httpClientConfigurer, new ProxyHttpClientConfigurer(host, port, proxyUsername, proxyPassword));
+ httpClientConfigurer, new ProxyHttpClientConfigurer(host, port, proxyUsername, proxyPassword, proxyDomain));
} else {
httpClientConfigurer = CompositeHttpConfigurer.combineConfigurers(
httpClientConfigurer, new ProxyHttpClientConfigurer(host, port));
Modified: camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java?rev=833354&r1=833353&r2=833354&view=diff==============================================================================
--- camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java (original)
+++ camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/ProxyHttpClientConfigurer.java Fri Nov 6 11:39:33 2009
@@ -18,7 +18,7 @@
import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.NTCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
/**
@@ -33,23 +33,25 @@
private final String username;
private final String password;
+ private final String domain;
public ProxyHttpClientConfigurer(String host, Integer port) {
- this(host, port, null, null);
+ this(host, port, null, null, null);
}
- public ProxyHttpClientConfigurer(String host, Integer port, String username, String password) {
+ public ProxyHttpClientConfigurer(String host, Integer port, String username, String password, String domain) {
this.host = host;
this.port = port;
this.username = username;
this.password = password;
+ this.domain = domain;
}
public void configureHttpClient(HttpClient client) {
client.getHostConfiguration().setProxy(host, port);
if (username != null && password != null) {
- Credentials defaultcreds = new UsernamePasswordCredentials(username, password);
+ Credentials defaultcreds = new NTCredentials(username, password, null, domain);
client.getState().setProxyCredentials(AuthScope.ANY, defaultcreds);
}
}