cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1485164 - in /cxf/branches/2.6.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/
Date Wed, 22 May 2013 11:44:50 GMT
Author: ay
Date: Wed May 22 11:44:50 2013
New Revision: 1485164

URL: http://svn.apache.org/r1485164
Log:
Merged revisions 1485154 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

........
  r1485154 | ay | 2013-05-22 13:28:37 +0200 (Wed, 22 May 2013) | 9 lines
  
  Merged revisions 1485151 via  svn merge from
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1485151 | ay | 2013-05-22 13:21:20 +0200 (Wed, 22 May 2013) | 1 line
    
    addition to CXF-5009 as requested
  ........
  
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
    cxf/branches/2.6.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
    cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java

Propchange: cxf/branches/2.6.x-fixes/
            ('svn:mergeinfo' removed)

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

Modified: cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java?rev=1485164&r1=1485163&r2=1485164&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapFault.java
Wed May 22 11:44:50 2013
@@ -189,7 +189,7 @@ public class SoapFault extends Fault {
      * 
      * @param subCode The SubCode element as detailed by the SOAP 1.2 spec. 
      */
-    public void appendSubCode(QName subCode) {
+    public void addSubCode(QName subCode) {
         if (subCodes == null) {
             subCodes = new LinkedList<QName>();
         }

Modified: cxf/branches/2.6.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java?rev=1485164&r1=1485163&r2=1485164&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
Wed May 22 11:44:50 2013
@@ -150,8 +150,8 @@ public class SoapFaultSerializerTest ext
         String faultString = "Hadrian caused this Fault!";
         SoapFault fault = new SoapFault(faultString, Soap12.getInstance().getSender());
         
-        fault.appendSubCode(new QName("http://cxf.apache.org/soap/fault", "invalidsoap",
"cxffaultcode"));
-        fault.appendSubCode(new QName("http://cxf.apache.org/soap/fault2", "invalidsoap2",
"cxffaultcode2"));
+        fault.addSubCode(new QName("http://cxf.apache.org/soap/fault", "invalidsoap", "cxffaultcode"));
+        fault.addSubCode(new QName("http://cxf.apache.org/soap/fault2", "invalidsoap2", "cxffaultcode2"));
 
         SoapMessage m = new SoapMessage(new MessageImpl());
         m.setVersion(Soap12.getInstance());

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java?rev=1485164&r1=1485163&r2=1485164&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
Wed May 22 11:44:50 2013
@@ -21,6 +21,7 @@ package org.apache.cxf.jaxws.interceptor
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.util.Iterator;
 import java.util.Locale;
 import java.util.ResourceBundle;
 import java.util.logging.Level;
@@ -37,6 +38,7 @@ import org.apache.cxf.common.i18n.Bundle
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.databinding.DataWriter;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.FaultOutInterceptor;
 import org.apache.cxf.message.FaultMode;
@@ -88,16 +90,10 @@ public class WebFaultOutInterceptor exte
         try {
             if (f.getCause().getClass().equals(SOAPFaultException.class)) {
                 SOAPFaultException sf = (SOAPFaultException) (f.getCause());
-                if (sf.getFault().getFaultSubcodes().hasNext()
-                        && f.getClass().equals(SoapFault.class)) {
-                    String subcode = sf.getFault().getFaultSubcodes().next()
-                           .toString();
-                    String nameSpace = subcode.substring(
-                           subcode.indexOf("{") + 1, subcode.indexOf("}"));
-                    String localPart = subcode
-                           .substring(subcode.indexOf("}") + 1);
-                    QName subcodeQName = new QName(nameSpace, localPart);
-                    ((SoapFault) f).setSubCode(subcodeQName);
+                if (f instanceof SoapFault) {
+                    for (Iterator<QName> it = CastUtils.cast(sf.getFault().getFaultSubcodes());
it.hasNext();) {
+                        ((SoapFault) f).addSubCode(it.next());    
+                    }
                 }
                 if (sf.getFault().getFaultReasonLocales().hasNext()) {
                     Locale lang = (Locale) sf.getFault()



Mime
View raw message