cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1075849 - in /cxf/branches/2.3.x-fixes: ./ rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/bindings/soap/src/test/java/org/apache/cxf/bindin...
Date Tue, 01 Mar 2011 15:45:06 GMT
Author: dkulp
Date: Tue Mar  1 15:45:05 2011
New Revision: 1075849

URL: http://svn.apache.org/viewvc?rev=1075849&view=rev
Log:
Merged revisions 1075632 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1075632 | dkulp | 2011-02-28 22:05:59 -0500 (Mon, 28 Feb 2011) | 1 line
  
  Change to case insensitive map for the protocol headers
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/ContentTypeOutInterceptor.java
    cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
    cxf/branches/2.3.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/tcp/TCPConduitTest.java
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/SecurityContextImplTest.java
    cxf/branches/2.3.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
    cxf/branches/2.3.x-fixes/rt/transports/common/src/test/java/org/apache/cxf/transport/common/gzip/GZIPAcceptEncodingTest.java
    cxf/branches/2.3.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
    cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java
    cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLConnectionTest.java
    cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
    cxf/branches/2.3.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
    cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
    cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/ContentTypeOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/ContentTypeOutInterceptor.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/ContentTypeOutInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/ContentTypeOutInterceptor.java
Tue Mar  1 15:45:05 2011
@@ -19,9 +19,9 @@
 package org.apache.cxf.binding.http.interceptor;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.helpers.CastUtils;
