cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject git commit: [CXF-5711] SOAP 1.2 fault reason xml:lang attribtue should follow XML standard
Date Tue, 29 Apr 2014 12:26:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.6.x-fixes d5a037c07 -> e4da1a1f1


[CXF-5711] SOAP 1.2 fault reason xml:lang attribtue should follow XML standard


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e4da1a1f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e4da1a1f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e4da1a1f

Branch: refs/heads/2.6.x-fixes
Commit: e4da1a1f1635b7597219f10a3e4e8d13b82a3b1f
Parents: d5a037c
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Tue Apr 29 12:36:56 2014 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Tue Apr 29 14:26:08 2014 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java | 11 ++++++++++-
 .../cxf/jaxws/interceptors/WebFaultOutInterceptor.java   |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e4da1a1f/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
index 5a9256a..a0dea66 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
@@ -28,6 +28,7 @@ import java.net.HttpURLConnection;
 import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.Future;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
@@ -256,7 +257,15 @@ public class JaxWsClientProxy extends org.apache.cxf.frontend.ClientProxy
implem
     }
     
     private static Locale stringToLocale(String locale) {
-        String parts[] = locale.split("_", -1);
+        // use the IETF BCP 47 delimiter but accept the toString delimiter for cxf 2.7.x
+        final String ch;
+        if (locale.indexOf('_') > 0) {
+            LOG.log(Level.WARNING, "invalid IETF BCP 47 language tag: {0}", locale);
+            ch = "_";
+        } else {
+            ch = "-";
+        }
+        String parts[] = locale.split(ch, 0);
         if (parts.length == 1) {
             return new Locale(parts[0]);
         } else if (parts.length == 2) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4da1a1f/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
index dc9624e..07ab2e0 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
@@ -101,7 +101,7 @@ public class WebFaultOutInterceptor extends FaultOutInterceptor {
                     String convertedLang = lang.getLanguage();
                     String country = lang.getCountry();
                     if (country.length() > 0) {
-                        convertedLang = convertedLang + '_' + country;
+                        convertedLang = convertedLang + '-' + country;
                     }
                     f.setLang(convertedLang);
                 }


Mime
View raw message