cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r528533 - in /incubator/cxf/trunk: codegen-plugin/pom.xml rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java testutils/pom.xml
Date Fri, 13 Apr 2007 15:49:29 GMT
Author: dkulp
Date: Fri Apr 13 08:49:28 2007
New Revision: 528533

URL: http://svn.apache.org/viewvc?view=rev&rev=528533
Log:
Add java.net to codegen pom
Cleanup deps for testutils
Have jaxws search superclasses for WebService annotations (so you can subclass a generated IMPL that has the details like wsdlLocation)

Modified:
    incubator/cxf/trunk/codegen-plugin/pom.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
    incubator/cxf/trunk/testutils/pom.xml

Modified: incubator/cxf/trunk/codegen-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/codegen-plugin/pom.xml?view=diff&rev=528533&r1=528532&r2=528533
==============================================================================
--- incubator/cxf/trunk/codegen-plugin/pom.xml (original)
+++ incubator/cxf/trunk/codegen-plugin/pom.xml Fri Apr 13 08:49:28 2007
@@ -68,6 +68,11 @@
             <artifactId>cxf-tools-wsdlto-core</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-common-utilities</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
@@ -91,6 +96,14 @@
         </dependency>
     </dependencies>
 
+    <!-- will remove this after it is got sync to central repository -->
+    <repositories>
+        <repository>
+            <id>java.net</id>
+            <url>https://maven-repository.dev.java.net/repository/</url>
+            <layout>legacy</layout>
+        </repository>
+    </repositories>
 
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/codegen-plugin</connection>

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java?view=diff&rev=528533&r1=528532&r2=528533
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java Fri Apr 13 08:49:28 2007
@@ -21,6 +21,8 @@
 
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.ResourceBundle;
 import java.util.logging.Logger;
 
@@ -47,8 +49,7 @@
 
     private Class<?> implementorClass;
     private Class<?> seiClass;
