cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r608256 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapConstants.java rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
Date Wed, 02 Jan 2008 22:18:31 GMT
Author: dkulp
Date: Wed Jan  2 14:18:30 2008
New Revision: 608256

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

........
  r606772 | mmao | 2007-12-25 03:42:58 -0500 (Tue, 25 Dec 2007) | 4 lines
  
  CXF-1335
    * SOAPBindingImpl.getBindingID() fully support jaxws SOAPBinding API, also part of CXF-613
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapConstants.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java

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

Modified: incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapConstants.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapConstants.java?rev=608256&r1=608255&r2=608256&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapConstants.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapConstants.java
Wed Jan  2 14:18:30 2008
@@ -30,5 +30,6 @@
 //    public static final String STYLE_BARE = "bare";
 //    public static final String STYLE_WRAPPED = "wrapped";
     public static final String SOAP_ACTION = "SOAPAction";
-    public static final String BINDING_ID = null;
+    public static final String SOAP11_BINDING_ID = "http://schemas.xmlsoap.org/soap/";
+    public static final String SOAP12_BINDING_ID = "http://schemas.xmlsoap.org/wsdl/soap12/";
 }

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java?rev=608256&r1=608255&r2=608256&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl.java
Wed Jan  2 14:18:30 2008
@@ -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.SoapConstants;
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jaxws.binding.AbstractBindingImpl;
@@ -121,9 +121,23 @@
         return null;
     }
 
+    public static boolean isSoapBinding(final String bindingID) {
+        return bindingID.equals(SoapConstants.SOAP11_BINDING_ID)
+            || bindingID.equals(SoapConstants.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