Index: /trunk/docs/kernel/configuration.rst
===================================================================
--- /trunk/docs/kernel/configuration.rst	(revision 751)
+++ /trunk/docs/kernel/configuration.rst	(revision 752)
@@ -43,4 +43,5 @@
     msOgcVersion=1.0.0
     tmpUrl=http:/localhost/temp/
+    cors=false
     
     [identification]
@@ -76,11 +77,17 @@
  * ``dataPath``: Path to the directory where data files are stored (used to store mapfiles and data when MapServer support is activated).
  * ``tmpPath``: Path to the directory where temporary files are stored (such as *ExecuteResponse* when *storeExecuteResponse* is set to true).
+ * ``tmpUrl``: URL to access the temporary files directory (cf. ``tmpPath``).
  * ``cacheDir``: Path to  the directory where cached request files [#f1]_ are stored (optional).
  * ``serverAddress``: URL to the ZOO-Kernel instance.
- * ``tmpUrl``: URL of the temporary files directory.
  * ``mapservAddress``: URL to the MapServer instance (optional).
  * ``msOgcVersion``: Version of all supported OGC Web Services output [#f2]_
    (optional).
  * ``lang``: Supported natural languages separated by a coma (the first is the default one),
+ * ``cors``: Define if the ZOO-Kernel should support `Cross-Origin
+   Resource Sharing <https://www.w3.org/TR/cors/>`__. If this
+   paramater is not defined, then the ZOO-Kernel won't support CORS.
+
+In case you have activated the MapServer support, please refer to
+:ref:`this specific section <kernel-mapserver-main.cfg>`. 
 
 
@@ -117,4 +124,16 @@
 and notice the specific header *X-Powered-By: Zoo-Project@Trac*.
 
+In case you want to allow CORS support for POST requests coming from
+``myhost.net``, then you should define the following minimal
+parameters in this section:
+
+.. code-block:: guess
+    :linenos:
+    
+    Access-Control-Allow-Origin=myhost.net
+    Access-Control-Allow-Methods=POST
+    Access-Control-Allow-Headers=content-type
+
+
 env section
 ...............................
@@ -132,4 +151,7 @@
     [env]
     DISPLAY=:1
+
+In case you have activated the OTB support, please refer to :ref:`this
+specific section <kernel-orfeotoolbox-main.cfg>`. 
 
 lenv section
Index: /trunk/docs/kernel/mapserver.rst
===================================================================
--- /trunk/docs/kernel/mapserver.rst	(revision 751)
+++ /trunk/docs/kernel/mapserver.rst	(revision 752)
@@ -107,4 +107,6 @@
      cp zoo_loader.cgi /usr/lib/cgi-bin
 
+
+.. _kernel-mapserver-main.cfg:
 
 Main configuration file
Index: /trunk/docs/kernel/orfeotoolbox.rst
===================================================================
--- /trunk/docs/kernel/orfeotoolbox.rst	(revision 751)
+++ /trunk/docs/kernel/orfeotoolbox.rst	(revision 752)
@@ -57,4 +57,6 @@
 ....................................
 
+.. _kernel-orfeotoolbox-main.cfg:
+    
 Main configuration file
 *************************
Index: /trunk/workshop/index.rst
===================================================================
--- /trunk/workshop/index.rst	(revision 751)
+++ /trunk/workshop/index.rst	(revision 752)
@@ -12,4 +12,5 @@
    :maxdepth: 1
 
+   2015/index
    2014/index
    2013/index
Index: /trunk/zoo-project/HISTORY.txt
===================================================================
--- /trunk/zoo-project/HISTORY.txt	(revision 751)
+++ /trunk/zoo-project/HISTORY.txt	(revision 752)
@@ -1,3 +1,13 @@
-Version 1.5.0-dev
+Version 1.6.0-dev
+  * Add CORS support
+  * Fix issue when dealing with Array in JavaScript support
+  * Update the Centos installation procedure.
+  * Small fixes in java support.
+  * Fix issue when XML request contains empty nodes for inputs
+  * Add status update for contour lines computation
+  * Fix FASTCGI location using the --with-fastcgi option.
+  * Redefined the API function addToMapWithSize to fix problem with Python/PHP support.
+
+Version 1.5.0
   * Complete rewrite of the documentation to use modern style
   * Fix asynchronous POST request on WIN32 platforms
Index: /trunk/zoo-project/zoo-client/lib/tpl/payload_Execute.mustache
===================================================================
--- /trunk/zoo-project/zoo-client/lib/tpl/payload_Execute.mustache	(revision 751)
+++ /trunk/zoo-project/zoo-client/lib/tpl/payload_Execute.mustache	(revision 752)
@@ -35,5 +35,5 @@
 		<wps:Input>
 			<ows:Identifier>{{identifier}}</ows:Identifier>
-			<wps:Reference xlink:href="{{href}}" method="{{method}}">
+			<wps:Reference xlink:href="{{href}}" method="{{method}}" {{#schema}} schema="{{shema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}>
 {{#headers}}
 			  <wps:Header key="{{key}}" value="{{value}}" />
@@ -60,5 +60,5 @@
 {{#RawDataOutput}}
 {{#DataOutputs}}
-    <wps:RawDataOutput mimeType="{{mimeType}}">
+    <wps:RawDataOutput {{#mimeType}}mimeType="{{mimeType}}"{{/mimeType}}>
       <ows:Identifier>{{identifier}}</ows:Identifier>
     </wps:RawDataOutput>
Index: /trunk/zoo-project/zoo-kernel/doc/index.dox
===================================================================
--- /trunk/zoo-project/zoo-kernel/doc/index.dox	(revision 751)
+++ /trunk/zoo-project/zoo-kernel/doc/index.dox	(revision 752)
@@ -13,6 +13,6 @@
 Home: http://www.zoo-project.org<br>
 Download: 
- <a href="http://zoo-project.org/site/Downloads#Downloads">http at zoo-project.org</a>,
- <a href="http://zoo-project.org/site/Downloads#Fordevelopers">svn at zoo-project.org</a>
+ <a href="http://zoo-project.org/Code/Download">http at zoo-project.org</a>,
+ <a href="http://svn.zoo-project.org/svn/">svn at zoo-project.org</a>
 
 This documentation describes the ZOO-Project C-API. You can start your visit by the Data Structures link above which details all available structures in ZOO-Project. The Files link presents all source files used to generate this documentation.
Index: /trunk/zoo-project/zoo-kernel/service_internal_js.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_js.c	(revision 751)
+++ /trunk/zoo-project/zoo-kernel/service_internal_js.c	(revision 752)
@@ -458,5 +458,5 @@
   while(isArray==NULL && tmpm!=NULL){
     jsval jsstr;
-    if((isBinary!=NULL && strncasecmp(tmpm->name,"value",5)==0))
+    if(isBinary!=NULL && strncasecmp(tmpm->name,"value",5)==0)
       jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,atoi(isBinary->value)));
     else
@@ -473,11 +473,16 @@
     JSObject* values=JS_NewArrayObject( cx, cnt, NULL );
     JSObject* mvalues=JS_NewArrayObject( cx, cnt, NULL );
-    map *tmpm1,*tmpm2;
+    map *tmpm1,*tmpm2,*tmpm3;
     int i=0;
     for(i=0;i<cnt;i++){
       tmpm1=getMapArray(t,"value",i);
       tmpm2=getMapArray(t,tmap->name,i);
+      tmpm3=getMapArray(t,"size",i);
       if(tmpm1!=NULL){
-	jsval jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm1->value,strlen(tmpm1->value)));
+	jsval jsstr;
+	if(tmpm3!=NULL)
+	  jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm1->value,atoi(tmpm3->value)));
+	else
+	  jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm1->value,strlen(tmpm1->value)));
 	JS_SetElement( cx, values, i, &jsstr );
       }
@@ -491,4 +496,14 @@
     JS_SetProperty(cx, res,"value",&jvalues);
     JS_SetProperty(cx, res,tmap->name,&jmvalues);
+    while(tmpm!=NULL){
+      if(strncasecmp(tmpm->name,"value",5)!=0 && strncasecmp(tmpm->name,"size",4)!=0 && strncasecmp(tmpm->name,tmap->name,strlen(tmap->name))!=0){
+	jsval jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,strlen(tmpm->value)));
+	JS_SetProperty(cx, res, tmpm->name,&jsstr);
+      }
+#ifdef JS_DEBUG
+      fprintf(stderr,"[JS] %s => %s\n",tmpm->name,tmpm->value);
+#endif
+      tmpm=tmpm->next;
+    }
   }
   return res;
Index: /trunk/zoo-project/zoo-kernel/service_internal_ms.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 751)
+++ /trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 752)
@@ -958,4 +958,12 @@
 	}
       }
