cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1221874 - /cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
Date Wed, 21 Dec 2011 20:53:08 GMT
Author: dkulp
Date: Wed Dec 21 20:53:07 2011
New Revision: 1221874

URL: http://svn.apache.org/viewvc?rev=1221874&view=rev
Log:
[CXF-3991] Better error message when conduit cannot be found.
Patch from Andrei Shakirin applied.

Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java?rev=1221874&r1=1221873&r2=1221874&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
Wed Dec 21 20:53:07 2011
@@ -62,6 +62,8 @@ import org.apache.cxf.wsdl11.WSDLEndpoin
 public class SoapTransportFactory extends AbstractTransportFactory implements DestinationFactory,
     WSDLEndpointFactory, ConduitInitiator {
     
+    public static final String CANNOT_GET_CONDUIT_ERROR 
+        = "Could not find conduit initiator for address: %s and transport: %s";
     public static final String SOAP_11_HTTP_BINDING = "http://schemas.xmlsoap.org/soap/http";
     public static final String SOAP_12_HTTP_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/";
     
@@ -222,13 +224,11 @@ public class SoapTransportFactory extend
                 conduitInit = mgr.getConduitInitiatorForUri(address);
             }
             if (conduitInit == null) {
-                throw new RuntimeException("Could not find conduit initiator for transport
"
-                        + transId);
+                throw new RuntimeException(String.format(CANNOT_GET_CONDUIT_ERROR, address,
transId));
             }
             return conduitInit.getConduit(ei, target);
         } catch (BusException e) {
-            throw new RuntimeException("Could not find conduit initiator for transport "
-                                       + transId);
+            throw new RuntimeException(String.format(CANNOT_GET_CONDUIT_ERROR, address, transId));
         }
     }
 



Mime
View raw message