cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: [CXF-6282] Better support for java7 try-with-resources blocks.
Date Fri, 06 Mar 2015 16:58:54 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 68447ebae -> e4b2e746d


[CXF-6282] Better support for java7 try-with-resources blocks.


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

Branch: refs/heads/master
Commit: e4b2e746d6a70d02f64daab7aca79142e62709ca
Parents: 68447eb
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Mar 6 11:35:16 2015 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Mar 6 11:37:28 2015 -0500

----------------------------------------------------------------------
 .../cxf/maven_plugin/wsdl2java/Option.java      | 14 +++
 .../cxf/maven_plugin/wsdl2java/WsdlOption.java  |  3 +
 .../org/apache/cxf/jaxws/JaxWsClientProxy.java  |  3 +-
 .../org/apache/cxf/jaxws/CodeFirstTest.java     | 10 ++-
 systests/jaxws/pom.xml                          |  5 ++
 .../jaxws/SchemaValidationClientServerTest.java | 95 ++++++++++----------
 .../cxf/systest/jaxws/ServicePortTypeImpl.java  |  5 +-
 .../apache/cxf/tools/common/ToolConstants.java  |  1 +
 .../cxf/tools/common/model/JavaInterface.java   | 14 +++
 .../wsdlto/frontend/jaxws/JAXWSContainer.java   |  1 +
 .../frontend/jaxws/generators/SEIGenerator.java | 16 +++-
 .../wsdlto/frontend/jaxws/jaxws-toolspec.xml    |  9 ++
 .../processor/internal/PortTypeProcessor.java   |  7 ++
 .../tools/wsdlto/frontend/jaxws/template/sei.vm |  2 +-
 14 files changed, 130 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/Option.java
