cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [4/5] git commit: [CXF-5783] Wire jaxws customizations into the port element
Date Wed, 04 Jun 2014 18:51:59 GMT
[CXF-5783] Wire jaxws customizations into the port element


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

Branch: refs/heads/2.6.x-fixes
Commit: 33620a75b80d761af235a0d4818ae25fd58816e7
Parents: f1972f0
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Jun 4 14:42:25 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Jun 4 14:49:09 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/tools/common/model/JavaPort.java | 5 ++++-
 .../frontend/jaxws/processor/internal/ServiceProcessor.java   | 7 +++++++
 .../cxf/tools/wsdlto/frontend/jaxws/template/service.vm       | 4 ++--
 .../wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java  | 2 ++
 4 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/33620a75/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaPort.java
----------------------------------------------------------------------
diff --git a/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaPort.java b/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaPort.java
index b06376a..4d75e8b 100644
--- a/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaPort.java
+++ b/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaPort.java
@@ -154,7 +154,10 @@ public class JavaPort {
         methodName = mname;       
     }
     
-    public String getMethodName(String mname) {
+    public String getMethodName() {
+        if (methodName == null) {
+            return "get" + getName();
+        }
         return methodName;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/33620a75/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
index 9250393..5f866d1 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
@@ -34,6 +34,7 @@ import javax.wsdl.extensions.soap.SOAPHeader;
 import javax.xml.namespace.QName;
 
 import org.w3c.dom.Element;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.cxf.binding.soap.SOAPBindingUtil;
 import org.apache.cxf.binding.soap.wsdl.extensions.SoapBinding;
@@ -287,6 +288,12 @@ public class ServiceProcessor extends AbstractProcessor {
             processOperation(model, bop, binding);
         }
         jport.setJavaDoc(port.getDocumentation());
+        JAXWSBinding bind = port.getExtensor(JAXWSBinding.class);
+        if (bind != null) {
+            jport.setMethodName(bind.getMethodName());
+            jport.setJavaDoc(bind.getMethodJavaDoc());
+        }
+        
         return jport;
     }
     private void processBindings(JavaModel model) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/33620a75/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
index a4414a4..31e0b78 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
@@ -186,7 +186,7 @@ $port.javaDoc
 #if ($mark-generated == "true")
     @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "$currentdate")
 #end
-    public ${portClassName} get${port.Name}() {
+    public ${portClassName} ${port.MethodName}() {
         return super.getPort($port.Name, ${portClassName}.class);
     }
 
@@ -204,7 +204,7 @@ $port.javaDoc
 #if ($mark-generated == "true")
     @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "$currentdate")
 #end
-    public ${portClassName} get${port.Name}(WebServiceFeature... features) {
+    public ${portClassName} ${port.MethodName}(WebServiceFeature... features) {
         return super.getPort($port.Name, ${portClassName}.class, features);
     }
 #end

http://git-wip-us.apache.org/repos/asf/cxf/blob/33620a75/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
index 8b172c4..9433cdb 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
@@ -31,6 +31,7 @@ import javax.wsdl.BindingOperation;
 import javax.wsdl.Definition;
 import javax.wsdl.Fault;
 import javax.wsdl.Operation;
+import javax.wsdl.Port;
 import javax.wsdl.PortType;
 import javax.wsdl.Service;
 import javax.wsdl.extensions.ExtensionRegistry;
@@ -91,6 +92,7 @@ public class JAXWSDefinitionBuilder extends AbstractWSDLBuilder {
         registerJAXWSBinding(registry, Service.class);
         registerJAXWSBinding(registry, Fault.class);
         registerJAXWSBinding(registry, PortType.class);
+        registerJAXWSBinding(registry, Port.class);
         registerJAXWSBinding(registry, Operation.class);
         registerJAXWSBinding(registry, Binding.class);
         registerJAXWSBinding(registry, BindingOperation.class);


Mime
View raw message