Index: /tapas/service/implementation/com/ether/TapasServiceImpl.java
===================================================================
--- /tapas/service/implementation/com/ether/TapasServiceImpl.java	(revision 388)
+++ /tapas/service/implementation/com/ether/TapasServiceImpl.java	(revision 389)
@@ -5,4 +5,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.jdom.*;
+import org.jdom.output.Format;
+import org.jdom.output.XMLOutputter;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -10,13 +13,74 @@
 import org.springframework.transaction.annotation.Transactional;
 
+import java.io.FileOutputStream;
 import java.util.List;
+import java.util.prefs.Preferences;
 
 /**
- * @author vmipsl
- * @date 07 mar 2011
+ * @author rboipsl
+ * @date 2 mars 2012
  */
 public class TapasServiceImpl
         implements TapasService
 {
+
+    public void createXMLRequest()
+
+    {
+        String idF = "Ether_TAPAS_0000001";
+        String idRF = "1";
+        String validFF = "ASCII";
+        String validRF = "YES";
+
+        String xvalidFF = "ASCII,FITS,NETCDF";
+        String xvalidRF = "YES,NO";
+        String fichier = "request1.xml";
+
+        final Element racine = new Element( "tapas" );
+        final Element request = new Element( "request" );
+        final Element preferences = new Element( "preferences" );
+        final Element format = new Element( "format" );
+        final Element rayleighExtinction = new Element( "rayleigh_extinction" );
+
+        //On crÃ©e un nouveau Document JDOM basÃ© sur la racine que l'on vient de crÃ©er
+        final Document document = new Document( racine );
+
+        final Attribute id = new Attribute( "Id", idF );
+        racine.setAttribute( id );
+
+        final Attribute idR = new Attribute( "Id", idRF );
+        request.setAttribute( idR );
+
+        racine.addContent( request );
+        request.addContent( preferences );
+
+        final Attribute validF = new Attribute( "valid", xvalidFF );
+        format.setAttribute( validF );
+        format.setText( validFF );
+
+        final Attribute validR = new Attribute( "valid", xvalidRF );
+        rayleighExtinction.setAttribute( validR );
+        rayleighExtinction.setText( validRF );
+
+        createXMLFile( fichier, document );
+    }
+
+
+    public void createXMLFile( final String fichier, final Document document )
+    {
+        try
+        {
+            //On utilise ici un affichage classique avec getPrettyFormat()
+            final XMLOutputter sortie = new XMLOutputter( Format.getPrettyFormat() );
+            //Remarquez qu'il suffit simplement de crÃ©er une instance de FileOutputStream
+            //avec en argument le nom du fichier pour effectuer la sÃ©rialisation.
+            sortie.output( document, new FileOutputStream( fichier ) );
+        }
+        catch( java.io.IOException ignored )
+        {
+        }
+    }
+
+
     @Nullable
     @Transactional(readOnly = true)
@@ -83,3 +147,4 @@
     private PlateformDAO _plateformDAO;
     private ParameterDAO _parameterDAO;
+
 }
Index: /tapas/service/implementation/service-context.xml
===================================================================
--- /tapas/service/implementation/service-context.xml	(revision 388)
+++ /tapas/service/implementation/service-context.xml	(revision 389)
@@ -4,6 +4,6 @@
 <beans>
 	<bean id="tapasServiceTarget" class="com.ether.TapasServiceImpl">
-		<property name="plateformDAO" ref="refPlateformDAO" />
-		<property name="parameterDAO" ref="refParameterDAO" />
+		<!--<property name="plateformDAO" ref="refPlateformDAO" />
+		<property name="parameterDAO" ref="refParameterDAO" />-->
 	</bean>
 
Index: /tapas/service/implementation/service-context_test.xml
===================================================================
--- /tapas/service/implementation/service-context_test.xml	(revision 389)
+++ /tapas/service/implementation/service-context_test.xml	(revision 389)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+	<bean id="tapasService" class="com.ether.TapasServiceImpl">
+		<!--<property name="plateformDAO" ref="refPlateformDAO" />
+		<property name="parameterDAO" ref="refParameterDAO" />-->
+	</bean>
+
+
+</beans>
Index: /tapas/service/interface/com/ether/TapasService.java
===================================================================
--- /tapas/service/interface/com/ether/TapasService.java	(revision 388)
+++ /tapas/service/interface/com/ether/TapasService.java	(revision 389)
@@ -1,4 +1,5 @@
 package com.ether;
 