-    private WebService implementorAnnotation;
-    private WebService seiAnnotation;
+    private List<WebService> wsAnnotations = new ArrayList<WebService>(2);
     private WebServiceProvider wsProviderAnnotation;
 
     public JaxWsImplementorInfo(Class<?> ic) {
@@ -73,17 +74,14 @@
     }
 
     public String getWsdlLocation() {
-        if (null != seiAnnotation 
-            && seiAnnotation.wsdlLocation() != null
-            && !"".equals(seiAnnotation.wsdlLocation())) {
-            return seiAnnotation.wsdlLocation();
-        } else if (null != implementorAnnotation 
-            && implementorAnnotation.wsdlLocation() != null
-            && !"".equals(implementorAnnotation.wsdlLocation())) {
-            return implementorAnnotation.wsdlLocation();
-        } else if (null != wsProviderAnnotation 
-            && wsProviderAnnotation.wsdlLocation() != null
-            && !"".equals(wsProviderAnnotation.wsdlLocation())) {
+        for (WebService service : wsAnnotations) {
+            if (!StringUtils.isEmpty(service.wsdlLocation())) {
+                return service.wsdlLocation();
+            }
+        }
+        
+        if (null != wsProviderAnnotation 
+            && !StringUtils.isEmpty(wsProviderAnnotation.wsdlLocation())) {
             return wsProviderAnnotation.wsdlLocation();
         }
         return null;
@@ -97,14 +95,20 @@
     public QName getServiceName() {
         String serviceName = null;
         String namespace = null;
-        if (implementorAnnotation != null) {
-            serviceName = implementorAnnotation.serviceName();
-            namespace = implementorAnnotation.targetNamespace();
-        } else if (wsProviderAnnotation != null) {
+
+        for (WebService service : wsAnnotations) {
+            if (!StringUtils.isEmpty(service.serviceName())) {
+                serviceName = service.serviceName();
+            }
+            if (!StringUtils.isEmpty(service.targetNamespace())) {
+                namespace = service.targetNamespace();
+            }
+        }
+        
+        if ((serviceName == null || namespace == null) 
+            && wsProviderAnnotation != null) {
             serviceName = wsProviderAnnotation.serviceName();
             namespace = wsProviderAnnotation.targetNamespace();
-        } else {
-            return null;
         }
 
         if (StringUtils.isEmpty(serviceName)) {
@@ -126,14 +130,18 @@
     public QName getEndpointName() {
         String portName = null;
         String namespace = null;
-        if (implementorAnnotation != null) {
-            portName = implementorAnnotation.portName();
-            namespace = implementorAnnotation.targetNamespace();
-        } else if (wsProviderAnnotation != null) {
+        for (WebService service : wsAnnotations) {
+            if (!StringUtils.isEmpty(service.portName())) {
+                portName = service.portName();
+            }
+            if (!StringUtils.isEmpty(service.targetNamespace())) {
+                namespace = service.targetNamespace();
+            }
+        }
+        if ((portName == null || namespace == null) 
+            && wsProviderAnnotation != null) {
             portName = wsProviderAnnotation.portName();
             namespace = wsProviderAnnotation.targetNamespace();
-        } else {
-            return null;
         }
 
         if (StringUtils.isEmpty(portName)) {
@@ -150,31 +158,38 @@
     public QName getInterfaceName() {
         String name = null;
         String namespace = null;
-
-        if (seiAnnotation != null) {
-            if (StringUtils.isEmpty(seiAnnotation.name())) {
-                name = seiClass.getSimpleName();
-            } else {
-                name = seiAnnotation.name();
+        
+        if (seiClass != null) {
+            WebService service = seiClass.getAnnotation(WebService.class);
+            if (!StringUtils.isEmpty(service.name())) {
+                name = service.name();
             }
-            if (StringUtils.isEmpty(seiAnnotation.targetNamespace())) {
-                namespace = getDefaultNamespace(seiClass);
-            } else {
-                namespace = seiAnnotation.targetNamespace();
+            if (!StringUtils.isEmpty(service.targetNamespace())) {
+                namespace = service.targetNamespace();
             }
-        } else if (implementorAnnotation != null) {
-            if (StringUtils.isEmpty(implementorAnnotation.name())) {
+        } else {
+            for (WebService service : wsAnnotations) {
+                if (!StringUtils.isEmpty(service.name())) {
+                    name = service.name();
+                }
+                if (!StringUtils.isEmpty(service.targetNamespace())) {
+                    namespace = service.targetNamespace();
+                }
+            }
+        }
+        if (name == null) {
+            if (seiClass != null) {
+                name = seiClass.getSimpleName();
+            } else if (implementorClass != null) {
                 name = implementorClass.getSimpleName();
-            } else {
-                name = implementorAnnotation.name();
             }
-            if (StringUtils.isEmpty(implementorAnnotation.targetNamespace())) {
+        }
+        if (namespace == null) {
+            if (seiClass != null) {
+                namespace = getDefaultNamespace(seiClass);
+            } else if (implementorClass != null) {
                 namespace = getDefaultNamespace(implementorClass);
-            } else {
-                namespace = implementorAnnotation.targetNamespace();
             }
-        } else {
-            return null;
         }
         
         return new QName(namespace, name);
@@ -199,33 +214,46 @@
         return null;
     }
 
+    private String getImplementorClassName() {
+        for (WebService service : wsAnnotations) {
+            if (!StringUtils.isEmpty(service.endpointInterface())) {
+                return service.endpointInterface();
+            }
+        }
+        return null;
+    }
     private void initialise() {
-        implementorAnnotation = implementorClass.getAnnotation(WebService.class);
-        if (null != implementorAnnotation) {
-            String sei = implementorAnnotation.endpointInterface();
-            if (StringUtils.isEmpty(sei)) {
-                sei = getWSInterfaceName(implementorClass);                
-            }
-            if (!StringUtils.isEmpty(sei)) {
-                try {
-                    seiClass = ClassLoaderUtils.loadClass(sei, implementorClass);
-                } catch (ClassNotFoundException ex) {
-                    throw new WebServiceException(BUNDLE.getString("SEI_LOAD_FAILURE_MSG"), ex);
-                }
-                seiAnnotation = seiClass.getAnnotation(WebService.class);
-                if (null == seiAnnotation) {
-                    throw new WebServiceException(BUNDLE.getString("SEI_WITHOUT_WEBSERVICE_ANNOTATION_EXC"));
-                }
-                if (!StringUtils.isEmpty(seiAnnotation.portName())
-                    || !StringUtils.isEmpty(seiAnnotation.serviceName())
-                    || !StringUtils.isEmpty(seiAnnotation.endpointInterface())) {
-                    String expString = BUNDLE.getString("ILLEGAL_ATTRIBUTE_IN_SEI_ANNOTATION_EXC");
-                    throw new WebServiceException(expString);
-                }
+        Class<?> cls = implementorClass;
+        while (cls != null) {
+            WebService annotation = implementorClass.getAnnotation(WebService.class);
+            if (annotation != null) {
+                wsAnnotations.add(annotation); 
+            }
+            cls = cls.getSuperclass();
+        }
+        String sei = getImplementorClassName();
+        if (StringUtils.isEmpty(sei)) {
+            sei = getWSInterfaceName(implementorClass);                
+        }
+        if (!StringUtils.isEmpty(sei)) {
+            try {
+                seiClass = ClassLoaderUtils.loadClass(sei, implementorClass);
+            } catch (ClassNotFoundException ex) {
+                throw new WebServiceException(BUNDLE.getString("SEI_LOAD_FAILURE_MSG"), ex);
+            }
+            WebService seiAnnotation = seiClass.getAnnotation(WebService.class);
+            if (null == seiAnnotation) {
+                throw new WebServiceException(BUNDLE.getString("SEI_WITHOUT_WEBSERVICE_ANNOTATION_EXC"));
+            }
+            if (!StringUtils.isEmpty(seiAnnotation.portName())
+                || !StringUtils.isEmpty(seiAnnotation.serviceName())
+                || !StringUtils.isEmpty(seiAnnotation.endpointInterface())) {
+                String expString = BUNDLE.getString("ILLEGAL_ATTRIBUTE_IN_SEI_ANNOTATION_EXC");
+                throw new WebServiceException(expString);
             }
-        } else {
-            wsProviderAnnotation = implementorClass.getAnnotation(WebServiceProvider.class);
+            wsAnnotations.add(seiAnnotation);
         }
+        wsProviderAnnotation = implementorClass.getAnnotation(WebServiceProvider.class);
     }
 
     public boolean isWebServiceProvider() {

Modified: incubator/cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=528533&r1=528532&r2=528533
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Fri Apr 13 08:49:28 2007
@@ -26,350 +26,358 @@
     <url>http://cwiki.apache.org/CXF</url>
 
     <parent>
-    <groupId>org.apache.cxf</groupId>
-    <artifactId>cxf-parent</artifactId>
-    <version>2.0-incubator-RC-SNAPSHOT</version>
-    <relativePath>../parent/pom.xml</relativePath>
+        <groupId>org.apache.cxf</groupId>
+        <artifactId>cxf-parent</artifactId>
+        <version>2.0-incubator-RC-SNAPSHOT</version>
+        <relativePath>../parent/pom.xml</relativePath>
     </parent>
 
     <dependencies>
-    <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
-    </dependency>
-    <dependency>
-        <groupId>javax.xml.ws</groupId>
-        <artifactId>jaxws-api</artifactId>
-    </dependency>
-    <dependency>
-        <groupId>javax.xml.soap</groupId>
-        <artifactId>saaj-api</artifactId>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-annotation_1.0_spec</artifactId>
-    </dependency>
-    <dependency>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-api</artifactId>
-        <version>${project.version}</version>
-    </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.ws</groupId>
+            <artifactId>jaxws-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.soap</groupId>
+            <artifactId>saaj-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-activation_1.1_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>
-    <plugins>
-        <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <dependencies>
-            <dependency>
-            <groupId>ant</groupId>
-            <artifactId>ant-trax</artifactId>
-            <version>1.6.5</version>
-            </dependency>
-        </dependencies>
-
-        <executions>
-            <execution>
-            <!--
-                Run in validate phase to ensure wsdls exist
-                before running wsdl2java in generate-sources
-                phase.
-            -->
-            <id>validate</id>
-            <phase>validate</phase>
-            <configuration>
-                <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
-                <tasks>
-                <property name="generated.target" value="${basedir}/target/generated" />
-                <property name="generated.src.test" value="${generated.target}/src/main/java" />
-                <property name="generated.resources.test" value="${generated.target}/src/main/resources" />
-                <property name="generated.wsdl.test" value="${generated.resources.test}/" />
-                <property name="test.resources.dir" location="${basedir}/src/main/resources" />
-
-                <mkdir dir="${generated.resources.test}/wsdl/type_test" />
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_1.xsd">
-                    <param name="groupID" expression="1" />
-                </xslt>
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_2.xsd">
-                    <param name="groupID" expression="2" />
-                </xslt>
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_3.xsd">
-                    <param name="groupID" expression="3" />
-                </xslt>
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_doclit.wsdl">
-                    <param name="inc_xsd_path" expression="." />
-                    <param name="use_style" expression="document" />
-                    <param name="tns_suffix" expression="doc" />
-                </xslt>
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_rpclit.wsdl">
-                    <param name="inc_xsd_path" expression="." />
-                    <param name="use_style" expression="rpc" />
-                    <param name="tns_suffix" expression="rpc" />
-                </xslt>
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_xml_inc.wsdl">
-                    <param name="inc_xsd_path" expression="." />
-                    <param name="use_style" expression="document" />
-                    <param name="tns_suffix" expression="xml" />
-                </xslt>
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_xml_wsdl.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_xml.wsdl">
-                    <param name="inc_wsdl_path" expression="." />
-                    <param name="port" expression="9008" />
-                </xslt>
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_soap_wsdl.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_doclit_soap.wsdl">
-                    <param name="inc_wsdl_path" expression="." />
-                    <param name="use_style" expression="document" />
-                    <param name="port" expression="9007" />
-                </xslt>
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_soap_wsdl.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.resources.test}/wsdl/type_test/type_test_rpclit_soap.wsdl">
-                    <param name="inc_wsdl_path" expression="." />
-                    <param name="use_style" expression="rpc" />
-                    <param name="port" expression="9006" />
-                </xslt>
-
-                <mkdir dir="${generated.src.test}/org/apache/cxf/systest/type_test" />
-
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_impl_java.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.src.test}/org/apache/cxf/systest/type_test/TypeTestImpl.java" />
-                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_tester_java.xsl"
-                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
-                      out="${generated.src.test}/org/apache/cxf/systest/type_test/TypeTestTester.java" />
-
-                </tasks>
-            </configuration>
-            <goals>
-                <goal>run</goal>
-            </goals>
-            </execution>
-        </executions>
-        </plugin>
-        <plugin>
-        <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf-codegen-plugin</artifactId>
-        <version>${project.version}</version>
-        <executions>
-            <execution>
-            <id>generate-sources</id>
-            <phase>generate-sources</phase>
-            <configuration>
-                <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
-                <wsdlOptions>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world.wsdl</wsdl>
-                    <extraargs>
-                    <extraarg>-b</extraarg>
-                    <extraarg>
-                        ${basedir}/src/main/resources/wsdl/async_binding.xml
-                    </extraarg>
-                    </extraargs>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_soap12.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_secure.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/greeter_control.wsdl</wsdl>
-                    <extraargs>
-                    <extraarg>-b</extraarg>
-                    <extraarg>
-                        ${basedir}/src/main/resources/wsdl/greeter_control.xjb
-                    </extraarg>
-                    </extraargs>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/mtom_xop.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/swa-mime.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_mixed.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_bare.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>
-                    ${basedir}/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl
-                    </wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_rpc_lit.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_mixedstyle.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_doc_lit.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/doc_lit_bare.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/jms_test.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/handler_test.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/soap_header.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader2.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader_rpc.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/locator.wsdl</wsdl>
-                    <!--extraargs>
-                    <extraarg>-p</extraarg>
-                    <extraarg>org.apache.cxf.testutils.locator</extraarg>
-                    </extraargs-->
-                </wsdlOption>
-
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/schema_validation.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>
-                    ${basedir}/src/main/resources/wsdl/anonymous_complex_type.wsdl
-                    </wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/basic_callback_test.wsdl</wsdl>
-                </wsdlOption>
-
-                <wsdlOption>
-                    <wsdl>
-                    ${basedir}/src/main/resources/wsdl/hello_world_underscore.wsdl
-                    </wsdl>
-                </wsdlOption>
-
-                <wsdlOption>
-                    <wsdl>
-                    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml.wsdl
-                    </wsdl>
-                    <dependencies>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml_inc.wsdl
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
-                    </dependency>
-                    </dependencies>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>
-                    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit_soap.wsdl
-                    </wsdl>
-                    <dependencies>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit.wsdl
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
-                    </dependency>
-                    </dependencies>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>
-                    ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit_soap.wsdl
-                    </wsdl>
-                    <dependencies>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit.wsdl
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
-                    </dependency>
-                    <dependency>
-                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
-                    </dependency>
-                    </dependencies>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/addNumbers.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/calculator.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/jaxb_element_test.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/ordered_param_holder.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_services.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/header_doc_lit.wsdl</wsdl>
-                </wsdlOption>
-                <wsdlOption>
-                    <wsdl>${basedir}/src/main/resources/wsdl/header_rpc_lit.wsdl</wsdl>
-                </wsdlOption>
-
-                </wsdlOptions>
-            </configuration>
-            <goals>
-                <goal>wsdl2java</goal>
-            </goals>
-            </execution>
-        </executions>
-        </plugin>
-    </plugins>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <dependencies>
+                    <dependency>
+                        <groupId>ant</groupId>
+                        <artifactId>ant-trax</artifactId>
+                        <version>1.6.5</version>
+                    </dependency>
+                </dependencies>
+
+                <executions>
+                    <execution>
+                        <!--
+                            Run in validate phase to ensure wsdls exist
+                            before running wsdl2java in generate-sources
+                            phase.
+                        -->
+                        <id>validate</id>
+                        <phase>validate</phase>
+                        <configuration>
+                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+                            <tasks>
+                                <property name="generated.target" value="${basedir}/target/generated" />
+                                <property name="generated.src.test" value="${generated.target}/src/main/java" />
+                                <property name="generated.resources.test" value="${generated.target}/src/main/resources" />
+                                <property name="generated.wsdl.test" value="${generated.resources.test}/" />
+                                <property name="test.resources.dir" location="${basedir}/src/main/resources" />
+
+                                <mkdir dir="${generated.resources.test}/wsdl/type_test" />
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_1.xsd">
+                                    <param name="groupID" expression="1" />
+                                </xslt>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_2.xsd">
+                                    <param name="groupID" expression="2" />
+                                </xslt>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_ID_xsd.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_3.xsd">
+                                    <param name="groupID" expression="3" />
+                                </xslt>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_doclit.wsdl">
+                                    <param name="inc_xsd_path" expression="." />
+                                    <param name="use_style" expression="document" />
+                                    <param name="tns_suffix" expression="doc" />
+                                </xslt>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_rpclit.wsdl">
+                                    <param name="inc_xsd_path" expression="." />
+                                    <param name="use_style" expression="rpc" />
+                                    <param name="tns_suffix" expression="rpc" />
+                                </xslt>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_wsdl.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_xml_inc.wsdl">
+                                    <param name="inc_xsd_path" expression="." />
+                                    <param name="use_style" expression="document" />
+                                    <param name="tns_suffix" expression="xml" />
+                                </xslt>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_xml_wsdl.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_xml.wsdl">
+                                    <param name="inc_wsdl_path" expression="." />
+                                    <param name="port" expression="9008" />
+                                </xslt>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_soap_wsdl.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_doclit_soap.wsdl">
+                                    <param name="inc_wsdl_path" expression="." />
+                                    <param name="use_style" expression="document" />
+                                    <param name="port" expression="9007" />
+                                </xslt>
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_soap_wsdl.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.resources.test}/wsdl/type_test/type_test_rpclit_soap.wsdl">
+                                    <param name="inc_wsdl_path" expression="." />
+                                    <param name="use_style" expression="rpc" />
+                                    <param name="port" expression="9006" />
+                                </xslt>
+
+                                <mkdir dir="${generated.src.test}/org/apache/cxf/systest/type_test" />
+
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_impl_java.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.src.test}/org/apache/cxf/systest/type_test/TypeTestImpl.java" />
+                                <xslt style="${test.resources.dir}/wsdl/type_test/type_test_tester_java.xsl"
+                                      in="${test.resources.dir}/wsdl/type_test/type_test.xsd"
+                                      out="${generated.src.test}/org/apache/cxf/systest/type_test/TypeTestTester.java" />
+
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world.wsdl</wsdl>
+                                    <extraargs>
+                                        <extraarg>-b</extraarg>
+                                        <extraarg>
+                                            ${basedir}/src/main/resources/wsdl/async_binding.xml
+                                        </extraarg>
+                                    </extraargs>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_soap12.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_secure.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/greeter_control.wsdl</wsdl>
+                                    <extraargs>
+                                        <extraarg>-b</extraarg>
+                                        <extraarg>
+                                            ${basedir}/src/main/resources/wsdl/greeter_control.xjb
+                                        </extraarg>
+                                    </extraargs>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/mtom_xop.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/swa-mime.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_mixed.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_xml_bare.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>
+                                        ${basedir}/src/main/resources/wsdl/hello_world_xml_wrapped.wsdl
+                                    </wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_rpc_lit.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_mixedstyle.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_doc_lit.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/doc_lit_bare.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/jms_test.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/handler_test.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/soap_header.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader2.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/soapheader_rpc.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/locator.wsdl</wsdl>
+                                    <!--extraargs>
+                                    <extraarg>-p</extraarg>
+                                    <extraarg>org.apache.cxf.testutils.locator</extraarg>
+                                    </extraargs-->
+                                </wsdlOption>
+
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/schema_validation.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>
+                                        ${basedir}/src/main/resources/wsdl/anonymous_complex_type.wsdl
+                                    </wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/basic_callback_test.wsdl</wsdl>
+                                </wsdlOption>
+
+                                <wsdlOption>
+                                    <wsdl>
+                                        ${basedir}/src/main/resources/wsdl/hello_world_underscore.wsdl
+                                    </wsdl>
+                                </wsdlOption>
+
+                                <wsdlOption>
+                                    <wsdl>
+                                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml.wsdl
+                                    </wsdl>
+                                    <dependencies>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_xml_inc.wsdl
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
+                                        </dependency>
+                                    </dependencies>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>
+                                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit_soap.wsdl
+                                    </wsdl>
+                                    <dependencies>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_doclit.wsdl
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
+                                        </dependency>
+                                    </dependencies>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>
+                                        ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit_soap.wsdl
+                                    </wsdl>
+                                    <dependencies>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_rpclit.wsdl
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_1.xsd
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_2.xsd
+                                        </dependency>
+                                        <dependency>
+                                            ${basedir}/target/generated/src/main/resources/wsdl/type_test/type_test_3.xsd
+                                        </dependency>
+                                    </dependencies>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/addNumbers.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/calculator.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/jaxb_element_test.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/ordered_param_holder.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world_services.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/header_doc_lit.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/header_rpc_lit.wsdl</wsdl>
+                                </wsdlOption>
+
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
     </build>
 
 
     <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/testutils</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/testutils</developerConnection>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/testutils</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/testutils</developerConnection>
     </scm>
 
 </project>



Mime
View raw message