cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1310446 [1/4] - in /cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/ rt/core/src/main/java/org/apache/cxf/bus/extension/ rt/core/src/main/java/org/apache/cxf/bus/osgi/ rt/core/src/main/java/org/apache/...
Date Fri, 06 Apr 2012 16:21:15 GMT
Author: dkulp
Date: Fri Apr  6 16:21:14 2012
New Revision: 1310446

URL: http://svn.apache.org/viewvc?rev=1310446&view=rev
Log:
More cr/lf cleanups

Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapAddress.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBinding.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBody.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapFault.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeader.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeaderFault.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapOperation.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/TextExtensionFragmentParser.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfig.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPInInterceptor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/TextExtensionFragmentParserTest.java
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfigTest.java
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/transport/common/gzip/GZIPAcceptEncodingTest.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverFeature.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverStrategy.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/LoadDistributorFeature.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/LoadDistributorTargetSelector.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/RandomStrategy.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/RetryStrategy.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/SequentialStrategy.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/spring/FailoverBeanDefinitionParser.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/spring/LoadDistributorBeanDefinitionParser.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/spring/NamespaceHandler.java
    cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProtocolVariationTest.java
    cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreUpgradeTest.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsParser.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/IdentityClaimsParser.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomClaimParser.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/DummyPlatformTransactionManager.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABO.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABOImpl.java
    cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SlowProcessingSimulator.java
    cxf/trunk/tools/corba/src/main/generated/org/apache/cxf/tools/corba/processors/idl/IDLTokenTypes.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapAddress.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapAddress.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapAddress.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapAddress.java Fri Apr  6 16:21:14 2012