----------------------------------------------------------------------
diff --git a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/Option.java
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/Option.java
index b65c303..0e7a78a 100644
--- a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/Option.java
+++ b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/Option.java
@@ -160,6 +160,11 @@ public class Option {
     String exceptionSuper;
 
     /**
+     * The superinterfaces to use for generated SEIs
+     */
+    List<String> seiSuper = new ArrayList<String>();
+
+    /**
      * Uses @Generated annotation in all generated java classes if the flag is set to true.
      */
     Boolean markGenerated;
@@ -389,6 +394,14 @@ public class Option {
     public void setExceptionSuper(String exceptionSuper) {
         this.exceptionSuper = exceptionSuper;
     }
+    public List<String> getSeiSuper() {
+        return seiSuper;
+    }
+    
+    public void setSeiSuper(List<String> seiSuper) {
+        this.seiSuper.clear();
+        this.seiSuper.addAll(seiSuper);
+    }
 
     public Boolean isMarkGenerated() {
         return markGenerated;
@@ -489,6 +502,7 @@ public class Option {
     public void merge(Option defaultOptions) {
         wsdlList = setIfNull(wsdlList, defaultOptions.wsdlList);
         exceptionSuper = setIfNull(exceptionSuper, defaultOptions.exceptionSuper);
+        seiSuper.addAll(defaultOptions.seiSuper);
         extendedSoapHeaders = setIfNull(extendedSoapHeaders, defaultOptions.extendedSoapHeaders);
         noTypes = setIfNull(noTypes, defaultOptions.noTypes);
         validateWsdl = setIfNull(validateWsdl, defaultOptions.validateWsdl);

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java
----------------------------------------------------------------------
diff --git a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java
index b17f7d0..2ed5794 100644
--- a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java
+++ b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WsdlOption.java
@@ -177,6 +177,9 @@ public class WsdlOption extends Option implements org.apache.cxf.maven_plugin.Ge
                      + ToolConstants.CFG_FAULT_SERIAL_VERSION_UID);
         addIfNotNull(list, getExceptionSuper(), "-"
                      + ToolConstants.CFG_EXCEPTION_SUPER);
+        addList(list, "-" + ToolConstants.CFG_SEI_SUPER, true,
+                getSeiSuper());
+        
         addIfTrue(list, isAutoNameResolution(), "-" 
                      + ToolConstants.CFG_AUTORESOLVE);
         addIfTrue(list, isNoAddressBinding(), "-" 

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
index d155ab8..d963693 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
@@ -112,7 +112,8 @@ public class JaxWsClientProxy extends org.apache.cxf.frontend.ClientProxy
implem
         try {
             if (method.getDeclaringClass().equals(BindingProvider.class)
                 || method.getDeclaringClass().equals(Object.class)
-                || method.getDeclaringClass().equals(Closeable.class)) {
+                || method.getDeclaringClass().equals(Closeable.class)
+                || method.getDeclaringClass().equals(AutoCloseable.class)) {
                 return method.invoke(this, params);
             } else if (method.getDeclaringClass().isInstance(client)) {
                 return method.invoke(client, params);

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
index 790b83d..1392adb 100644
--- a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
+++ b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
@@ -269,7 +269,15 @@ public class CodeFirstTest extends AbstractJaxWsTest {
         } catch (AddNumbersException e) {
             fail("should throw AddNumbersSubException");
         }
-
+        try (AutoCloseable c = (AutoCloseable)proxy) {
+            assertEquals("Result = 2", proxy.addNumbers(1, 1));
+        }
+        try {
+            proxy.addNumbers(1, 1);
+            fail("Proxy should be closed");
+        } catch (IllegalStateException t) {
+            //this is expected as the client is closed.
+        }
     }
 
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/systests/jaxws/pom.xml
----------------------------------------------------------------------
diff --git a/systests/jaxws/pom.xml b/systests/jaxws/pom.xml
index 7b6dc49..b1999e3 100644
--- a/systests/jaxws/pom.xml
+++ b/systests/jaxws/pom.xml
@@ -47,6 +47,11 @@
                             <defaultOptions>
                                 <extendedSoapHeaders>true</extendedSoapHeaders>
                                 <validate>basic</validate>
+                                <seiSuper>
+                                  <super>java.lang.AutoCloseable</super>
+                                  <super>javax.xml.ws.BindingProvider</super>
+                                  <super>org.apache.cxf.endpoint.Client</super>
+                                </seiSuper>
                             </defaultOptions>
                         </configuration>
                         <goals>

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java
b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java
index fad4c22..d261d96 100644
--- a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java
+++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java
@@ -23,10 +23,8 @@ import java.util.HashMap;
 import java.util.Map;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Endpoint;
 
-import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.jaxws.EndpointImpl;
@@ -93,56 +91,57 @@ public class SchemaValidationClientServerTest extends AbstractBusClientServerTes
         Service service = new Service();
         assertNotNull(service);
 
-        ServicePortType greeter = service.getPort(portName, ServicePortType.class);
-        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
-        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
-        updateAddressPort(greeter, PORT);
-
-        RequestIdType requestId = new RequestIdType();
-        requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
-        CkRequestType request = new CkRequestType();
-        request.setRequest(requestId);
-        ((BindingProvider)greeter).getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED,
Boolean.TRUE);
-        RequestHeader header = new RequestHeader();
-        header.setHeaderValue("AABBCC");
-        CkResponseType response = greeter.ckR(request, header); 
-        assertEquals(response.getProduct().get(0).getAction().getStatus(), 4);
-        
-        try {
-            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeez");
-            request.setRequest(requestId);
-            greeter.ckR(request, header);
-            fail("should catch marshall exception as the invalid outgoing message per schema");
-        } catch (Exception e) {
-            assertTrue(e.getMessage().contains("Marshalling Error"));
-            assertTrue(e.getMessage().contains("is not facet-valid with respect to pattern"));
-        }
-
-        try {
+        try (ServicePortType greeter = service.getPort(portName, ServicePortType.class))
{
+            greeter.getInInterceptors().add(new LoggingInInterceptor());
+            greeter.getOutInterceptors().add(new LoggingOutInterceptor());
+            updateAddressPort(greeter, PORT);
+    
+            RequestIdType requestId = new RequestIdType();
             requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
+            CkRequestType request = new CkRequestType();
             request.setRequest(requestId);
-            header.setHeaderValue("AABBCCDDEEFFGGHHIIJJ");
+            greeter.getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
+            RequestHeader header = new RequestHeader();
+            header.setHeaderValue("AABBCC");
+            CkResponseType response = greeter.ckR(request, header); 
+            assertEquals(response.getProduct().get(0).getAction().getStatus(), 4);
             
-            //Check if incoming validation on server side works, turn off outgoing
-            greeter.ckR(request, header);
-            fail("should catch marshall exception as the invalid outgoing message per schema");
-        } catch (Exception e) {
-            assertTrue(e.getMessage().contains("Marshalling Error"));
-            assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength"));
-        }
-        
-        try {
-            requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
-            request.setRequest(requestId);
-            header.setHeaderValue("AABBCCDDEEFFGGHHIIJJ");
+            try {
+                requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeez");
+                request.setRequest(requestId);
+                greeter.ckR(request, header);
+                fail("should catch marshall exception as the invalid outgoing message per
schema");
+            } catch (Exception e) {
+                assertTrue(e.getMessage().contains("Marshalling Error"));
+                assertTrue(e.getMessage().contains("is not facet-valid with respect to pattern"));
+            }
+    
+            try {
+                requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
+                request.setRequest(requestId);
+                header.setHeaderValue("AABBCCDDEEFFGGHHIIJJ");
+                
+                //Check if incoming validation on server side works, turn off outgoing
+                greeter.ckR(request, header);
+                fail("should catch marshall exception as the invalid outgoing message per
schema");
+            } catch (Exception e) {
+                assertTrue(e.getMessage().contains("Marshalling Error"));
+                assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength"));
+            }
             
-            //Check if incoming validation on server side works, turn off outgoing
-            ((BindingProvider)greeter).getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED,
Boolean.FALSE);
-            greeter.ckR(request, header);
-            fail("should catch marshall exception as the invalid outgoing message per schema");
-        } catch (Exception e) {
-            assertTrue(e.getMessage().contains("Could not validate soapheader "));
-            assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength"));
+            try {
+                requestId.setId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
+                request.setRequest(requestId);
+                header.setHeaderValue("AABBCCDDEEFFGGHHIIJJ");
+                
+                //Check if incoming validation on server side works, turn off outgoing
+                greeter.getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.FALSE);
+                greeter.ckR(request, header);
+                fail("should catch marshall exception as the invalid outgoing message per
schema");
+            } catch (Exception e) {
+                assertTrue(e.getMessage().contains("Could not validate soapheader "));
+                assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength"));
+            }
         }
         
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServicePortTypeImpl.java
----------------------------------------------------------------------
diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServicePortTypeImpl.java
b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServicePortTypeImpl.java
index 54ed649..3f0493f 100644
--- a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServicePortTypeImpl.java
+++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServicePortTypeImpl.java
@@ -23,10 +23,10 @@ import org.apache.cxf.jaxws.schemavalidation.CkRequestType;
 import org.apache.cxf.jaxws.schemavalidation.CkResponseType;
 import org.apache.cxf.jaxws.schemavalidation.ProductPostActionType;
 import org.apache.cxf.jaxws.schemavalidation.RequestHeader;
-import org.apache.cxf.jaxws.schemavalidation.ServicePortType;
 
 @javax.xml.ws.BindingType(value = "http://www.w3.org/2003/05/soap/bindings/HTTP/")
-public class ServicePortTypeImpl implements ServicePortType {
+@javax.jws.WebService(endpointInterface = "org.apache.cxf.jaxws.schemavalidation.ServicePortType")
+public class ServicePortTypeImpl {
     
     public CkResponseType ckR(CkRequestType ckRIn, RequestHeader header) {
         CkResponseType result = new CkResponseType();
@@ -37,5 +37,4 @@ public class ServicePortTypeImpl implements ServicePortType {
         result.getProduct().add(pdt);
         return result;
     }
-
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
----------------------------------------------------------------------
diff --git a/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java b/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
index 77549a7..f1be85e 100644
--- a/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
+++ b/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
@@ -99,6 +99,7 @@ public final class ToolConstants {
     public static final String CFG_RESERVE_NAME = "reserveClass";
     public static final String CFG_FAULT_SERIAL_VERSION_UID = "faultSerialVersionUID";
     public static final String CFG_EXCEPTION_SUPER = "exceptionSuper";
+    public static final String CFG_SEI_SUPER = "seiSuper";
     public static final String CFG_MARK_GENERATED = "mark-generated";
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
----------------------------------------------------------------------
diff --git a/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
b/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
index 387ba9e..ddcf385 100644
--- a/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
+++ b/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
@@ -45,6 +45,7 @@ public class JavaInterface implements JavaAnnotatable {
     private final List<JavaMethod> methods = new ArrayList<JavaMethod>();
     private final List<JAnnotation> annotations = new ArrayList<JAnnotation>();
     private final Set<String> imports = new TreeSet<String>();
+    private final List<String> supers = new ArrayList<String>();
 
     private String webserviceName;
     private Element handlerChains;
@@ -145,6 +146,9 @@ public class JavaInterface implements JavaAnnotatable {
         return this.location;
     }
 
+    public List<String> getSuperInterfaces() {
+        return supers;
+    }
     public List<JavaMethod> getMethods() {
         return methods;
     }
@@ -193,6 +197,16 @@ public class JavaInterface implements JavaAnnotatable {
             methods.add(method);
         }
     }
+    
+    public void addSuperInterface(String s) {
+        if (s.contains(".")) {
+            if (!s.startsWith("java.lang.")) {
+                addImport(s);
+            }
+            s = s.substring(s.lastIndexOf('.') + 1);
+        }
+        supers.add(s);
+    }
 
     public String getPackageName() {
         return this.packageName;

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
index 698c8a8..3378259 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
@@ -50,6 +50,7 @@ public class JAXWSContainer extends WSDLToJavaContainer {
         set.add(ToolConstants.CFG_ASYNCMETHODS);
         set.add(ToolConstants.CFG_BAREMETHODS);
         set.add(ToolConstants.CFG_MIMEMETHODS);
+        set.add(ToolConstants.CFG_SEI_SUPER);
         return set;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
index 2036dab..06675a5 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
@@ -24,6 +24,7 @@ import java.util.Map;
 import javax.jws.HandlerChain;
 import javax.xml.namespace.QName;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.cxf.annotations.DataBinding;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.helpers.CastUtils;
@@ -121,6 +122,19 @@ public class SEIGenerator extends AbstractJAXWSGenerator {
                 }
                 clearAttributes();
                 setAttributes("intf", intf);
+                String seiSc = "";
+                for (String s : intf.getSuperInterfaces()) {
+                    if (!seiSc.isEmpty()) {
+                        seiSc += ", ";
+                    } else {
+                        seiSc = "extends ";
+                    }
+                    seiSc += s;
+                }
+                if (!StringUtils.isEmpty(seiSc)) {
+                    seiSc += " ";
+                }
+                setAttributes("sei-superinterface-string", seiSc);                      
 
                 setCommonAttributes();
     
                 doWrite(SEI_TEMPLATE, parseOutputName(intf.getPackageName(), intf.getName()));
@@ -128,7 +142,7 @@ public class SEIGenerator extends AbstractJAXWSGenerator {
             }
         }
     }
-
+    
     public void register(final ClassCollector collector, String packageName, String fileName)
{
         collector.addSeiClassName(packageName , fileName , packageName + "." + fileName);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
index 3073f03..54a7480 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
@@ -354,6 +354,15 @@ Examples:
                     <annotation>exceptionSuper</annotation>
                 </associatedArgument>
             </option>
+            <option id="seiSuper" maxOccurs="unbounded">
+                <annotation>
+                    Specifies the SuperInterface to use for generated Service Interfaces.
+                </annotation>
+                <switch>seiSuper</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>seiSuper</annotation>
+                </associatedArgument>
+            </option>
             <option id="mark-generated" maxOccurs="1">
                 <annotation>
                     Adds @Generated annotation in all java files that are generated.

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
index 60c9a7d..9958ca1 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
@@ -108,6 +108,13 @@ public class PortTypeProcessor extends AbstractProcessor {
                                       intf.getPackageName() + "." + intf.getName());
         
             interfaceInfo.setProperty("JavaInterface", intf);
+            
+            if (context.containsKey(ToolConstants.CFG_SEI_SUPER)) {
+                String supers[] = context.getArray(ToolConstants.CFG_SEI_SUPER);
+                for (String s : supers) {
+                    intf.addSuperInterface(s);
+                }
+            }
         }
         return intf;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/e4b2e746/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
index 5b3c6df..39479e2 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
@@ -44,7 +44,7 @@ $annotation
 #if ($mark-generated == "true")
 @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "$currentdate", comments
= "$fullversion")
 #end
-public interface $intf.Name {
+public interface $intf.Name ${sei-superinterface-string}{
 #foreach ($method in $intf.Methods)
 
 #if ($method.JavaDoc != "")


Mime
View raw message