Author: ningjiang
Date: Mon Aug 20 02:19:06 2007
New Revision: 567613
URL: http://svn.apache.org/viewvc?rev=567613&view=rev
Log:
CXF-849 Changed some SSLUtils logs from INFO to FINE
Added some verifications about the systest of the httpconduit https
configuration
Also changed the BookServiceWrappedImpl's System.out.print message to English
Modified:
incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLUtils.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/customer/book/BookServiceWrappedImpl.java
Modified:
incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLUtils.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLUtils.java?rev=567613&r1=567612&r2=567613&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLUtils.java
(original)
+++
incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLUtils.java
Mon Aug 20 02:19:06 2007
@@ -376,24 +376,24 @@
if (matchesOneOf(supportedCipherSuites[i], includes)
&& !matchesOneOf(supportedCipherSuites[i], excludes)) {
LogUtils.log(log,
- Level.INFO,
+ Level.FINE,
"CIPHERSUITE_INCLUDED",
supportedCipherSuites[i]);
filteredCipherSuites.add(supportedCipherSuites[i]);
} else {
LogUtils.log(log,
- Level.INFO,
+ Level.FINE,
"CIPHERSUITE_EXCLUDED",
supportedCipherSuites[i]);
excludedCipherSuites.add(supportedCipherSuites[i]);
}
}
LogUtils.log(log,
- Level.INFO,
+ Level.FINE,
"CIPHERSUITES_FILTERED",
filteredCipherSuites);
LogUtils.log(log,
- Level.INFO,
+ Level.FINE,
"CIPHERSUITES_EXCLUDED",
excludedCipherSuites);
if (exclude) {
@@ -414,7 +414,7 @@
? "CIPHERSUITE_INCLUDE_FILTER"
: "CIPHERSUITE_EXCLUDE_FILTER";
for (String s : regexes) {
- LogUtils.log(log, Level.INFO, msg, s);
+ LogUtils.log(log, Level.FINE, msg, s);
patterns.add(Pattern.compile(s));
}
}
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java?rev=567613&r1=567612&r2=567613&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
Mon Aug 20 02:19:06 2007
@@ -407,25 +407,29 @@
Greeter bethal = service.getPort(bethalQ, Greeter.class);
assertNotNull("Port is null", bethal);
- // Okay, I'm sick of configuration files.
- // This also tests dynamic configuration of the conduit.
+ // we just verified the configurations are loaded successfully
Client client = ClientProxy.getClient(bethal);
HTTPConduit http =
(HTTPConduit) client.getConduit();
- HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
+ HTTPClientPolicy httpClientPolicy = http.getClient();
+ assertEquals("the httpClientPolicy's autoRedirect should be true",
+ true, httpClientPolicy.isAutoRedirect());
+ TLSClientParameters tlsParaments = http.getTlsClientParameters();
+ assertNotNull("the http conduite's tlsParaments should not be null",
tlsParaments);
+
- httpClientPolicy.setAutoRedirect(false);
// If we set any name, but Edward, Mary, or George,
// and a password of "password" we will get through
// Bethal.
- AuthorizationPolicy authPolicy = new AuthorizationPolicy();
- authPolicy.setUserName("Betty");
- authPolicy.setPassword("password");
+ AuthorizationPolicy authPolicy = http.getAuthorization();
+ assertEquals("Set the wrong user name from the configuration",
+ "Betty", authPolicy.getUserName());
+ assertEquals("Set the wrong pass word form the configuration",
+ "password", authPolicy.getPassword());
+
- http.setClient(httpClientPolicy);
- http.setTlsClientParameters(tlsClientParameters);
- http.setAuthorization(authPolicy);
+
String answer = bethal.sayHi();
assertTrue("Unexpected answer: " + answer,
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf?rev=567613&r1=567612&r2=567613&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf
Mon Aug 20 02:19:06 2007
@@ -60,7 +60,7 @@
<sec:UserName>Betty</sec:UserName>
<sec:Password>password</sec:Password>
</http:authorization>
- <http:client AutoRedirect="false"/>
+ <http:client AutoRedirect="true"/>
</http:conduit>
Modified:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/customer/book/BookServiceWrappedImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/customer/book/BookServiceWrappedImpl.java?rev=567613&r1=567612&r2=567613&view=diff
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/customer/book/BookServiceWrappedImpl.java
(original)
+++
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/customer/book/BookServiceWrappedImpl.java
Mon Aug 20 02:19:06 2007
@@ -34,7 +34,7 @@
@SuppressWarnings("unchecked")
public BookServiceWrappedImpl() {
Book book = createBook();
- System.out.println("Enregistre Book de id " + book.getId());
+ System.out.println("Register the Book's id " + book.getId());
books.put(book.getId(), book);
}
@@ -44,7 +44,7 @@
System.out.println("getBook -> " + me.getKey() + " : "
+ ((Book)me.getValue()).getName() + ", " +
((Book)me.getValue()).getId());
}
- System.out.println("Book de id " + bookid);
+ System.out.println("The Book's id " + bookid);
Book b = (Book)books.get(bookid);
if (b == null) {