You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2005/01/06 21:44:42 UTC

svn commit: r124443 - in incubator/apollo/trunk/src: java/org/apache/ws/resource/impl java/org/apache/ws/resource/tool java/org/apache/ws/resource/tool/velocity templates

Author: scamp
Date: Thu Jan  6 12:44:38 2005
New Revision: 124443

URL: http://svn.apache.org/viewcvs?view=rev&rev=124443
Log:
updated for templating
Modified:
   incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java
   incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
   incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/velocity/ServiceProperties.java
   incubator/apollo/trunk/src/templates/build.xml.vm

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java?view=diff&rev=124443&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java&r1=124442&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java&r2=124443
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java	(original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java	Thu Jan  6 12:44:38 2005
@@ -79,7 +79,7 @@
 
     public String getEndpointURL()
     {
-        return null;  //To change body of implemented methods use File | Settings | File Templates.
+        return m_endpointURL;
     }
 
     private String extractName( String endpointURL )

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java?view=diff&rev=124443&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java&r1=124442&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java&r2=124443
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java	(original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java	Thu Jan  6 12:44:38 2005
@@ -327,6 +327,10 @@
       String serviceName = resourceDef.getName();
       String upperCaseServiceName = getUpperCaseServiceName(serviceName);
       props.setServiceName( upperCaseServiceName );
+       props.setJarDir(m_jarOutputDir.getAbsolutePath());
+       props.setSrcDir(m_srcOutputDir.getAbsolutePath());
+       props.setClassesDir(new File(m_srcOutputDir.getParentFile().getParentFile(),"classes").getAbsolutePath());
+      props.setEndpointURL( resourceDef.getEndpointURL());
       props.setEndpointServiceName(serviceName);
       props.setServiceImplements( ImplementsListBuilder.getServiceImplementsList( resourceDef, m_portTypeInfoMap ) );
       props.setNamespace( targetNamespace );
@@ -549,6 +553,12 @@
 
          outputFile = new File( packageDir, serviceName + "CustomOperationsPortType.java" );
          processTemplate( context, "templates/CustomOperationsPortType.vm", outputFile );
+
+         outputFile = new File( m_srcOutputDir.getParentFile().getParentFile(), "build.xml" );
+         processTemplate( context, "templates/build.xml.vm", outputFile );
+
+         outputFile = new File( m_srcOutputDir.getParentFile().getParentFile(), "build.properties" );
+         processTemplate( context, "templates/build.properties.vm", outputFile );
       }
       catch ( Exception e )
       {

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/velocity/ServiceProperties.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/velocity/ServiceProperties.java?view=diff&rev=124443&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/velocity/ServiceProperties.java&r1=124442&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/velocity/ServiceProperties.java&r2=124443
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/velocity/ServiceProperties.java	(original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/velocity/ServiceProperties.java	Thu Jan  6 12:44:38 2005
@@ -26,6 +26,40 @@
     List m_serviceIncludes = new ArrayList();
     private boolean m_hasProperties;
     private String m_endpointServiceName;
+    private String m_endpointURL;
+    private String m_jarDir;
+    private String m_classesDir;
+    private String m_srcDir;
+
+    public String getSrcDir()
+    {
+        return m_srcDir;
+    }
+
+    public void setSrcDir(String srcDir)
+    {
+        m_srcDir = srcDir;
+    }
+
+    public String getClassesDir()
+    {
+        return m_classesDir;
+    }
+
+    public void setClassesDir(String classesDir)
+    {
+        m_classesDir = classesDir;
+    }
+
+    public String getJarDir()
+    {
+        return m_jarDir;
+    }
+
+    public void setJarDir(String jarDir)
+    {
+        m_jarDir = jarDir;
+    }
 
     public List getResourceIncludeFiles()
     {
@@ -175,5 +209,15 @@
     public String getEndpointServiceName()
     {
         return m_endpointServiceName;
+    }
+
+    public void setEndpointURL(String enpointURL)
+    {
+       m_endpointURL = enpointURL;
+    }
+
+    public String getEndpointURL()
+    {
+        return m_endpointURL;
     }
 }

Modified: incubator/apollo/trunk/src/templates/build.xml.vm
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/templates/build.xml.vm?view=diff&rev=124443&p1=incubator/apollo/trunk/src/templates/build.xml.vm&r1=124442&p2=incubator/apollo/trunk/src/templates/build.xml.vm&r2=124443
==============================================================================
--- incubator/apollo/trunk/src/templates/build.xml.vm	(original)
+++ incubator/apollo/trunk/src/templates/build.xml.vm	Thu Jan  6 12:44:38 2005
@@ -1,7 +1,8 @@
 #set( $wsdlName = $generated.wsdlName )
 #set( $endpointServiceName = $generated.EndpointServiceName )
-
-
+#set( $jarDir = $generated.JarDir )
+#set( $classesDir = $generated.ClassesDir )
+#set( $srcDir = $generated.SrcDir )
 <?xml version="1.0"?>
 
 <project name="filesystem_example" default="usage" basedir=".">
@@ -13,9 +14,9 @@
    <!-- workaround for those IDEs that dont set ant.home as per the ant script -->
    <property name="ant.home" value="env.ANT_HOME"/>
    
-   <property name="classes.dir"           location="classes"/>
-   <property name="jar.dir"           	  location="jar"/>
-   <property name="src.dir"               location="src/java" />
+   <property name="classes.dir"           location="${classesDir}"/>
+   <property name="jar.dir"           	  location="${jarDir}"/>
+   <property name="src.dir"               location="${srcDir}" />
    <property name="wsdl.file"             location="$wsdlName" />
 
    <target name="init">

---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org