+      else{
+	if(nBandsI==1){
+	  myLayer->offsite.red=0;
+	  myLayer->offsite.green=0;
+	  myLayer->offsite.blue=0;
+	}
+	msLayerAddProcessing(myLayer,"RESAMPLE=BILINEAR");
+      }
     }
     if( strlen(GDALGetRasterUnitType(hBand)) > 0 ){
Index: /trunk/zoo-project/zoo-kernel/service_internal_saga.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_saga.c	(revision 751)
+++ /trunk/zoo-project/zoo-kernel/service_internal_saga.c	(revision 752)
@@ -559,5 +559,9 @@
   }
   else{
+#ifdef HAVE_LIBKML
     addToMap(arg,"FORMAT","LIBKML");
+#else
+    addToMap(arg,"FORMAT","KML");
+#endif
   }
   free(fext);
Index: /trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 751)
+++ /trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 752)
@@ -1024,4 +1024,19 @@
       setMapInMaps(m,"main","serverAddress",tmpUrl);
     }
+
+  // CORS Support
+  if(strncasecmp(cgiRequestMethod,"OPTIONS",7)==0){
+    map* cors=getMapFromMaps(m,"main","cors");
+    if(cors!=NULL && strncasecmp(cors->value,"true",4)==0){
+      char *encoding=getEncoding(m);
+      printHeaders(m);
+      printf("Content-Type: text/plain; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
+      printf(_("CORS is enabled.\r\n"));
+      freeMaps (&m);
+      free (m);
+      fflush (stdout);
+      return 3;
+    }
+  }
 
   //Check for minimum inputs