@@ -42,7 +42,7 @@ public class ContentTypeOutInterceptor e
     public void handleMessage(Message message) throws Fault {
         Map<String, List<String>> headers = CastUtils.cast((Map)message.get(Message.PROTOCOL_HEADERS));
         if (headers == null) {
-            headers = new HashMap<String, List<String>>();
+            headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             message.put(Message.PROTOCOL_HEADERS, headers);
         }
         String ct = (String)message.getExchange().get(Endpoint.class).get(HttpHeaderHelper.CONTENT_TYPE);

Modified: cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
Tue Mar  1 15:45:05 2011
@@ -23,6 +23,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.Soap12;
@@ -109,7 +110,7 @@ public class SoapPreProtocolOutIntercept
         if (message.getVersion() instanceof Soap11) {
             Map<String, List<String>> reqHeaders = CastUtils.cast((Map)message.get(Message.PROTOCOL_HEADERS));
             if (reqHeaders == null) {
-                reqHeaders = new HashMap<String, List<String>>();
+                reqHeaders = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             }
             
             if (reqHeaders.size() == 0) {

Modified: cxf/branches/2.3.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/tcp/TCPConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/tcp/TCPConduitTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/tcp/TCPConduitTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/tcp/TCPConduitTest.java
Tue Mar  1 15:45:05 2011
@@ -24,9 +24,9 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 //import javax.xml.stream.XMLStreamException;
 //import javax.xml.stream.XMLStreamReader;
@@ -119,7 +119,7 @@ public class TCPConduitTest {
     private Message getNewMessage() {
         Message message = new MessageImpl();
         message = new SoapMessage(message);
-        Map<String, List<String>> headers = new HashMap<String, List<String>>();
+        Map<String, List<String>> headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         List<String> contentTypes = new ArrayList<String>();
         contentTypes.add("text/xml");
         contentTypes.add("charset=utf8");

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties
Tue Mar  1 15:45:05 2011
@@ -33,3 +33,4 @@ MISSING_SERVICE= No definition of servic
 WSDL4J_BAD_ELEMENT_PART= Part {0} defined as element {1} which is not in the schema.
 PART_NO_NAME_NO_TYPE= Part {0} defined with no element and no type.
 NO_MESSAGE=No {0} message was found for operation {1} and input named {2}.  Check the wsdl
for errors.
+BINDING_MISSING_TYPE=Could not find portType for binding {0}. Check wsdl for errors.
\ No newline at end of file

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java
Tue Mar  1 15:45:05 2011
@@ -20,9 +20,9 @@
 package org.apache.cxf.jaxrs.impl;
 
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
@@ -132,7 +132,7 @@ public class RequestPreprocessorTest ext
         m.put(Message.REQUEST_URI, pathInfo);
         m.put(Message.QUERY_STRING, query);
         m.put(Message.HTTP_REQUEST_METHOD, method);
-        Map<String, List<String>> headers = new HashMap<String, List<String>>();
+        Map<String, List<String>> headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         if (methodHeader != null) {
             headers.put("X-HTTP-Method-Override", Collections.singletonList(methodHeader));
  
         }

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/SecurityContextImplTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/SecurityContextImplTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/SecurityContextImplTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/SecurityContextImplTest.java
Tue Mar  1 15:45:05 2011
@@ -19,9 +19,9 @@
 package org.apache.cxf.jaxrs.impl;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
@@ -34,7 +34,8 @@ public class SecurityContextImplTest ext
     @Test
     public void testAuthenticationScheme() {
         Message m = new MessageImpl();
-        Map<String, List<String>> requestHeaders = new HashMap<String, List<String>>();
+        Map<String, List<String>> requestHeaders 
+            = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         List<String> values = new ArrayList<String>();
         values.add("Digest realm=\"custom\"");
         requestHeaders.put("Authorization", values);

Modified: cxf/branches/2.3.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
Tue Mar  1 15:45:05 2011
@@ -21,10 +21,10 @@ package org.apache.cxf.transport.common.
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
+import java.util.TreeMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.regex.Matcher;
@@ -300,7 +300,7 @@ public class GZIPOutInterceptor extends 
         Map<String, List<String>> protocolHeaders = CastUtils.cast((Map<?,
?>)message
             .get(Message.PROTOCOL_HEADERS));
         if (protocolHeaders == null) {
-            protocolHeaders = new HashMap<String, List<String>>();
+            protocolHeaders = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             message.put(Message.PROTOCOL_HEADERS, protocolHeaders);
         }
         List<String> header = CastUtils.cast((List<?>)protocolHeaders.get(name));

Modified: cxf/branches/2.3.x-fixes/rt/transports/common/src/test/java/org/apache/cxf/transport/common/gzip/GZIPAcceptEncodingTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/common/src/test/java/org/apache/cxf/transport/common/gzip/GZIPAcceptEncodingTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/common/src/test/java/org/apache/cxf/transport/common/gzip/GZIPAcceptEncodingTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/common/src/test/java/org/apache/cxf/transport/common/gzip/GZIPAcceptEncodingTest.java
Tue Mar  1 15:45:05 2011
@@ -23,9 +23,9 @@ import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import org.apache.cxf.helpers.HttpHeaderHelper;
 import org.apache.cxf.interceptor.Fault;
@@ -128,7 +128,8 @@ public class GZIPAcceptEncodingTest exte
     }
 
     private void setAcceptEncoding(String enc) {
-        Map<String, List<String>> protocolHeaders = new HashMap<String, List<String>>();
+        Map<String, List<String>> protocolHeaders 
+            = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         protocolHeaders.put(HttpHeaderHelper.getHeaderKey(HttpHeaderHelper.ACCEPT_ENCODING),
Collections
             .singletonList(enc));
         inMessage.put(Message.PROTOCOL_HEADERS, protocolHeaders);

Modified: cxf/branches/2.3.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
Tue Mar  1 15:45:05 2011
@@ -29,6 +29,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeMap;
 
 import javax.servlet.ServletInputStream;
 import javax.servlet.ServletOutputStream;
@@ -767,7 +768,7 @@ public class JettyHTTPDestinationTest ex
         outMsg.putAll(inMessage);
         outMsg.setExchange(new ExchangeImpl());
         outMsg.put(Message.PROTOCOL_HEADERS,
-                   new HashMap<String, List<String>>());
+                   new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER));
         return outMsg;
     }
     

Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Tue Mar  1 15:45:05 2011
@@ -31,10 +31,10 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Enumeration;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -147,7 +147,8 @@ public abstract class AbstractHTTPDestin
      * @param message the current message
      */
     protected void setHeaders(Message message) {
-        Map<String, List<String>> requestHeaders = new HashMap<String, List<String>>();
+        Map<String, List<String>> requestHeaders 
+            = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         copyRequestHeaders(message, requestHeaders);
         message.put(Message.PROTOCOL_HEADERS, requestHeaders);
 
@@ -187,7 +188,7 @@ public abstract class AbstractHTTPDestin
         Map<String, List<String>> responseHeaders =
             CastUtils.cast((Map)message.get(Message.PROTOCOL_HEADERS));
         if (responseHeaders == null) {
-            responseHeaders = new HashMap<String, List<String>>();
+            responseHeaders = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             message.put(Message.PROTOCOL_HEADERS, responseHeaders);         
         }
         setPolicies(responseHeaders);
@@ -227,7 +228,9 @@ public abstract class AbstractHTTPDestin
                 values.add(val);
             }
         }
-        headers.put(Message.CONTENT_TYPE, Collections.singletonList(req.getContentType()));
+        if (!headers.containsKey(Message.CONTENT_TYPE)) {
+            headers.put(Message.CONTENT_TYPE, Collections.singletonList(req.getContentType()));
+        }
     }
 
     /**

Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Tue Mar  1 15:45:05 2011
@@ -37,10 +37,10 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.Executor;
 import java.util.logging.Level;
@@ -890,9 +890,11 @@ public class HTTPConduit 
         Map<String, List<String>> headers =
             CastUtils.cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));     
  
         if (null == headers) {
-            headers = new LinkedHashMap<String, List<String>>();
+            headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         } else if (headers instanceof HashMap) {
-            headers = new LinkedHashMap<String, List<String>>(headers);
+            Map<String, List<String>> h2 = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
+            h2.putAll(headers);
+            headers = h2;
         }
         message.put(Message.PROTOCOL_HEADERS, headers);
         return headers;
@@ -2281,7 +2283,7 @@ public class HTTPConduit 
             inMessage.setExchange(exchange);
             Map<String, List<String>> origHeaders = connection.getHeaderFields();
             Map<String, List<String>> headers = 
-                new HashMap<String, List<String>>();
+                new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             for (String key : connection.getHeaderFields().keySet()) {
                 if (key != null) {
                     headers.put(HttpHeaderHelper.getHeaderKey(key), 

Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java
Tue Mar  1 15:45:05 2011
@@ -23,9 +23,9 @@ package org.apache.cxf.transport.http;
 import java.io.OutputStream;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.CXFBusImpl;
@@ -58,7 +58,7 @@ public class HTTPConduitTest extends Ass
      */
     private Message getNewMessage() {
         Message message = new MessageImpl();
-        Map<String, List<String>> headers = new HashMap<String, List<String>>();
+        Map<String, List<String>> headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         List<String> contentTypes = new ArrayList<String>();
         contentTypes.add("text/xml");
         contentTypes.add("charset=utf8");

Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLConnectionTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLConnectionTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLConnectionTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLConnectionTest.java
Tue Mar  1 15:45:05 2011
@@ -21,9 +21,9 @@ package org.apache.cxf.transport.http;
 
 import java.net.HttpURLConnection;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import javax.net.ssl.HttpsURLConnection;
 
@@ -59,7 +59,7 @@ public class HTTPConduitURLConnectionTes
      */
     private Message getNewMessage() {
         Message message = new MessageImpl();
-        Map<String, List<String>> headers = new HashMap<String, List<String>>();
+        Map<String, List<String>> headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         List<String> contentTypes = new ArrayList<String>();
         contentTypes.add("text/xml");
         contentTypes.add("charset=utf8");

Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
Tue Mar  1 15:45:05 2011
@@ -31,6 +31,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.CXFBusImpl;
@@ -212,7 +213,7 @@ public class HTTPConduitURLEasyMockTest 
     }
     
     private void setUpHeaders(Message message) {
-        Map<String, List<String>> headers = new HashMap<String, List<String>>();
+        Map<String, List<String>> headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
         List<String> contentTypes = new ArrayList<String>();
         contentTypes.add("text/xml;charset=utf8");
         headers.put("content-type", contentTypes);

Modified: cxf/branches/2.3.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
Tue Mar  1 15:45:05 2011
@@ -26,9 +26,9 @@ import java.security.Principal;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -158,7 +158,7 @@ public final class JMSUtils {
         Map<String, List<String>> headers = CastUtils.cast((Map)inMessage
             .get(org.apache.cxf.message.Message.PROTOCOL_HEADERS));
         if (headers == null) {
-            headers = new HashMap<String, List<String>>();
+            headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             inMessage.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, headers);
         }
         headers.put(JMSSpecConstants.JMS_MESSAGE_TYPE, Collections.singletonList(messageType));
@@ -193,7 +193,8 @@ public final class JMSUtils {
                 }
             }
 
-            Map<String, List<String>> protHeaders = new HashMap<String, List<String>>();
+            Map<String, List<String>> protHeaders
+                = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             List<JMSPropertyType> props = messageProperties.getProperty();
             Enumeration enm = message.getPropertyNames();
             while (enm.hasMoreElements()) {
@@ -265,7 +266,7 @@ public final class JMSUtils {
                 Map<String, List<String>> headers = CastUtils.cast((Map)inMessage
                     .get(org.apache.cxf.message.Message.PROTOCOL_HEADERS));
                 if (headers == null) {
-                    headers = new HashMap<String, List<String>>();
+                    headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
                     inMessage.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, headers);
                 }
                 try {
@@ -404,7 +405,7 @@ public final class JMSUtils {
         Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>)message
             .get(org.apache.cxf.message.Message.PROTOCOL_HEADERS));
         if (null == headers) {
-            headers = new HashMap<String, List<String>>();
+            headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             message.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, headers);
         }
 
@@ -439,7 +440,7 @@ public final class JMSUtils {
         Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>)message
             .get(org.apache.cxf.message.Message.PROTOCOL_HEADERS));
         if (null == headers) {
-            headers = new HashMap<String, List<String>>();
+            headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             message.put(org.apache.cxf.message.Message.PROTOCOL_HEADERS, headers);
         }
         return contentType;

Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
Tue Mar  1 15:45:05 2011
@@ -22,9 +22,9 @@ package org.apache.cxf.ws.security.polic
 import java.net.HttpURLConnection;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import javax.net.ssl.HttpsURLConnection;
 
@@ -63,7 +63,7 @@ public class HttpsTokenInterceptorProvid
         Map<String, List<String>> headers =
             CastUtils.cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));     
  
         if (null == headers) {
-            headers = new HashMap<String, List<String>>();
+            headers = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
             message.put(Message.PROTOCOL_HEADERS, headers);
         }
         return headers;

Modified: cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
Tue Mar  1 15:45:05 2011
@@ -67,7 +67,8 @@ public class ClientServerSessionTest ext
 
             if (headers == null) {
                 headers = new HashMap<String, List<String>>();
-                bp.getRequestContext().put("javax.xml.ws.http.request.headers", headers);
+                bp.getRequestContext()
+                    .put("javax.xml.ws.http.request.headers", headers);
             }
 
             List<String> cookies = Arrays.asList(new String[] {"a=a", "b=b"});

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=1075849&r1=1075848&r2=1075849&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Tue Mar  1 15:45:05 2011
@@ -90,7 +90,7 @@ public class CodeGenBugTest extends Abst
         try {
             processor.execute();
         } catch (WSDLRuntimeException wrex) {
-            assertEquals("BINDING_MISSING_TYPE", wrex.getMessage());
+            assertTrue(wrex.getMessage().contains("Could not find portType for binding"));
         }  
     }
 



Mime
View raw message