+import org.jdom.Document;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -13,4 +14,9 @@
         extends Service
 {
+
+    public void createXMLRequest();
+
+    public void createXMLFile( final String fichier, final Document document );
+
 	@Nullable
 	List<Plateform> getAllPlateforms() throws ServiceException;
Index: /tapas/service/test/com/ether/EtherTest.java
===================================================================
--- /tapas/service/test/com/ether/EtherTest.java	(revision 388)
+++ /tapas/service/test/com/ether/EtherTest.java	(revision 389)
@@ -2,4 +2,6 @@
 
 import org.jetbrains.annotations.NotNull;
+import org.junit.Assert;
+import org.junit.Test;
 
 import javax.imageio.ImageIO;
@@ -9,5 +11,9 @@
 import java.io.File;
 import java.io.Serializable;
+import java.text.DateFormat;
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
 
 /**
@@ -16,5 +22,16 @@
  */
 public class EtherTest
+        extends ServiceEtherTest
 {
+    @Test
+    public void testCreateXML()
+            throws Exception
+    {
+
+        getService().createXMLRequest();
+
+    }
+
+
     @NotNull
     protected double[] createDataArray( @NotNull final Integer size, @NotNull final Integer begin )
Index: /tapas/service/test/com/ether/OtherTest.java
===================================================================
--- /tapas/service/test/com/ether/OtherTest.java	(revision 388)
+++ /tapas/service/test/com/ether/OtherTest.java	(revision 389)
@@ -20,7 +20,8 @@
 {
     @Test
-    public void testDatesMoisPlusUn()
+    public void testCreateXML()
             throws Exception
     {
+
         final DateFormat shortDateFormat = new SimpleDateFormat( "MMyyyy" );
         final DateFormat completDateFormat = new SimpleDateFormat( "dd-MM-yyyy" );
@@ -37,20 +38,5 @@
     }
 
-    @Test
-    public void testDates()
-            throws Exception
-    {
-        List<Date> dates = new ArrayList<Date>();
-        final DateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd" );
 
-        dates.add( dateFormat.parse( "2007-01-01" ) );
-        dates.add( dateFormat.parse( "2007-01-02" ) );
 
-        final DateFormat shortFormat = new SimpleDateFormat( "yyyy" );
-        Set<String> shortDates = new HashSet<String>();
-        for ( final Date aDate : dates )
-        {
-            shortDates.add( shortFormat.format( aDate ) );
-        }
-    }
 }
Index: /tapas/service/test/com/ether/ServiceEtherTest.java
===================================================================
--- /tapas/service/test/com/ether/ServiceEtherTest.java	(revision 388)
+++ /tapas/service/test/com/ether/ServiceEtherTest.java	(revision 389)
@@ -10,5 +10,5 @@
     public ServiceEtherTest()
     {
-        super( "etherService" );
+        super( "tapasService" );
     }
 
Index: /tapas/service/test/com/ether/ServiceTestHelper.java
===================================================================
--- /tapas/service/test/com/ether/ServiceTestHelper.java	(revision 388)
+++ /tapas/service/test/com/ether/ServiceTestHelper.java	(revision 389)
@@ -19,7 +19,8 @@
     {
 		return new String[] { 
-				"classpath:dao-context.xml",
-				"classpath:service-context.xml",
-				"classpath:hibernate_test.cfg.xml", };
+//				"classpath:dao-context.xml",
+				"classpath:service-context_test.xml",
+//				"classpath:hibernate_test.cfg.xml",
+        };
     }
 
Index: /tapas/web/init.jsp
===================================================================
--- /tapas/web/init.jsp	(revision 388)
+++ /tapas/web/init.jsp	(revision 389)
@@ -7,7 +7,10 @@
 
     <tiles:put name="insertCss" type="string"></tiles:put>
-    <tiles:put name="insertJsOrJsp" type="string"></tiles:put>
+    <tiles:put name="insertJsOrJsp" type="string">
+        <ether:htmlJsp jspFile="init_script"></ether:htmlJsp>
+    </tiles:put>
 
-    <tiles:put name="title" type="string"><spring:message code="app.title"/> - <spring:message code="title.home"/></tiles:put>
+    <tiles:put name="title" type="string"><spring:message code="app.title"/> - <spring:message
+            code="title.home"/></tiles:put>
     <tiles:put name="nav" type="string"><a href=""><spring:message code="label.home"/></a></tiles:put>
 
@@ -18,5 +21,16 @@
     <tiles:put name="body" type="string">
 
-        CONTENU INIT
+        <div id="formulaire">
+
+        </div>
+
+        <script type="text/javascript">
+            var initTexts = $A( "" );
+
+            initTexts["label.submitButton"] = '<spring:message code="label.submitButton"/>';
+
+
+            var interfaceInit = new InterfaceInit();
+        </script>
 
     </tiles:put>
Index: /tapas/web/init_script.jsp
===================================================================
--- /tapas/web/init_script.jsp	(revision 389)
+++ /tapas/web/init_script.jsp	(revision 389)
@@ -0,0 +1,62 @@
+<script type="text/javascript">
+    var InterfaceInit = Class.create( {
+
+        initialize: function()
+        {
+            /** *********** CONTAINERS *********** **/
+            this.containerForm = $( "#formulaire" );
+
+            this.createForm();
+
+        },
+
+        // CREATES ********************************************************
+        createForm: function()
+        {
+            // Create button elements
+            this.input1 = $( document.createElement( "input" ) );
+            var input2 = $( document.createElement( "input" ) );
+
+            this.input1.attr( {id:"1"} );
+            this.containerForm.append( this.input1 );
+
+            input2.attr( {id:"2"} );
+            this.containerForm.append( input2 );
+
+            var submitButton = new Button( {value:initTexts["label.submitButton"], parent:this.containerForm, id:"button_submit", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} );
+
+        },
+
+
+        // REQUESTS ********************************************************
+        requestCreateXML: function()
+        {
+//            alert(this.input1.val()+' - '+$("#2").val());
+            $.ajax( {
+                url: "project?methodName=createUserRequest&input1="+this.input1.val()+"&input2="+$("#2").val(),
+                success:jQuery.proxy( this.handleCreateXML, this )
+            } );
+        },
+
+        // HANDLES ******************************************************** = retours ajax
+        handleCreateXML: function( result )
+        {
+//            alert("XML crÃ©Ã©");
+            var bob = jQuery.parseJSON( result ).result;
+            alert(bob);
+
+        },
+
+
+        // EVENTS ********************************************************
+
+        onClickSubmit: function()
+        {
+            this.requestCreateXML();
+        }
+
+
+    } );
+
+
+</script>
Index: /tapas/web/src/com/ether/Controller.java
===================================================================
--- /tapas/web/src/com/ether/Controller.java	(revision 388)
+++ /tapas/web/src/com/ether/Controller.java	(revision 389)
@@ -2,4 +2,7 @@
 
 import com.ether.annotation.ControllerMethod;
+import com.ether.annotation.Mandatory;
+import com.ether.annotation.ParamName;
+import net.sf.json.JSONObject;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -8,4 +11,5 @@
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
@@ -17,7 +21,10 @@
         extends ControllerEther
 {
+
     /** *********************************************************** **/
     /** *********************** VIEWS ***************************** **/
-    /** *********************************************************** **/
+    /**
+     * ********************************************************** *
+     */
     @ControllerMethod(view = VIEW_INIT)
     public Map<String, Object> home()
@@ -27,8 +34,24 @@
     }
 
+
     /** *********************************************************** **/
     /** *********************** CALLS ***************************** **/
-    /** *********************************************************** **/
+    /**
+     * ********************************************************** *
+     */
 
+    @ControllerMethod(jsonResult = true)
+    public JSONObject createUserRequest( @ParamName("input1") final String input1, @ParamName("input2") final String input2 )
+            throws ServiceException
+    {
+
+        //appel a createxml
+        _tapasService.createXMLRequest();
+
+
+        final JSONObject result = new JSONObject();
+        result.put( "result","SUCCESS" );
+        return result;
+    }
 
 
Index: /tapas/web/src/messages_en.properties
===================================================================
--- /tapas/web/src/messages_en.properties	(revision 388)
+++ /tapas/web/src/messages_en.properties	(revision 389)
@@ -56,2 +56,5 @@
 logo.kinetics.alt=Chemical Kinetics Database
 logo.links.alt=Links
+
+
+label.submitButton=RUN
Index: /tapas/web/src/messages_fr.properties
===================================================================
--- /tapas/web/src/messages_fr.properties	(revision 388)
+++ /tapas/web/src/messages_fr.properties	(revision 389)
@@ -57,2 +57,5 @@
 logo.links.alt=Liens
 
+
+label.submitButton=COURIR
+
