cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r997246 - in /cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/ rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ systests/transports/s...
Date Wed, 15 Sep 2010 09:56:42 GMT
Author: ningjiang
Date: Wed Sep 15 09:56:42 2010
New Revision: 997246

URL: http://svn.apache.org/viewvc?rev=997246&view=rev
Log:
CXF-2994 SoapBindingFactory should not break the backward compatible of the CXF JMSTransport
configuration

Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapJMSConstants.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=997246&r1=997245&r2=997246&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Wed Sep 15 09:56:42 2010
@@ -59,6 +59,7 @@ import org.apache.cxf.binding.soap.inter
 import org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor;
 import org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor;
 import org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor;
+import org.apache.cxf.binding.soap.jms.interceptor.SoapJMSConstants;
 import org.apache.cxf.binding.soap.jms.interceptor.SoapJMSInInterceptor;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.binding.soap.model.SoapBodyInfo;
@@ -145,13 +146,9 @@ public class SoapBindingFactory extends 
 
         info.setName(config.getBindingName(si));
         info.setStyle(config.getStyle());
-        if ("http://cxf.apache.org/transports/jms".equals(config.getTransportURI())) {
-            info.setTransportURI("http://www.w3.org/2010/soapjms/");
-            config.setTransportURI("http://www.w3.org/2010/soapjms/");
-        } else {
-            info.setTransportURI(config.getTransportURI());
-        }
-
+       
+        info.setTransportURI(config.getTransportURI());
+        
         if (config.isMtomEnabled()) {
             info.setProperty(Message.MTOM_ENABLED, Boolean.TRUE);
         }
@@ -380,7 +377,7 @@ public class SoapBindingFactory extends 
             }
             
             //jms
-            if (sbi.getTransportURI().equals("http://www.w3.org/2010/soapjms/")) {
+            if (sbi.getTransportURI().equals(SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID))
{
                 sb.getInInterceptors().add(new SoapJMSInInterceptor());
             }
         } else {

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=997246&r1=997245&r2=997246&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 Sep 15 09:56:42 2010
@@ -36,6 +36,7 @@ import javax.wsdl.factory.WSDLFactory;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
+import org.apache.cxf.binding.soap.jms.interceptor.SoapJMSConstants;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.binding.soap.tcp.SoapTcpDestination;
 import org.apache.cxf.binding.soap.tcp.TCPConduit;
@@ -77,7 +78,7 @@ public class SoapTransportFactory extend
         return Collections.singleton("soap.tcp");
     }
     public String mapTransportURI(String s, String address) {
-        if ("http://www.w3.org/2010/soapjms/".equals(s)
+        if (SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID.equals(s)
             || (address != null && address.startsWith("jms"))) {
             s = "http://cxf.apache.org/transports/jms";
         } else if (SOAP_11_HTTP_BINDING.equals(s)
@@ -173,7 +174,7 @@ public class SoapTransportFactory extend
                     info.addExtensor(sa);
                     info.setAddress(sa.getLocationURI());
                     if (isJMSSpecAddress(sa.getLocationURI())) {
-                        info.setTransportId("http://www.w3.org/2010/soapjms/");
+                        info.setTransportId(SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID);
                     }
                 } else {
                     info.addExtensor(extensor);

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapJMSConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapJMSConstants.java?rev=997246&r1=997245&r2=997246&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapJMSConstants.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapJMSConstants.java
Wed Sep 15 09:56:42 2010
@@ -48,8 +48,7 @@ public final class SoapJMSConstants {
     public static final String CONTENTTYPE_FIELD = SOAP_JMS_PREFIX + CONTENTTYPE_PARAMETER_NAME;
     public static final String ISFAULT_FIELD = SOAP_JMS_PREFIX + ISFAULT_PARAMETER_NAME;
 
-    public static final String SOAP_JMS_SPECIFICIATION_TRANSPORTID = "http://www.w3.org/2008/07/"
-                                                                     + "soap/bindings/JMS/";
+    public static final String SOAP_JMS_SPECIFICIATION_TRANSPORTID = "http://www.w3.org/2010/soapjms/";
     public static final String SOAP_JMS_NAMESPACE = SOAP_JMS_SPECIFICIATION_TRANSPORTID;
     
     // fault codes

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java?rev=997246&r1=997245&r2=997246&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractWSDLBasedEndpointFactory.java
Wed Sep 15 09:56:42 2010
@@ -25,6 +25,7 @@ import javax.xml.namespace.QName;
 import org.apache.cxf.BusException;
 import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.binding.soap.SoapBindingConfiguration;
+import org.apache.cxf.binding.soap.jms.interceptor.SoapJMSConstants;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
@@ -239,6 +240,13 @@ public abstract class AbstractWSDLBasedE
     protected EndpointInfo createEndpointInfo() throws BusException {
         // Get the Service from the ServiceFactory if specified
         Service service = serviceFactory.getService();
+        // setup the transport ID for the soap over jms if there is only address information
+        if (transportId == null && getAddress() != null 
+            && getAddress().startsWith("jms:") && !"jms://".equals(getAddress()))
{
+            // Set the transportId to be soap over jms transport
+            transportId = SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID;
+        }
+        
         // SOAP nonsense
         BindingInfo bindingInfo = createBindingInfo();
         if (bindingInfo instanceof SoapBindingInfo

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java?rev=997246&r1=997245&r2=997246&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java
(original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java
Wed Sep 15 09:56:42 2010
@@ -23,8 +23,7 @@ import org.apache.cxf.jms_greeter.JMSGre
 @javax.jws.WebService(portName = "GreeterPort", 
                       serviceName = "JMSGreeterService",
                       targetNamespace = "http://cxf.apache.org/jms_greeter",
-                      endpointInterface = "org.apache.cxf.jms_greeter.JMSGreeterPortType",
-                      wsdlLocation = "testutils/jms_spec_test.wsdl")
+                      endpointInterface = "org.apache.cxf.jms_greeter.JMSGreeterPortType")
 public class GreeterSpecImpl implements JMSGreeterPortType {
 
     public String greetMe(String me) {



Mime
View raw message