[wsas-java-dev] svn commit r4588 - in trunk/wsas/java/modules: core/src/org/wso2/wsas/transport/fileupload www/extensions/core www/extensions/core/js www/extensions/core/xslt

svn at wso2.org svn at wso2.org
Sun Jul 1 09:45:42 PDT 2007


Author: saminda
Date: Sun Jul  1 09:45:23 2007
New Revision: 4588

Added:
   trunk/wsas/java/modules/www/extensions/core/xslt/add_new_axis1_service.xsl
Modified:
   trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/fileupload/ServiceFileUploadExecutor.java
   trunk/wsas/java/modules/www/extensions/core/divs.html
   trunk/wsas/java/modules/www/extensions/core/js/services.js
   trunk/wsas/java/modules/www/extensions/core/xslt/list_services.xsl
Log:
Basic integration of Axis1 to WSAS is done 


Modified: trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/fileupload/ServiceFileUploadExecutor.java
==============================================================================
--- trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/fileupload/ServiceFileUploadExecutor.java	(original)
+++ trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/fileupload/ServiceFileUploadExecutor.java	Sun Jul  1 09:45:23 2007
@@ -38,10 +38,7 @@
 public class ServiceFileUploadExecutor extends AbstractFileUploadExecutor {
 
     private static final String[] ALLOWED_SERVICE_EXTENSIONS =
-            new String[]{".aar",
-                         ".jar",
-                         ".zip",
-                         ".dbs"};
+            new String[]{".aar",".jar",".zip",".dbs",".wsdd"};
 
     public ServiceFileUploadExecutor(ConfigurationContext configurationContext) {
         super(configurationContext);
@@ -77,12 +74,13 @@
                         //TODO This code is not open extensions and close for modification
                         //TODO review it and write another executor for .dbs
                         if (fileExtension.endsWith(".aar")
-                            || fileExtension.endsWith(".dbs")) {
+                            || fileExtension.endsWith(".dbs")
+                            || fileExtension.endsWith(".wsdd")) {
                             String repo =
                                     configurationContext.getAxisConfiguration().
                                             getRepository().getPath();
                             String finalFolderName;
-                            if (fileExtension.endsWith(".aar")) {
+                            if (fileExtension.endsWith(".aar") || fileExtension.endsWith(".wsdd")) {
                                 finalFolderName = "services";
                             } else {
                                 finalFolderName = "dataservices";

Modified: trunk/wsas/java/modules/www/extensions/core/divs.html
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/divs.html	(original)
+++ trunk/wsas/java/modules/www/extensions/core/divs.html	Sun Jul  1 09:45:23 2007
@@ -123,3 +123,4 @@
 <div id="divEJBProvider" style="display:none;"></div>
 <div id="divNewPOJOService" style="display:none;"></div>
 <div id="divNewSpringService" style="display:none;"></div>
+<div id="divNewAxis1Service" style="display:none;"></div>

Modified: trunk/wsas/java/modules/www/extensions/core/js/services.js
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/js/services.js	(original)
+++ trunk/wsas/java/modules/www/extensions/core/js/services.js	Sun Jul  1 09:45:23 2007
@@ -1748,3 +1748,23 @@
 			
 	}
 }
+
+/**
+ * This method will be used, when wsdd need to upload to create an Axis1 service ontop of Axis2
+ * environment.
+ */
+function showAxis1WSDDUploadScreen() {
+    var tmpTransformationNode;
+    if (window.XMLHttpRequest && !wso2.wsf.Util.isIE()) {
+        tmpTransformationNode =
+        document.implementation.createDocument("", "wsddUploadTemplate", null);
+    } else if (window.ActiveXObject) {
+        tmpTransformationNode = new ActiveXObject("Microsoft.XmlDom");
+        var sXml = "<wsddUploadTemplate></wsddUploadTemplate>";
+        tmpTransformationNode.loadXML(sXml);
+    }
+    var objDiv = document.getElementById("divNewAxis1Service");
+    wso2.wsf.Util.processXML(tmpTransformationNode, "add_new_axis1_service.xsl", objDiv);
+    wso2.wsf.Util.showOnlyOneMain(objDiv);
+
+}

Added: trunk/wsas/java/modules/www/extensions/core/xslt/add_new_axis1_service.xsl
==============================================================================
--- (empty file)
+++ trunk/wsas/java/modules/www/extensions/core/xslt/add_new_axis1_service.xsl	Sun Jul  1 09:45:23 2007
@@ -0,0 +1,43 @@
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <xsl:template match="wsddUploadTemplate" xmlns="http://www.w3.org/1999/xhtml">
+        <h4>
+            <a>
+                <xsl:attribute name="href">#</xsl:attribute>
+                <xsl:attribute name="onClick">javascript:showServiceInitializer(); return false;</xsl:attribute>
+                Services
+            </a>
+            &#160;&gt;&#160;New Axis1 Service
+        </h4>
+        <div id="formset">
+            <form method="post" name="wsddUpload" action="fileupload/service"
+                  enctype="multipart/form-data" target="globalIFrame">
+                <br/>
+                <fieldset>
+                    <legend>Upload a WSDD File</legend>
+                    <div>
+                        <label>(.wsdd)</label>
+                        <input type="file" id="filename" name="filename" size="50"/>
+                    </div>
+                    <div class="buttonrow">
+                        <input name="upload" type="submit" value=" Upload ">
+                            <xsl:attribute name="onclick">
+                                javascript: if (document.wsddUpload.filename.value == '') {
+                                    wso2.wsf.Util.alertWarning('Please select a wsdd file.'); 
+                                    return false;
+                                } else {
+                                    stoppingRefreshingMethodsHook();
+                                    return true;
+                                }
+                            </xsl:attribute>
+                        </input>
+                    </div>
+                </fieldset>
+
+            </form>
+        </div>
+    </xsl:template>
+
+
+</xsl:stylesheet>

Modified: trunk/wsas/java/modules/www/extensions/core/xslt/list_services.xsl
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/xslt/list_services.xsl	(original)
+++ trunk/wsas/java/modules/www/extensions/core/xslt/list_services.xsl	Sun Jul  1 09:45:23 2007
@@ -43,65 +43,77 @@
 
     <xsl:template name="addNewServicesTemplate">
     	<div id="formset">
-		<form>
-	                <fieldset>
-	                    <legend>Add New Service</legend>
-				<div>
-			                <table style="border:none;">
-			                    <tbody>
-		                            <tr>
-		                                <td>
-							<a alt="Upload Service Artifact (.aar,.jar,.zip,.dbs)" >
-				   				<xsl:attribute name="title">Upload Service Artifact (.aar,.jar,.zip,.dbs)</xsl:attribute>
-								<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
-				   				<xsl:attribute name="href">#</xsl:attribute>
-				   				<xsl:attribute name="id">add_link</xsl:attribute>
-				   				<xsl:attribute name="onclick">javascript:showPOJOArchieveUploadScreen();return false;</xsl:attribute>
-				   				<xsl:text>&#160;&#160;&#160;&#160;&#160;POJO Service</xsl:text>
-				   			</a>
-						</td>
-					    </tr>
-		                            <tr>
-		                                <td>
-							<a alt="Upload Spring Service" >
-				   				<xsl:attribute name="title">Upload Spring Service</xsl:attribute>
-								<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
-   								<xsl:attribute name="href">#</xsl:attribute>
-				   				<xsl:attribute name="id">add_link</xsl:attribute>
-   								<xsl:attribute name="onclick">javascript:showSpringArchieveUploadScreen();return false;</xsl:attribute>
-   								<xsl:text>&#160;&#160;&#160;&#160;&#160;Spring Service (Spring Context | Spring Bean)</xsl:text>
-				   			</a>
-						</td>
-					    </tr>
-                        		    <tr>
-		                                <td>
-							<a alt="Define Data Service" >
-   								<xsl:attribute name="title">Define Data Service</xsl:attribute>
-								<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
-   								<xsl:attribute name="href">#</xsl:attribute>
-				   				<xsl:attribute name="id">add_link</xsl:attribute>
-   								<xsl:attribute name="onclick">javascript:addNewDataService();return false;</xsl:attribute>
-   								<xsl:text>&#160;&#160;&#160;&#160;&#160;Data Service</xsl:text>
-				   			</a>
-                                		</td>
-					    </tr>
-                		            <tr>
-		                                <td>
-							<a alt="Define EJB Service" >
-				   				<xsl:attribute name="title">Define EJB Service</xsl:attribute>
-								<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
-				   				<xsl:attribute name="href">#</xsl:attribute>
-				   				<xsl:attribute name="id">add_link</xsl:attribute>
-				   				<xsl:attribute name="onclick">javascript:ejbProviderConfig();return false;</xsl:attribute>
-				   				<xsl:text>&#160;&#160;&#160;&#160;&#160;Service based on EJB</xsl:text>
-				   			</a>
-						</td>
-					    </tr>
-					    </tbody>
-					</table>
-				</div>
-	                </fieldset>
-		</form>
-	</div>
+            <form>
+                <fieldset>
+                    <legend>Add New Service</legend>
+                    <div>
+                        <table style="border:none;">
+                            <tbody>
+                                <tr>
+                                    <td>
+                                        <a alt="Upload Service Artifact (.aar,.jar,.zip,.dbs)" >
+                                            <xsl:attribute name="title">Upload Service Artifact (.aar,.jar,.zip,.dbs)</xsl:attribute>
+                                            <xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+                                            <xsl:attribute name="href">#</xsl:attribute>
+                                            <xsl:attribute name="id">add_link</xsl:attribute>
+                                            <xsl:attribute name="onclick">javascript:showPOJOArchieveUploadScreen();return false;</xsl:attribute>
+                                            <xsl:text>&#160;&#160;&#160;&#160;&#160;POJO Service</xsl:text>
+                                        </a>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <a alt="Upload Spring Service" >
+                                            <xsl:attribute name="title">Upload Spring Service</xsl:attribute>
+                                            <xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+                                            <xsl:attribute name="href">#</xsl:attribute>
+                                            <xsl:attribute name="id">add_link</xsl:attribute>
+                                            <xsl:attribute name="onclick">javascript:showSpringArchieveUploadScreen();return false;</xsl:attribute>
+                                            <xsl:text>&#160;&#160;&#160;&#160;&#160;Spring Service (Spring Context | Spring Bean)</xsl:text>
+                                        </a>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <a alt="Define Data Service" >
+                                            <xsl:attribute name="title">Define Data Service</xsl:attribute>
+                                            <xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+                                            <xsl:attribute name="href">#</xsl:attribute>
+                                            <xsl:attribute name="id">add_link</xsl:attribute>
+                                            <xsl:attribute name="onclick">javascript:addNewDataService();return false;</xsl:attribute>
+                                            <xsl:text>&#160;&#160;&#160;&#160;&#160;Data Service</xsl:text>
+                                        </a>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <a alt="Define Axis1 Service" >
+                                            <xsl:attribute name="title">Axis1 Service deployed on Axis2</xsl:attribute>
+                                            <xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+                                            <xsl:attribute name="href">#</xsl:attribute>
+                                            <xsl:attribute name="id">add_link</xsl:attribute>
+                                            <xsl:attribute name="onclick">javascript:showAxis1WSDDUploadScreen();return false;</xsl:attribute>
+                                            <xsl:text>&#160;&#160;&#160;&#160;&#160;Axis1 Service</xsl:text>
+                                        </a>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <a alt="Define EJB Service" >
+                                            <xsl:attribute name="title">Define EJB Service</xsl:attribute>
+                                            <xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+                                            <xsl:attribute name="href">#</xsl:attribute>
+                                            <xsl:attribute name="id">add_link</xsl:attribute>
+                                            <xsl:attribute name="onclick">javascript:ejbProviderConfig();return false;</xsl:attribute>
+                                            <xsl:text>&#160;&#160;&#160;&#160;&#160;Service based on EJB</xsl:text>
+                                        </a>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </fieldset>
+            </form>
+        </div>
     </xsl:template>
 </xsl:stylesheet>




More information about the Wsas-java-dev mailing list