@@ -1,27 +1,27 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.binding.soap.wsdl.extensions;
-
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.extensions.soap12.SOAP12Address;
-
-public interface SoapAddress extends SOAPAddress, SOAP12Address {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.binding.soap.wsdl.extensions;
+
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.extensions.soap12.SOAP12Address;
+
+public interface SoapAddress extends SOAPAddress, SOAP12Address {
+
+}

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBinding.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBinding.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBinding.java Fri Apr  6 16:21:14 2012
@@ -1,27 +1,27 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.binding.soap.wsdl.extensions;
-
-import javax.wsdl.extensions.soap.SOAPBinding;
-import javax.wsdl.extensions.soap12.SOAP12Binding;
-
-public interface SoapBinding extends SOAPBinding, SOAP12Binding {
-    
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.binding.soap.wsdl.extensions;
+
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap12.SOAP12Binding;
+
+public interface SoapBinding extends SOAPBinding, SOAP12Binding {
+    
+}

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBody.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBody.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBody.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapBody.java Fri Apr  6 16:21:14 2012
@@ -1,27 +1,27 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.binding.soap.wsdl.extensions;
-
-import javax.wsdl.extensions.soap.SOAPBody;
-import javax.wsdl.extensions.soap12.SOAP12Body;
-
-public interface SoapBody extends SOAPBody, SOAP12Body {
-    
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.binding.soap.wsdl.extensions;
+
+import javax.wsdl.extensions.soap.SOAPBody;
+import javax.wsdl.extensions.soap12.SOAP12Body;
+
+public interface SoapBody extends SOAPBody, SOAP12Body {
+    
+}

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapFault.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapFault.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapFault.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapFault.java Fri Apr  6 16:21:14 2012
@@ -1,27 +1,27 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.binding.soap.wsdl.extensions;
-
-import javax.wsdl.extensions.soap.SOAPFault;
-import javax.wsdl.extensions.soap12.SOAP12Fault;
-
-public interface SoapFault extends SOAPFault, SOAP12Fault {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.binding.soap.wsdl.extensions;
+
+import javax.wsdl.extensions.soap.SOAPFault;
+import javax.wsdl.extensions.soap12.SOAP12Fault;
+
+public interface SoapFault extends SOAPFault, SOAP12Fault {
+
+}

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeader.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeader.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeader.java Fri Apr  6 16:21:14 2012
@@ -1,26 +1,26 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.binding.soap.wsdl.extensions;
-
-import javax.wsdl.extensions.soap.SOAPHeader;
-import javax.wsdl.extensions.soap12.SOAP12Header;
-
-public interface SoapHeader extends SOAPHeader, SOAP12Header {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.binding.soap.wsdl.extensions;
+
+import javax.wsdl.extensions.soap.SOAPHeader;
+import javax.wsdl.extensions.soap12.SOAP12Header;
+
+public interface SoapHeader extends SOAPHeader, SOAP12Header {
+
+}

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeaderFault.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeaderFault.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeaderFault.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapHeaderFault.java Fri Apr  6 16:21:14 2012
@@ -1,26 +1,26 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.binding.soap.wsdl.extensions;
-
-import javax.wsdl.extensions.soap.SOAPHeaderFault;
-import javax.wsdl.extensions.soap12.SOAP12HeaderFault;
-
-public interface SoapHeaderFault extends SOAPHeaderFault, SOAP12HeaderFault {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.binding.soap.wsdl.extensions;
+
+import javax.wsdl.extensions.soap.SOAPHeaderFault;
+import javax.wsdl.extensions.soap12.SOAP12HeaderFault;
+
+public interface SoapHeaderFault extends SOAPHeaderFault, SOAP12HeaderFault {
+
+}

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapOperation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapOperation.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapOperation.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapOperation.java Fri Apr  6 16:21:14 2012
@@ -1,26 +1,26 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.binding.soap.wsdl.extensions;
-
-import javax.wsdl.extensions.soap.SOAPOperation;
-import javax.wsdl.extensions.soap12.SOAP12Operation;
-
-public interface SoapOperation extends SOAPOperation, SOAP12Operation {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.binding.soap.wsdl.extensions;
+
+import javax.wsdl.extensions.soap.SOAPOperation;
+import javax.wsdl.extensions.soap12.SOAP12Operation;
+
+public interface SoapOperation extends SOAPOperation, SOAP12Operation {
+
+}

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/TextExtensionFragmentParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/TextExtensionFragmentParser.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/TextExtensionFragmentParser.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/TextExtensionFragmentParser.java Fri Apr  6 16:21:14 2012
@@ -1,106 +1,106 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.bus.extension;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.cxf.common.logging.LogUtils;
-
-public class TextExtensionFragmentParser {
-    private static final Logger LOG = LogUtils.getL7dLogger(TextExtensionFragmentParser.class);
-    
-    public List<Extension> getExtensions(final URL url) {
-        InputStream is = null;
-        try {
-            is = url.openStream();
-            return getExtensions(is);
-        } catch (Exception e) {
-            LOG.log(Level.WARNING, e.getMessage(), e);
-            return new ArrayList<Extension>();
-        } finally {
-            if (is != null) {
-                try {
-                    is.close();
-                } catch (IOException e) {
-                    // Ignore
-                }
-            }
-        }
-    }
-
-    /**
-     * Reads extension definitions from a Text file and instantiates them
-     * The text file has the following syntax
-     * classname:interfacename:deferred(true|false):optional(true|false)
-     * 
-     * @param is stream to read the extension from
-     * @return list of Extensions
-     * @throws IOException
-     */
-    public List<Extension> getExtensions(InputStream is) throws IOException {
-        List<Extension> extensions = new ArrayList<Extension>();
-        BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
-        String line = reader.readLine();
-        while (line != null) {
-            final Extension extension = getExtensionFromTextLine(line);
-            if (extension != null) {
-                extensions.add(extension);
-            }
-            line = reader.readLine();
-        }
-        return extensions;
-    }
-
-    private Extension getExtensionFromTextLine(String line) {
-        line = line.trim();
-        if (line.length() == 0 || line.charAt(0) == '#') {
-            return null;
-        }
-        final Extension ext = new Extension();
-        String[] parts = line.split(":");
-        ext.setClassname(parts[0]);
-        if (ext.getClassname() == null) {
-            return null;
-        }
-        if (parts.length >= 2) {
-            String interfaceName = parts[1];
-            if (interfaceName != null && "".equals(interfaceName)) {
-                interfaceName = null;
-            }
-            ext.setInterfaceName(interfaceName);
-        }
-        if (parts.length >= 3) {
-            ext.setDeferred(Boolean.parseBoolean(parts[2]));
-        }
-        if (parts.length >= 4) {
-            ext.setOptional(Boolean.parseBoolean(parts[3]));
-        }
-        return ext;
-    }
-    
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.bus.extension;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
+
+public class TextExtensionFragmentParser {
+    private static final Logger LOG = LogUtils.getL7dLogger(TextExtensionFragmentParser.class);
+    
+    public List<Extension> getExtensions(final URL url) {
+        InputStream is = null;
+        try {
+            is = url.openStream();
+            return getExtensions(is);
+        } catch (Exception e) {
+            LOG.log(Level.WARNING, e.getMessage(), e);
+            return new ArrayList<Extension>();
+        } finally {
+            if (is != null) {
+                try {
+                    is.close();
+                } catch (IOException e) {
+                    // Ignore
+                }
+            }
+        }
+    }
+
+    /**
+     * Reads extension definitions from a Text file and instantiates them
+     * The text file has the following syntax
+     * classname:interfacename:deferred(true|false):optional(true|false)
+     * 
+     * @param is stream to read the extension from
+     * @return list of Extensions
+     * @throws IOException
+     */
+    public List<Extension> getExtensions(InputStream is) throws IOException {
+        List<Extension> extensions = new ArrayList<Extension>();
+        BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+        String line = reader.readLine();
+        while (line != null) {
+            final Extension extension = getExtensionFromTextLine(line);
+            if (extension != null) {
+                extensions.add(extension);
+            }
+            line = reader.readLine();
+        }
+        return extensions;
+    }
+
+    private Extension getExtensionFromTextLine(String line) {
+        line = line.trim();
+        if (line.length() == 0 || line.charAt(0) == '#') {
+            return null;
+        }
+        final Extension ext = new Extension();
+        String[] parts = line.split(":");
+        ext.setClassname(parts[0]);
+        if (ext.getClassname() == null) {
+            return null;
+        }
+        if (parts.length >= 2) {
+            String interfaceName = parts[1];
+            if (interfaceName != null && "".equals(interfaceName)) {
+                interfaceName = null;
+            }
+            ext.setInterfaceName(interfaceName);
+        }
+        if (parts.length >= 3) {
+            ext.setDeferred(Boolean.parseBoolean(parts[2]));
+        }
+        if (parts.length >= 4) {
+            ext.setOptional(Boolean.parseBoolean(parts[3]));
+        }
+        return ext;
+    }
+    
+}

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfig.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfig.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfig.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfig.java Fri Apr  6 16:21:14 2012
@@ -1,72 +1,72 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.bus.osgi;
-
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.workqueue.AutomaticWorkQueueImpl;
-import org.osgi.service.cm.ConfigurationException;
-import org.osgi.service.cm.ManagedService;
-
-/**
- * Use the ManagedWorkQueueList config style instead
- */
-@Deprecated
-public class WorkQueueSingleConfig implements ManagedService {
-    public static final String SERVICE_PID = "org.apache.cxf.workqueue";
-    public static final String PROPERTY_PREFIX = "org.apache.cxf.workqueue";
-    ManagedWorkQueueList workQueueList;
-    
-    public WorkQueueSingleConfig(ManagedWorkQueueList workQueueList) {
-        this.workQueueList = workQueueList;
-    }
-
-    public void updated(@SuppressWarnings("rawtypes") Dictionary properties) throws ConfigurationException {
-        if (properties == null) {
-            return;
-        }
-        Dictionary<String, String> p = CastUtils.cast(properties);
-        String names = (String)properties.get(PROPERTY_PREFIX + ".names");
-        String[] nameAr = names.split(",");
-        for (String name : nameAr) {
-            updateQueue(name.trim(), p);
-        }
-    }
-
-    private void updateQueue(String name, Dictionary<String, String> properties) 
-        throws ConfigurationException {
-        Dictionary<String, String> queueProperties = new Hashtable<String, String>();
-        Enumeration<?> it = properties.keys();
-        while (it.hasMoreElements()) {
-            String key = (String)it.nextElement();
-            String prefix = PROPERTY_PREFIX + "." + name + ".";
-            if (key.startsWith(prefix)) {
-                String newKey = (String)key.substring(prefix.length());
-                queueProperties.put(newKey, (String)properties.get(key));
-            }
-        }
-        queueProperties.put(AutomaticWorkQueueImpl.PROPERTY_NAME, name);
-        workQueueList.updated(name, queueProperties);
-    }
-
-    
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.bus.osgi;
+
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.workqueue.AutomaticWorkQueueImpl;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
+
+/**
+ * Use the ManagedWorkQueueList config style instead
+ */
+@Deprecated
+public class WorkQueueSingleConfig implements ManagedService {
+    public static final String SERVICE_PID = "org.apache.cxf.workqueue";
+    public static final String PROPERTY_PREFIX = "org.apache.cxf.workqueue";
+    ManagedWorkQueueList workQueueList;
+    
+    public WorkQueueSingleConfig(ManagedWorkQueueList workQueueList) {
+        this.workQueueList = workQueueList;
+    }
+
+    public void updated(@SuppressWarnings("rawtypes") Dictionary properties) throws ConfigurationException {
+        if (properties == null) {
+            return;
+        }
+        Dictionary<String, String> p = CastUtils.cast(properties);
+        String names = (String)properties.get(PROPERTY_PREFIX + ".names");
+        String[] nameAr = names.split(",");
+        for (String name : nameAr) {
+            updateQueue(name.trim(), p);
+        }
+    }
+
+    private void updateQueue(String name, Dictionary<String, String> properties) 
+        throws ConfigurationException {
+        Dictionary<String, String> queueProperties = new Hashtable<String, String>();
+        Enumeration<?> it = properties.keys();
+        while (it.hasMoreElements()) {
+            String key = (String)it.nextElement();
+            String prefix = PROPERTY_PREFIX + "." + name + ".";
+            if (key.startsWith(prefix)) {
+                String newKey = (String)key.substring(prefix.length());
+                queueProperties.put(newKey, (String)properties.get(key));
+            }
+        }
+        queueProperties.put(AutomaticWorkQueueImpl.PROPERTY_NAME, name);
+        workQueueList.updated(name, queueProperties);
+    }
+
+    
+}

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPInInterceptor.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPInInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPInInterceptor.java Fri Apr  6 16:21:14 2012
@@ -1,101 +1,101 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.transport.common.gzip;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.logging.Logger;
-import java.util.zip.GZIPInputStream;
-
-import org.apache.cxf.common.i18n.BundleUtils;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.helpers.HttpHeaderHelper;
-import org.apache.cxf.interceptor.AttachmentInInterceptor;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-
-/**
- * CXF interceptor that uncompresses those incoming messages that have "gzip"
- * content-encoding. An instance of this class should be added as an in and
- * inFault interceptor on clients that need to talk to a service that returns
- * gzipped responses or on services that want to accept gzipped requests. For
- * clients, you probably also want to use
- * {@link org.apache.cxf.transports.http.configuration.HTTPClientPolicy#setAcceptEncoding}
- * to let the server know you can handle compressed responses. To compress
- * outgoing messages, see {@link GZIPOutInterceptor}. This class was originally
- * based on one of the CXF samples (configuration_interceptor).
- * 
- * @author Ian Roberts (i.roberts@dcs.shef.ac.uk)
- */
-public class GZIPInInterceptor extends AbstractPhaseInterceptor<Message> {
-
-
-    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(GZIPInInterceptor.class);
-    private static final Logger LOG = LogUtils.getL7dLogger(GZIPInInterceptor.class);
-
-    public GZIPInInterceptor() {
-        super(Phase.RECEIVE);
-        addBefore(AttachmentInInterceptor.class.getName());
-    }
-
-    public void handleMessage(Message message) throws Fault {
-        // check for Content-Encoding header - we are only interested in
-        // messages that say they are gzipped.
-        Map<String, List<String>> protocolHeaders = CastUtils.cast((Map<?, ?>)message
-            .get(Message.PROTOCOL_HEADERS));
-        if (protocolHeaders != null) {
-            List<String> contentEncoding = HttpHeaderHelper.getHeader(protocolHeaders, 
-                                                                      HttpHeaderHelper.CONTENT_ENCODING);
-            if (contentEncoding == null) {
-                contentEncoding = protocolHeaders.get(GZIPOutInterceptor.SOAP_JMS_CONTENTENCODING);
-            }
-            if (contentEncoding != null
-                && (contentEncoding.contains("gzip") || contentEncoding.contains("x-gzip"))) {
-                try {
-                    LOG.fine("Uncompressing response");
-                    InputStream is = message.getContent(InputStream.class);
-                    if (is == null) {
-                        return;
-                    }
-
-                    // wrap an unzipping stream around the original one
-                    GZIPInputStream zipInput = new GZIPInputStream(is);
-                    message.setContent(InputStream.class, zipInput);
-
-                    // remove content encoding header as we've now dealt with it
-                    for (String key : protocolHeaders.keySet()) {
-                        if (key.equalsIgnoreCase("Content-Encoding")) {
-                            protocolHeaders.remove(key);
-                            break;
-                        }
-                    }
-                } catch (IOException ex) {
-                    throw new Fault(new org.apache.cxf.common.i18n.Message("COULD_NOT_UNZIP", BUNDLE), ex);
-                }
-            }
-        }
-    }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.transport.common.gzip;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+import java.util.ResourceBundle;
+import java.util.logging.Logger;
+import java.util.zip.GZIPInputStream;
+
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.helpers.HttpHeaderHelper;
+import org.apache.cxf.interceptor.AttachmentInInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+
+/**
+ * CXF interceptor that uncompresses those incoming messages that have "gzip"
+ * content-encoding. An instance of this class should be added as an in and
+ * inFault interceptor on clients that need to talk to a service that returns
+ * gzipped responses or on services that want to accept gzipped requests. For
+ * clients, you probably also want to use
+ * {@link org.apache.cxf.transports.http.configuration.HTTPClientPolicy#setAcceptEncoding}
+ * to let the server know you can handle compressed responses. To compress
+ * outgoing messages, see {@link GZIPOutInterceptor}. This class was originally
+ * based on one of the CXF samples (configuration_interceptor).
+ * 
+ * @author Ian Roberts (i.roberts@dcs.shef.ac.uk)
+ */
+public class GZIPInInterceptor extends AbstractPhaseInterceptor<Message> {
+
+
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(GZIPInInterceptor.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(GZIPInInterceptor.class);
+
+    public GZIPInInterceptor() {
+        super(Phase.RECEIVE);
+        addBefore(AttachmentInInterceptor.class.getName());
+    }
+
+    public void handleMessage(Message message) throws Fault {
+        // check for Content-Encoding header - we are only interested in
+        // messages that say they are gzipped.
+        Map<String, List<String>> protocolHeaders = CastUtils.cast((Map<?, ?>)message
+            .get(Message.PROTOCOL_HEADERS));
+        if (protocolHeaders != null) {
+            List<String> contentEncoding = HttpHeaderHelper.getHeader(protocolHeaders, 
+                                                                      HttpHeaderHelper.CONTENT_ENCODING);
+            if (contentEncoding == null) {
+                contentEncoding = protocolHeaders.get(GZIPOutInterceptor.SOAP_JMS_CONTENTENCODING);
+            }
+            if (contentEncoding != null
+                && (contentEncoding.contains("gzip") || contentEncoding.contains("x-gzip"))) {
+                try {
+                    LOG.fine("Uncompressing response");
+                    InputStream is = message.getContent(InputStream.class);
+                    if (is == null) {
+                        return;
+                    }
+
+                    // wrap an unzipping stream around the original one
+                    GZIPInputStream zipInput = new GZIPInputStream(is);
+                    message.setContent(InputStream.class, zipInput);
+
+                    // remove content encoding header as we've now dealt with it
+                    for (String key : protocolHeaders.keySet()) {
+                        if (key.equalsIgnoreCase("Content-Encoding")) {
+                            protocolHeaders.remove(key);
+                            break;
+                        }
+                    }
+                } catch (IOException ex) {
+                    throw new Fault(new org.apache.cxf.common.i18n.Message("COULD_NOT_UNZIP", BUNDLE), ex);
+                }
+            }
+        }
+    }
+
+}

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java Fri Apr  6 16:21:14 2012
@@ -1,331 +1,331 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.transport.common.gzip;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-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;
-import java.util.regex.Pattern;
-import java.util.zip.GZIPOutputStream;
-
-import org.apache.cxf.common.i18n.BundleUtils;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.helpers.HttpHeaderHelper;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.interceptor.MessageSenderInterceptor;
-import org.apache.cxf.io.AbstractThresholdOutputStream;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-
-/**
- * CXF interceptor that compresses outgoing messages using gzip and sets the
- * HTTP Content-Encoding header appropriately. An instance of this class should
- * be added as an out interceptor on clients that need to talk to a service that
- * accepts gzip-encoded requests or on a service that wants to be able to return
- * compressed responses. In server mode, the interceptor only compresses
- * responses if the client indicated (via an Accept-Encoding header on the
- * request) that it can understand them. To handle gzip-encoded input messages,
- * see {@link GZIPInInterceptor}. This interceptor supports a compression
- * {@link #threshold} (default 1kB) - messages smaller than this threshold will
- * not be compressed. To force compression of all messages, set the threshold to
- * 0. This class was originally based on one of the CXF samples
- * (configuration_interceptor).
- * 
- * @author Ian Roberts (i.roberts@dcs.shef.ac.uk)
- */
-public class GZIPOutInterceptor extends AbstractPhaseInterceptor<Message> {
-
-    /**
-     * Enum giving the possible values for whether we should gzip a particular
-     * message.
-     */
-    public static enum UseGzip {
-        NO, YES, FORCE
-    }
-    
-    /**
-     * regular expression that matches any encoding with a
-     * q-value of 0 (or 0.0, 0.00, etc.).
-     */
-    public static final Pattern ZERO_Q = Pattern.compile(";\\s*q=0(?:\\.0+)?$");
-    
-    /**
-     * regular expression which can split encodings
-     */
-    public static final Pattern ENCODINGS = Pattern.compile("[,\\s]*,\\s*");
-
-    /**
-     * Key under which we store the original output stream on the message, for
-     * use by the ending interceptor.
-     */
-    public static final String ORIGINAL_OUTPUT_STREAM_KEY = GZIPOutInterceptor.class.getName()
-                                                            + ".originalOutputStream";
-
-    /**
-     * Key under which we store an indication of whether compression is
-     * permitted or required, for use by the ending interceptor.
-     */
-    public static final String USE_GZIP_KEY = GZIPOutInterceptor.class.getName() + ".useGzip";
-
-    /**
-     * Key under which we store the name which should be used for the
-     * content-encoding of the outgoing message. Typically "gzip" but may be
-     * "x-gzip" if we are processing a response message and this is the name
-     * given by the client in Accept-Encoding.
-     */
-    public static final String GZIP_ENCODING_KEY = GZIPOutInterceptor.class.getName() + ".gzipEncoding";
-    
-    public static final String SOAP_JMS_CONTENTENCODING = "SOAPJMS_contentEncoding";
-
-    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(GZIPOutInterceptor.class);
-    private static final Logger LOG = LogUtils.getL7dLogger(GZIPOutInterceptor.class);
-
-
-    /**
-     * Compression threshold in bytes - messages smaller than this will not be
-     * compressed.
-     */
-    private int threshold = 1024;
-
-    public GZIPOutInterceptor() {
-        super(Phase.PREPARE_SEND);
-        addAfter(MessageSenderInterceptor.class.getName());
-    }
-    public GZIPOutInterceptor(int threshold) {
-        super(Phase.PREPARE_SEND);
-        addAfter(MessageSenderInterceptor.class.getName());
-        this.threshold = threshold;
-    }
-
-    public void setThreshold(int threshold) {
-        this.threshold = threshold;
-    }
-
-    public int getThreshold() {
-        return threshold;
-    }
-
-    public void handleMessage(Message message) throws Fault {
-        UseGzip use = gzipPermitted(message);
-        if (use != UseGzip.NO) {
-            // remember the original output stream, we will write compressed
-            // data to this later
-            OutputStream os = message.getContent(OutputStream.class);
-            if (os == null) {
-                return;
-            }
-            message.put(ORIGINAL_OUTPUT_STREAM_KEY, os);
-            message.put(USE_GZIP_KEY, use);
-
-            // new stream to cache the message
-            GZipThresholdOutputStream cs 
-                = new GZipThresholdOutputStream(threshold,
-                                                os,
-                                                use == UseGzip.FORCE,
-                                                message);
-            message.setContent(OutputStream.class, cs);
-        }
-    }
-
-    /**
-     * Checks whether we can, cannot or must use gzip compression on this output
-     * message. Gzip is always permitted if the message is a client request. If
-     * the message is a server response we check the Accept-Encoding header of
-     * the corresponding request message - with no Accept-Encoding we assume
-     * that gzip is not permitted. For the full gory details, see <a
-     * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3">section
-     * 14.3 of RFC 2616</a> (HTTP 1.1).
-     * 
-     * @param message the outgoing message.
-     * @return whether to attempt gzip compression for this message.
-     * @throws Fault if the Accept-Encoding header does not allow any encoding
-     *                 that we can support (identity, gzip or x-gzip).
-     */
-    private UseGzip gzipPermitted(Message message) throws Fault {
-        UseGzip permitted = UseGzip.NO;
-        if (Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE))) {
-            LOG.fine("Requestor role, so gzip enabled");
-            permitted = UseGzip.YES;
-            message.put(GZIP_ENCODING_KEY, "gzip");
-            addHeader(message, "Accept-Encoding", "gzip;q=1.0, identity; q=0.5, *;q=0"); 
-        } else {
-            LOG.fine("Response role, checking accept-encoding");
-            Exchange exchange = message.getExchange();
-            Message request = exchange.getInMessage();
-            Map<String, List<String>> requestHeaders = CastUtils.cast((Map<?, ?>)request
-                .get(Message.PROTOCOL_HEADERS));
-            if (requestHeaders != null) {
-                List<String> acceptEncodingHeader = CastUtils.cast(HttpHeaderHelper
-                    .getHeader(requestHeaders, HttpHeaderHelper.ACCEPT_ENCODING));
-                List<String> jmsEncodingHeader = CastUtils.cast(requestHeaders.get(SOAP_JMS_CONTENTENCODING));
-                if (jmsEncodingHeader != null && jmsEncodingHeader.contains("gzip")) {
-                    permitted = UseGzip.YES;
-                    message.put(GZIP_ENCODING_KEY, "gzip");
-                }
-                if (acceptEncodingHeader != null) {
-                    if (LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Accept-Encoding header: " + acceptEncodingHeader);
-                    }
-                    // Accept-Encoding is a comma separated list of entries, so
-                    // we split it into its component parts and build two
-                    // lists, one with all the "q=0" encodings and the other
-                    // with the rest (no q, or q=<non-zero>).
-                    List<String> zeros = new ArrayList<String>(3);
-                    List<String> nonZeros = new ArrayList<String>(3);
-
-                    for (String headerLine : acceptEncodingHeader) {
-                        String[] encodings = ENCODINGS.split(headerLine.trim());
-
-                        for (String enc : encodings) {
-                            Matcher m = ZERO_Q.matcher(enc);
-                            if (m.find()) {
-                                zeros.add(enc.substring(0, m.start()));
-                            } else if (enc.indexOf(';') >= 0) {
-                                nonZeros.add(enc.substring(0, enc.indexOf(';')));
-                            } else {
-                                nonZeros.add(enc);
-                            }
-                        }
-                    }
-
-                    // identity encoding is permitted if (a) it is not
-                    // specifically disabled by an identity;q=0 and (b) if
-                    // there is a *;q=0 then there is also an explicit
-                    // identity[;q=<non-zero>]
-                    //
-                    // [x-]gzip is permitted if (a) there is an explicit
-                    // [x-]gzip[;q=<non-zero>], or (b) there is a
-                    // *[;q=<non-zero>] and no [x-]gzip;q=0 to disable it.
-                    boolean identityEnabled = !zeros.contains("identity")
-                                              && (!zeros.contains("*") || nonZeros.contains("identity"));
-                    boolean gzipEnabled = nonZeros.contains("gzip")
-                                          || (nonZeros.contains("*") && !zeros.contains("gzip"));
-                    boolean xGzipEnabled = nonZeros.contains("x-gzip")
-                                           || (nonZeros.contains("*") && !zeros.contains("x-gzip"));
-
-                    if (identityEnabled && !gzipEnabled && !xGzipEnabled) {
-                        permitted = UseGzip.NO;
-                    } else if (identityEnabled && gzipEnabled) {
-                        permitted = UseGzip.YES;
-                        message.put(GZIP_ENCODING_KEY, "gzip");
-                    } else if (identityEnabled && xGzipEnabled) {
-                        permitted = UseGzip.YES;
-                        message.put(GZIP_ENCODING_KEY, "x-gzip");
-                    } else if (!identityEnabled && gzipEnabled) {
-                        permitted = UseGzip.FORCE;
-                        message.put(GZIP_ENCODING_KEY, "gzip");
-                    } else if (!identityEnabled && xGzipEnabled) {
-                        permitted = UseGzip.FORCE;
-                        message.put(GZIP_ENCODING_KEY, "x-gzip");
-                    } else {
-                        throw new Fault(new org.apache.cxf.common.i18n.Message("NO_SUPPORTED_ENCODING",
-                                                                               BUNDLE));
-                    }
-                } else {
-                    LOG.fine("No accept-encoding header");
-                }
-            }
-        }
-
-        if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("gzip permitted: " + permitted);
-        }
-        return permitted;
-    }
-    
-    static class GZipThresholdOutputStream extends AbstractThresholdOutputStream {
-        Message message;
-        
-        public GZipThresholdOutputStream(int t, OutputStream orig,
-                                         boolean force, Message msg) {
-            super(t);
-            super.wrappedStream = orig;
-            message = msg;
-            if (force) {
-                setupGZip();
-            }
-        }
-        
-        private void setupGZip() {
-            
-        }
-
-        @Override
-        public void thresholdNotReached() {
-            //nothing
-            LOG.fine("Message is smaller than compression threshold, not compressing.");
-        }
-
-        @Override
-        public void thresholdReached() throws IOException {
-            LOG.fine("Compressing message.");
-            // Set the Content-Encoding HTTP header
-            String enc = (String)message.get(GZIP_ENCODING_KEY);
-            addHeader(message, "Content-Encoding", enc);
-            // if this is a response message, add the Vary header
-            if (!Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE))) {
-                addHeader(message, "Vary", "Accept-Encoding");
-            } 
-
-            // gzip the result
-            GZIPOutputStream zipOutput = new GZIPOutputStream(wrappedStream);
-            wrappedStream = zipOutput;
-        }
-    }
-    
-    /**
-     * Adds a value to a header. If the given header name is not currently
-     * set in the message, an entry is created with the given single value.
-     * If the header is already set, the value is appended to the first
-     * element of the list, following a comma.
-     * 
-     * @param message the message
-     * @param name the header to set
-     * @param value the value to add
-     */
-    private static void addHeader(Message message, String name, String value) {
-        Map<String, List<String>> protocolHeaders = CastUtils.cast((Map<?, ?>)message
-            .get(Message.PROTOCOL_HEADERS));
-        if (protocolHeaders == null) {
-            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));
-        if (header == null) {
-            header = new ArrayList<String>();
-            protocolHeaders.put(name, header);
-        }
-        if (header.size() == 0) {
-            header.add(value);
-        } else {
-            header.set(0, header.get(0) + "," + value);
-        }
-    }    
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.transport.common.gzip;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+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;
+import java.util.regex.Pattern;
+import java.util.zip.GZIPOutputStream;
+
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.helpers.HttpHeaderHelper;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.MessageSenderInterceptor;
+import org.apache.cxf.io.AbstractThresholdOutputStream;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+
+/**
+ * CXF interceptor that compresses outgoing messages using gzip and sets the
+ * HTTP Content-Encoding header appropriately. An instance of this class should
+ * be added as an out interceptor on clients that need to talk to a service that
+ * accepts gzip-encoded requests or on a service that wants to be able to return
+ * compressed responses. In server mode, the interceptor only compresses
+ * responses if the client indicated (via an Accept-Encoding header on the
+ * request) that it can understand them. To handle gzip-encoded input messages,
+ * see {@link GZIPInInterceptor}. This interceptor supports a compression
+ * {@link #threshold} (default 1kB) - messages smaller than this threshold will
+ * not be compressed. To force compression of all messages, set the threshold to
+ * 0. This class was originally based on one of the CXF samples
+ * (configuration_interceptor).
+ * 
+ * @author Ian Roberts (i.roberts@dcs.shef.ac.uk)
+ */
+public class GZIPOutInterceptor extends AbstractPhaseInterceptor<Message> {
+
+    /**
+     * Enum giving the possible values for whether we should gzip a particular
+     * message.
+     */
+    public static enum UseGzip {
+        NO, YES, FORCE
+    }
+    
+    /**
+     * regular expression that matches any encoding with a
+     * q-value of 0 (or 0.0, 0.00, etc.).
+     */
+    public static final Pattern ZERO_Q = Pattern.compile(";\\s*q=0(?:\\.0+)?$");
+    
+    /**
+     * regular expression which can split encodings
+     */
+    public static final Pattern ENCODINGS = Pattern.compile("[,\\s]*,\\s*");
+
+    /**
+     * Key under which we store the original output stream on the message, for
+     * use by the ending interceptor.
+     */
+    public static final String ORIGINAL_OUTPUT_STREAM_KEY = GZIPOutInterceptor.class.getName()
+                                                            + ".originalOutputStream";
+
+    /**
+     * Key under which we store an indication of whether compression is
+     * permitted or required, for use by the ending interceptor.
+     */
+    public static final String USE_GZIP_KEY = GZIPOutInterceptor.class.getName() + ".useGzip";
+
+    /**
+     * Key under which we store the name which should be used for the
+     * content-encoding of the outgoing message. Typically "gzip" but may be
+     * "x-gzip" if we are processing a response message and this is the name
+     * given by the client in Accept-Encoding.
+     */
+    public static final String GZIP_ENCODING_KEY = GZIPOutInterceptor.class.getName() + ".gzipEncoding";
+    
+    public static final String SOAP_JMS_CONTENTENCODING = "SOAPJMS_contentEncoding";
+
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(GZIPOutInterceptor.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(GZIPOutInterceptor.class);
+
+
+    /**
+     * Compression threshold in bytes - messages smaller than this will not be
+     * compressed.
+     */
+    private int threshold = 1024;
+
+    public GZIPOutInterceptor() {
+        super(Phase.PREPARE_SEND);
+        addAfter(MessageSenderInterceptor.class.getName());
+    }
+    public GZIPOutInterceptor(int threshold) {
+        super(Phase.PREPARE_SEND);
+        addAfter(MessageSenderInterceptor.class.getName());
+        this.threshold = threshold;
+    }
+
+    public void setThreshold(int threshold) {
+        this.threshold = threshold;
+    }
+
+    public int getThreshold() {
+        return threshold;
+    }
+
+    public void handleMessage(Message message) throws Fault {
+        UseGzip use = gzipPermitted(message);
+        if (use != UseGzip.NO) {
+            // remember the original output stream, we will write compressed
+            // data to this later
+            OutputStream os = message.getContent(OutputStream.class);
+            if (os == null) {
+                return;
+            }
+            message.put(ORIGINAL_OUTPUT_STREAM_KEY, os);
+            message.put(USE_GZIP_KEY, use);
+
+            // new stream to cache the message
+            GZipThresholdOutputStream cs 
+                = new GZipThresholdOutputStream(threshold,
+                                                os,
+                                                use == UseGzip.FORCE,
+                                                message);
+            message.setContent(OutputStream.class, cs);
+        }
+    }
+
+    /**
+     * Checks whether we can, cannot or must use gzip compression on this output
+     * message. Gzip is always permitted if the message is a client request. If
+     * the message is a server response we check the Accept-Encoding header of
+     * the corresponding request message - with no Accept-Encoding we assume
+     * that gzip is not permitted. For the full gory details, see <a
+     * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3">section
+     * 14.3 of RFC 2616</a> (HTTP 1.1).
+     * 
+     * @param message the outgoing message.
+     * @return whether to attempt gzip compression for this message.
+     * @throws Fault if the Accept-Encoding header does not allow any encoding
+     *                 that we can support (identity, gzip or x-gzip).
+     */
+    private UseGzip gzipPermitted(Message message) throws Fault {
+        UseGzip permitted = UseGzip.NO;
+        if (Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE))) {
+            LOG.fine("Requestor role, so gzip enabled");
+            permitted = UseGzip.YES;
+            message.put(GZIP_ENCODING_KEY, "gzip");
+            addHeader(message, "Accept-Encoding", "gzip;q=1.0, identity; q=0.5, *;q=0"); 
+        } else {
+            LOG.fine("Response role, checking accept-encoding");
+            Exchange exchange = message.getExchange();
+            Message request = exchange.getInMessage();
+            Map<String, List<String>> requestHeaders = CastUtils.cast((Map<?, ?>)request
+                .get(Message.PROTOCOL_HEADERS));
+            if (requestHeaders != null) {
+                List<String> acceptEncodingHeader = CastUtils.cast(HttpHeaderHelper
+                    .getHeader(requestHeaders, HttpHeaderHelper.ACCEPT_ENCODING));
+                List<String> jmsEncodingHeader = CastUtils.cast(requestHeaders.get(SOAP_JMS_CONTENTENCODING));
+                if (jmsEncodingHeader != null && jmsEncodingHeader.contains("gzip")) {
+                    permitted = UseGzip.YES;
+                    message.put(GZIP_ENCODING_KEY, "gzip");
+                }
+                if (acceptEncodingHeader != null) {
+                    if (LOG.isLoggable(Level.FINE)) {
+                        LOG.fine("Accept-Encoding header: " + acceptEncodingHeader);
+                    }
+                    // Accept-Encoding is a comma separated list of entries, so
+                    // we split it into its component parts and build two
+                    // lists, one with all the "q=0" encodings and the other
+                    // with the rest (no q, or q=<non-zero>).
+                    List<String> zeros = new ArrayList<String>(3);
+                    List<String> nonZeros = new ArrayList<String>(3);
+
+                    for (String headerLine : acceptEncodingHeader) {
+                        String[] encodings = ENCODINGS.split(headerLine.trim());
+
+                        for (String enc : encodings) {
+                            Matcher m = ZERO_Q.matcher(enc);
+                            if (m.find()) {
+                                zeros.add(enc.substring(0, m.start()));
+                            } else if (enc.indexOf(';') >= 0) {
+                                nonZeros.add(enc.substring(0, enc.indexOf(';')));
+                            } else {
+                                nonZeros.add(enc);
+                            }
+                        }
+                    }
+
+                    // identity encoding is permitted if (a) it is not
+                    // specifically disabled by an identity;q=0 and (b) if
+                    // there is a *;q=0 then there is also an explicit
+                    // identity[;q=<non-zero>]
+                    //
+                    // [x-]gzip is permitted if (a) there is an explicit
+                    // [x-]gzip[;q=<non-zero>], or (b) there is a
+                    // *[;q=<non-zero>] and no [x-]gzip;q=0 to disable it.
+                    boolean identityEnabled = !zeros.contains("identity")
+                                              && (!zeros.contains("*") || nonZeros.contains("identity"));
+                    boolean gzipEnabled = nonZeros.contains("gzip")
+                                          || (nonZeros.contains("*") && !zeros.contains("gzip"));
+                    boolean xGzipEnabled = nonZeros.contains("x-gzip")
+                                           || (nonZeros.contains("*") && !zeros.contains("x-gzip"));
+
+                    if (identityEnabled && !gzipEnabled && !xGzipEnabled) {
+                        permitted = UseGzip.NO;
+                    } else if (identityEnabled && gzipEnabled) {
+                        permitted = UseGzip.YES;
+                        message.put(GZIP_ENCODING_KEY, "gzip");
+                    } else if (identityEnabled && xGzipEnabled) {
+                        permitted = UseGzip.YES;
+                        message.put(GZIP_ENCODING_KEY, "x-gzip");
+                    } else if (!identityEnabled && gzipEnabled) {
+                        permitted = UseGzip.FORCE;
+                        message.put(GZIP_ENCODING_KEY, "gzip");
+                    } else if (!identityEnabled && xGzipEnabled) {
+                        permitted = UseGzip.FORCE;
+                        message.put(GZIP_ENCODING_KEY, "x-gzip");
+                    } else {
+                        throw new Fault(new org.apache.cxf.common.i18n.Message("NO_SUPPORTED_ENCODING",
+                                                                               BUNDLE));
+                    }
+                } else {
+                    LOG.fine("No accept-encoding header");
+                }
+            }
+        }
+
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("gzip permitted: " + permitted);
+        }
+        return permitted;
+    }
+    
+    static class GZipThresholdOutputStream extends AbstractThresholdOutputStream {
+        Message message;
+        
+        public GZipThresholdOutputStream(int t, OutputStream orig,
+                                         boolean force, Message msg) {
+            super(t);
+            super.wrappedStream = orig;
+            message = msg;
+            if (force) {
+                setupGZip();
+            }
+        }
+        
+        private void setupGZip() {
+            
+        }
+
+        @Override
+        public void thresholdNotReached() {
+            //nothing
+            LOG.fine("Message is smaller than compression threshold, not compressing.");
+        }
+
+        @Override
+        public void thresholdReached() throws IOException {
+            LOG.fine("Compressing message.");
+            // Set the Content-Encoding HTTP header
+            String enc = (String)message.get(GZIP_ENCODING_KEY);
+            addHeader(message, "Content-Encoding", enc);
+            // if this is a response message, add the Vary header
+            if (!Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE))) {
+                addHeader(message, "Vary", "Accept-Encoding");
+            } 
+
+            // gzip the result
+            GZIPOutputStream zipOutput = new GZIPOutputStream(wrappedStream);
+            wrappedStream = zipOutput;
+        }
+    }
+    
+    /**
+     * Adds a value to a header. If the given header name is not currently
+     * set in the message, an entry is created with the given single value.
+     * If the header is already set, the value is appended to the first
+     * element of the list, following a comma.
+     * 
+     * @param message the message
+     * @param name the header to set
+     * @param value the value to add
+     */
+    private static void addHeader(Message message, String name, String value) {
+        Map<String, List<String>> protocolHeaders = CastUtils.cast((Map<?, ?>)message
+            .get(Message.PROTOCOL_HEADERS));
+        if (protocolHeaders == null) {
+            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));
+        if (header == null) {
+            header = new ArrayList<String>();
+            protocolHeaders.put(name, header);
+        }
+        if (header.size() == 0) {
+            header.add(value);
+        } else {
+            header.set(0, header.get(0) + "," + value);
+        }
+    }    
+
+}

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/TextExtensionFragmentParserTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/TextExtensionFragmentParserTest.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/TextExtensionFragmentParserTest.java (original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/TextExtensionFragmentParserTest.java Fri Apr  6 16:21:14 2012
@@ -1,49 +1,49 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.bus.extension;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TextExtensionFragmentParserTest extends Assert {
-
-    @Test
-    public void testGetExtensions() throws IOException {
-        InputStream is = TextExtensionFragmentParserTest.class.getResourceAsStream("extension2.txt");
-        List<Extension> extensions = new TextExtensionFragmentParser().getExtensions(is);
-        assertEquals("Unexpected number of Extension elements.", 3, extensions.size());
-        
-        Extension e = extensions.get(0);
-        assertTrue("Extension is deferred.", !e.isDeferred());
-        assertEquals("Unexpected class name.", 
-                     "org.apache.cxf.foo.FooImpl", e.getClassname());
-        assertEquals("Unexpected number of namespace elements.", 0, e.getNamespaces().size());
-        e = extensions.get(1);
-        assertTrue("Extension is not deferred.", e.isDeferred());
-        assertEquals("Unexpected implementation class name.", 
-                     "java.lang.Boolean", e.getClassname());
-        assertNull("Interface should be null", e.getInterfaceName());
-        assertEquals("Unexpected number of namespace elements.", 0, e.getNamespaces().size());
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.bus.extension;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TextExtensionFragmentParserTest extends Assert {
+
+    @Test
+    public void testGetExtensions() throws IOException {
+        InputStream is = TextExtensionFragmentParserTest.class.getResourceAsStream("extension2.txt");
+        List<Extension> extensions = new TextExtensionFragmentParser().getExtensions(is);
+        assertEquals("Unexpected number of Extension elements.", 3, extensions.size());
+        
+        Extension e = extensions.get(0);
+        assertTrue("Extension is deferred.", !e.isDeferred());
+        assertEquals("Unexpected class name.", 
+                     "org.apache.cxf.foo.FooImpl", e.getClassname());
+        assertEquals("Unexpected number of namespace elements.", 0, e.getNamespaces().size());
+        e = extensions.get(1);
+        assertTrue("Extension is not deferred.", e.isDeferred());
+        assertEquals("Unexpected implementation class name.", 
+                     "java.lang.Boolean", e.getClassname());
+        assertNull("Interface should be null", e.getInterfaceName());
+        assertEquals("Unexpected number of namespace elements.", 0, e.getNamespaces().size());
+    }
+}

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfigTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfigTest.java?rev=1310446&r1=1310445&r2=1310446&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfigTest.java (original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/osgi/WorkQueueSingleConfigTest.java Fri Apr  6 16:21:14 2012
@@ -1,56 +1,56 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.bus.osgi;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import junit.framework.Assert;
-
-import org.apache.cxf.bus.managers.WorkQueueManagerImpl;
-import org.apache.cxf.workqueue.AutomaticWorkQueueImpl;
-import org.apache.cxf.workqueue.WorkQueueManager;
-import org.junit.Test;
-import org.osgi.service.cm.ConfigurationException;
-
-@Deprecated
-public class WorkQueueSingleConfigTest {
-    @Test
-    public void testReadConfig() throws IOException, ConfigurationException {
-        WorkQueueManager wqm = new WorkQueueManagerImpl();
-        Assert.assertNull(wqm.getNamedWorkQueue("default"));
-        ManagedWorkQueueList workQueueList = new ManagedWorkQueueList();
-        WorkQueueSingleConfig wqlSingleConfig = 
-            new WorkQueueSingleConfig(workQueueList);
-        InputStream is = this.getClass().getResourceAsStream("org.apache.cxf.workqueues.cfg");
-        Properties properties = new Properties();
-        properties.load(is);
-        wqlSingleConfig.updated(properties);
-        workQueueList.addAllToWorkQueueManager(wqm);
-        checkDefaultQueue(wqm);
-    }
-
-    private void checkDefaultQueue(WorkQueueManager wqm) {
-        AutomaticWorkQueueImpl queue = (AutomaticWorkQueueImpl)wqm.getNamedWorkQueue("default");
-        Assert.assertEquals(50, queue.getHighWaterMark());
-        Assert.assertEquals(5, queue.getLowWaterMark());
-        Assert.assertEquals(5, queue.getInitialSize());
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.bus.osgi;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import junit.framework.Assert;
+
+import org.apache.cxf.bus.managers.WorkQueueManagerImpl;
+import org.apache.cxf.workqueue.AutomaticWorkQueueImpl;
+import org.apache.cxf.workqueue.WorkQueueManager;
+import org.junit.Test;
+import org.osgi.service.cm.ConfigurationException;
+
+@Deprecated
+public class WorkQueueSingleConfigTest {
+    @Test
+    public void testReadConfig() throws IOException, ConfigurationException {
+        WorkQueueManager wqm = new WorkQueueManagerImpl();
+        Assert.assertNull(wqm.getNamedWorkQueue("default"));
+        ManagedWorkQueueList workQueueList = new ManagedWorkQueueList();
+        WorkQueueSingleConfig wqlSingleConfig = 
+            new WorkQueueSingleConfig(workQueueList);
+        InputStream is = this.getClass().getResourceAsStream("org.apache.cxf.workqueues.cfg");
+        Properties properties = new Properties();
+        properties.load(is);
+        wqlSingleConfig.updated(properties);
+        workQueueList.addAllToWorkQueueManager(wqm);
+        checkDefaultQueue(wqm);
+    }
+
+    private void checkDefaultQueue(WorkQueueManager wqm) {
+        AutomaticWorkQueueImpl queue = (AutomaticWorkQueueImpl)wqm.getNamedWorkQueue("default");
+        Assert.assertEquals(50, queue.getHighWaterMark());
+        Assert.assertEquals(5, queue.getLowWaterMark());
+        Assert.assertEquals(5, queue.getInitialSize());
+    }
+}



Mime
View raw message