servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r953199 - in /servicemix/components/bindings/servicemix-cxf-bc/trunk/src: main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java
Date Thu, 10 Jun 2010 02:13:06 GMT
Author: ffang
Date: Thu Jun 10 02:13:06 2010
New Revision: 953199

URL: http://svn.apache.org/viewvc?rev=953199&view=rev
Log:
[SMXCOMP-755]need check if faultcode qname has prefix or not

Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java?rev=953199&r1=953198&r2=953199&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Thu Jun 10 02:13:06 2010
@@ -251,7 +251,10 @@ public class JbiInWsdl1Interceptor exten
                 NodeList nodeList = soapFault.getElementsByTagName("faultcode");
                 String faultCode = nodeList.item(0).getFirstChild()
                         .getTextContent();
-                String prefix = faultCode.substring(0, faultCode.indexOf(":"));
+                String prefix = "";
+                if (faultCode.indexOf(":") != -1) {
+                    prefix = faultCode.substring(0, faultCode.indexOf(":"));
+                }
                 String localName = faultCode
                         .substring(faultCode.indexOf(":") + 1);
                 message.put("faultcode", new QName(prefix, localName));
@@ -275,7 +278,10 @@ public class JbiInWsdl1Interceptor exten
                 NodeList nodeList = soapFault.getElementsByTagName("soap:Code");
                 String faultCode = DomUtil.getFirstChildElement(
                         nodeList.item(0)).getTextContent();
-                String prefix = faultCode.substring(0, faultCode.indexOf(":"));
+                String prefix = "";
+                if (faultCode.indexOf(":") != -1) {
+                    prefix = faultCode.substring(0, faultCode.indexOf(":"));
+                }
                 String localName = faultCode
                         .substring(faultCode.indexOf(":") + 1);
                 message.put("faultcode", new QName(prefix, localName));

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java?rev=953199&r1=953198&r2=953199&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java
Thu Jun 10 02:13:06 2010
@@ -66,7 +66,7 @@ public class CxfBcProviderConsumerTest e
             port.add(1, -2);
             fail("should get exception");
         } catch (Exception e) {
-            String expected = "the fault message can't be parsed:";
+            String expected = "Negative number cant be added!";
             assertTrue("Exception did not contain expected text. expected: " 
                 + expected + " was: " + e.getMessage(), e.getMessage().contains(expected));
         }



Mime
View raw message