cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r704587 - in /cxf/branches/2.1.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/...
Date Tue, 14 Oct 2008 17:23:26 GMT
Author: dkulp
Date: Tue Oct 14 10:23:25 2008
New Revision: 704587

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

........
  r704584 | dkulp | 2008-10-14 13:19:29 -0400 (Tue, 14 Oct 2008) | 2 lines
  
  [CXF-1864] Fix parsing of namespaces/qnames in the soap 12 fault processing
........

Added:
    cxf/branches/2.1.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/cxf1864.xml
      - copied unchanged from r704584, cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/cxf1864.xml
Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java
    cxf/branches/2.1.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 14 10:23:25 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584

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

Modified: cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java?rev=704587&r1=704586&r2=704587&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java
Tue Oct 14 10:23:25 2008
@@ -34,7 +34,6 @@
 import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.interceptor.ClientFaultConverter;
@@ -65,17 +64,18 @@
         
         try {
             Document fault = StaxUtils.read(new FragmentStreamReader(reader));
-            String faultCodeString = (String) xu.getValue("//s:Fault/s:Code/s:Value/text()",

-                                                        fault, 
-                                                        XPathConstants.STRING);
-            
-            faultCode = XMLUtils.getQName(faultCodeString, fault);
+            Element el = (Element)xu.getValue("//s:Fault/s:Code/s:Value", 
+                                      fault, 
+                                      XPathConstants.NODE);
+            if (el != null) {
+                faultCode = XMLUtils.getQName(el.getTextContent(), el);
+            }
             
-            String subCodeString = (String) xu.getValue("//s:Fault/s:Code/s:Subcode/s:Value/text()",

-                                                        fault,
-                                                        XPathConstants.STRING);
-            if (StringUtils.isEmpty(subCodeString)) {
-                subCode = XMLUtils.getQName(subCodeString, fault);
+            el = (Element)xu.getValue("//s:Fault/s:Code/s:Subcode/s:Value", 
+                                      fault, 
+                                      XPathConstants.NODE);
+            if (el != null) {
+                subCode = XMLUtils.getQName(el.getTextContent(), el);
             }
             
             exMessage = (String) xu.getValue("//s:Fault/s:Reason/s:Text/text()", 

Modified: cxf/branches/2.1.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.1.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java?rev=704587&r1=704586&r2=704587&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
Tue Oct 14 10:23:25 2008
@@ -154,4 +154,27 @@
         assertEquals(Soap12.getInstance().getReceiver(), sf.getFaultCode());
         
     }
+    
+    
+    @Test
+    public void testCXF1864() throws Exception {
+
+        SoapMessage m = new SoapMessage(new MessageImpl());
+        m.setVersion(Soap12.getInstance());        
+
+
+        XMLStreamReader reader = StaxUtils.createXMLStreamReader(this.getClass()
+                                                                 .getResourceAsStream("cxf1864.xml"));
+        m.setContent(XMLStreamReader.class, reader);
+
+        reader.nextTag();
+
+        Soap12FaultInInterceptor inInterceptor = new Soap12FaultInInterceptor();
+        inInterceptor.handleMessage(m);
+
+        SoapFault fault2 = (SoapFault)m.getContent(Exception.class);
+        assertNotNull(fault2);
+        assertEquals(Soap12.getInstance().getReceiver(), fault2.getFaultCode());
+    }
+
 }

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java?rev=704587&r1=704586&r2=704587&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
Tue Oct 14 10:23:25 2008
@@ -168,7 +168,6 @@
         return objectFactoryForClass(InjectionUtils.getActualType(genericType));
     }
     
-    @SuppressWarnings("deprecation")
     protected Unmarshaller createUnmarshaller(Class<?> cls, Type genericType) 
         throws JAXBException {
         JAXBContext context = getJAXBContext(cls, genericType);



Mime
View raw message