cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject cxf-dosgi git commit: [DOSGI-209] Copy SoapBindingConfig intents
Date Wed, 14 Sep 2016 13:35:10 GMT
Repository: cxf-dosgi
Updated Branches:
  refs/heads/master b193d0bdb -> a109b28fa


[DOSGI-209] Copy SoapBindingConfig intents


Project: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/commit/a109b28f
Tree: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/tree/a109b28f
Diff: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/diff/a109b28f

Branch: refs/heads/master
Commit: a109b28facacc3f61ec37a84fd1b3a449e20deb6
Parents: b193d0b
Author: Christian Schneider <chris@die-schneider.net>
Authored: Wed Sep 14 15:35:00 2016 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Wed Sep 14 15:35:00 2016 +0200

----------------------------------------------------------------------
 .../cxf/dosgi/dsw/handlers/ws/WsProvider.java   | 22 +++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/a109b28f/provider-ws/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ws/WsProvider.java
----------------------------------------------------------------------
diff --git a/provider-ws/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ws/WsProvider.java
b/provider-ws/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ws/WsProvider.java
index bd1b541..3958c8b 100644
--- a/provider-ws/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ws/WsProvider.java
+++ b/provider-ws/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ws/WsProvider.java
@@ -127,12 +127,32 @@ public class WsProvider implements DistributionProvider {
         if (dataBinding != null) {
             factory.setDataBinding(dataBinding);
         }
-        BindingConfiguration binding = intentManager.getIntent(BindingConfiguration.class,
intents);
+        BindingConfiguration binding = copy(intentManager.getIntent(BindingConfiguration.class,
intents));
+        
         if (binding != null) {
             factory.setBindingConfig(binding);
         }
     }
 
+    private BindingConfiguration copy(BindingConfiguration bindingCfg) {
+        return bindingCfg instanceof SoapBindingConfiguration 
+            ? copy((SoapBindingConfiguration)bindingCfg) : bindingCfg;
+    }
+
+    private SoapBindingConfiguration copy(SoapBindingConfiguration intent) {
+        SoapBindingConfiguration bindingCfg = new SoapBindingConfiguration();
+        bindingCfg.setVersion(intent.getVersion());
+        bindingCfg.setTransportURI(intent.getTransportURI());
+        bindingCfg.setUse(intent.getUse());
+        if (intent.isSetStyle()) {
+            bindingCfg.setStyle(intent.getStyle());
+        }
+        bindingCfg.setMtomEnabled(intent.isMtomEnabled());
+        bindingCfg.setBindingName(intent.getBindingName());
+        bindingCfg.setBindingNamePostfix(intent.getBindingNamePostfix());
+        return bindingCfg;
+    }
+
     @SuppressWarnings("rawtypes")
     public Endpoint exportService(Object serviceO,
                                   BundleContext serviceContext,


Mime
View raw message