cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r606772 - in /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws: EndpointImpl.java EndpointReferenceBuilder.java binding/soap/SOAPBindingImpl.java
Date Tue, 25 Dec 2007 08:43:05 GMT
Author: mmao
Date: Tue Dec 25 00:42:58 2007
New Revision: 606772

URL: http://svn.apache.org/viewvc?rev=606772&view=rev
Log:
CXF-1335
  * SOAPBindingImpl.getBindingID() fully support jaxws SOAPBinding API, also part of CXF-613


Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?rev=606772&r1=606771&r2=606772&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
Tue Dec 25 00:42:58 2007
@@ -55,6 +55,7 @@
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorProvider;
+import org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl;
 import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
@@ -518,7 +519,7 @@
         }
         
         String bindingId = getBinding().getBindingID();        
-        if (!"http://schemas.xmlsoap.org/soap/".equals(bindingId)) {
+        if (!SOAPBindingImpl.isSoapBinding(bindingId)) {
             throw new UnsupportedOperationException(new Message("GET_ENDPOINTREFERENCE_UNSUPPORTED_BINDING",
                                                                 LOG).toString());
         }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java?rev=606772&r1=606771&r2=606772&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java
Tue Dec 25 00:42:58 2007
@@ -20,13 +20,12 @@
 package org.apache.cxf.jaxws;
 
 import java.util.logging.Logger;
-
 import javax.xml.ws.EndpointReference;
 import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
 
-import org.apache.cxf.binding.soap.SoapBindingConstants;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl;
 import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 
 public class EndpointReferenceBuilder {
@@ -38,8 +37,8 @@
     }
     public EndpointReference getEndpointReference() {
         String bindingId = endpoint.getJaxwsBinding().getBindingID();   
-        if (!SoapBindingConstants.SOAP11_BINDING_ID.equals(bindingId) 
-            && !SoapBindingConstants.SOAP12_BINDING_ID.equals(bindingId)) {
+        
+        if (!SOAPBindingImpl.isSoapBinding(bindingId)) {
             throw new UnsupportedOperationException(new Message("GET_ENDPOINTREFERENCE_UNSUPPORTED_BINDING",
                                                                 LOG, bindingId).toString());
         }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java?rev=606772&r1=606771&r2=606772&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
Tue Dec 25 00:42:58 2007
@@ -23,7 +23,6 @@
 import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.logging.Logger;
-
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPConstants;
 import javax.xml.soap.SOAPException;
@@ -33,6 +32,7 @@
 
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.Soap12;
+import org.apache.cxf.binding.soap.SoapBindingConstants;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxws.binding.AbstractBindingImpl;
@@ -119,11 +119,24 @@
             }
         }
         return null;
-    }    
+    }
+
+    public static boolean isSoapBinding(final String bindingID) {
+        return bindingID.equals(SoapBindingConstants.SOAP11_BINDING_ID)
+            || bindingID.equals(SoapBindingConstants.SOAP12_BINDING_ID)
+            || bindingID.equals(SOAPBinding.SOAP11HTTP_BINDING)
+            || bindingID.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)
+            || bindingID.equals(SOAPBinding.SOAP12HTTP_BINDING)
+            || bindingID.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING);
+    }
 
     public String getBindingID() {
-        //REVISIT: JIRA CXF-613
-        return "http://schemas.xmlsoap.org/soap/";
+        if (this.soapBinding instanceof SoapBindingInfo) {
+            SoapBindingInfo bindingInfo = (SoapBindingInfo) this.soapBinding;
+            if (bindingInfo.getSoapVersion() instanceof Soap12) {
+                return SOAP12HTTP_BINDING;             
+            }
+        }
+        return SOAP11HTTP_BINDING;
     }
-    
 }



Mime
View raw message