cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [cxf] branch master updated: Minor change to make it easier to subclass Endpoint creation
Date Wed, 01 May 2019 08:53:41 GMT
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new cc0f125  Minor change to make it easier to subclass Endpoint creation
cc0f125 is described below

commit cc0f12533d407baabc29c2a1131520012db97662
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Wed May 1 09:53:18 2019 +0100

    Minor change to make it easier to subclass Endpoint creation
---
 .../org/apache/cxf/wsn/services/JaxwsEndpointManager.java  | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
index efc7635..94fabe2 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
@@ -56,11 +56,7 @@ public class JaxwsEndpointManager implements EndpointManager {
             if (WSNHelper.getInstance().setClassLoader()) {
                 Thread.currentThread().setContextClassLoader(JaxwsEndpointManager.class.getClassLoader());
             }
-            String bindingId = SOAPBinding.SOAP11HTTP_BINDING;
-            if (isCXF()) {
-                bindingId = SOAPBinding.SOAP12HTTP_BINDING;
-            }
-            Endpoint endpoint = Endpoint.create(bindingId, service);
+            Endpoint endpoint = createEndpoint(service);
             if (wsdlLocation != null) {
                 try {
                     if (endpoint.getProperties() == null) {
@@ -94,6 +90,14 @@ public class JaxwsEndpointManager implements EndpointManager {
         }
     }
 
+    protected Endpoint createEndpoint(Object service) {
+        String bindingId = SOAPBinding.SOAP11HTTP_BINDING;
+        if (isCXF()) {
+            bindingId = SOAPBinding.SOAP12HTTP_BINDING;
+        }
+        return Endpoint.create(bindingId, service);
+    }
+
     private boolean isCXF() {
         return Provider.provider().getClass().getName().contains(".cxf");
     }


Mime
View raw message