Index: trunk/docs/services/zcfg-reference.txt
===================================================================
--- trunk/docs/services/zcfg-reference.txt	(revision 484)
+++ trunk/docs/services/zcfg-reference.txt	(revision 485)
@@ -57,5 +57,5 @@
 
 -  a name (between brackets as for the name of the service before)
-- various medata properties (``Title``, ``Abstract``, ``minOccurs`` and ``maxOccurs``)
+- various medata properties (``Title``, ``Abstract``, ``minOccurs``, ``maxOccurs`` and, in case of ComplexData, the optional ``maximumMegabytes``)
 - a Type Of Data node (:ref:`description <typeDataNodes>`)
 
Index: trunk/testing/run.sh
===================================================================
--- trunk/testing/run.sh	(revision 484)
+++ trunk/testing/run.sh	(revision 485)
@@ -193,7 +193,4 @@
 done
 
-kvpRequest "${WPSInstance}?request=DescribeProcess&service=WPS&Identifier=${ServiceName}" "tmp/outputDPb10.xml" "DescribeProcess"
-
-echo ""
 
 cat requests/dp.xml | sed "s:ServiceName:${ServiceName}:g" > tmp/dp1.xml
Index: trunk/zoo-project/HISTORY.txt
===================================================================
--- trunk/zoo-project/HISTORY.txt	(revision 484)
+++ trunk/zoo-project/HISTORY.txt	(revision 485)
@@ -1,3 +1,4 @@
 Version 1.4.0-dev
+  * Add support of maximumMegabytes keywords for ComplexData Inputs
   * Add the optional YAML ZCFG support #4 and the zcfg2yaml converter
   * Return error messages that enable the service provider to quickly identify the root cause of errors due to configuration file syntax (ticket #90)
Index: trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal.c	(revision 484)
+++ trunk/zoo-project/zoo-kernel/service_internal.c	(revision 485)
@@ -967,4 +967,7 @@
       }else
 	xmlNewProp(nc2,BAD_CAST "maxOccurs",BAD_CAST "1");
+      if((tmp1=getMap(e->content,"maximumMegabytes"))!=NULL){
+	xmlNewProp(nc2,BAD_CAST "maximumMegabytes",BAD_CAST tmp1->value);
+      }
     }
 
@@ -2508,4 +2511,10 @@
 	  else
 	    addToMap(tmpMaps2->content,"maxOccurs",tmpMaxO->value);
+	map* tmpMaxMB=getMap(tmpInputs->content,"maximumMegabytes");
+	if(tmpMaxMB!=NULL)
+	  if(tmpMaps2->content==NULL)
+	    tmpMaps2->content=createMap("maximumMegabytes",tmpMaxMB->value);
+	  else
+	    addToMap(tmpMaps2->content,"maximumMegabytes",tmpMaxMB->value);
       }
 
@@ -2558,8 +2567,14 @@
 	if(tmpMaxO!=NULL){
 	  if(tmpMaps->content==NULL)
-	    tmpMaps->content=createMap("maxOccurs",tmpMap1->value);
+	    tmpMaps->content=createMap("maxOccurs",tmpMaxO->value);
 	  else
-	    addToMap(tmpMaps->content,"maxOccurs",tmpMap1->value);
-	}
+	    addToMap(tmpMaps->content,"maxOccurs",tmpMaxO->value);
+	}
+	map* tmpMaxMB=getMap(tmpInputs->content,"maximumMegabytes");
+	if(tmpMaxMB!=NULL)
+	  if(tmpMaps->content==NULL)
+	    tmpMaps->content=createMap("maximumMegabytes",tmpMaxMB->value);
+	  else
+	    addToMap(tmpMaps->content,"maximumMegabytes",tmpMaxMB->value);
 	/**
 	 * Parsing BoundingBoxData, fill the following map and then add it to
Index: trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 484)
+++ trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 485)
@@ -2159,4 +2159,38 @@
    */
   char *dfv=addDefaultValues(&request_input_real_format,s1->inputs,m,0);
+  maps *ptr=request_input_real_format;
+  while(ptr!=NULL){
+    dumpMap(ptr->content);
+    map *tmp0=getMap(ptr->content,"size");
+    map *tmp1=getMap(ptr->content,"maximumMegabytes");
+    if(tmp1!=NULL && tmp0!=NULL){
+      float i=atof(tmp0->value)/1048576.0;
+      if(i>=atoi(tmp1->value)){
+	char tmps[1024];
+	map* tmpe=createMap("code","FileSizeExceeded");
+	snprintf(tmps,1024,_("The <%s> parameter has a limited size (%sMB) defined in ZOO ServicesProvider configuration file but the reference you provided exceed this limitation (%dMB), please correct your query or the ZOO Configuration file."),ptr->name,tmp1->value,i);
+	addToMap(tmpe,"locator",ptr->name);
+	addToMap(tmpe,"text",tmps);
+	printExceptionReportResponse(m,tmpe);
+	freeService(&s1);
+	free(s1);
+	freeMap(&tmpe);
+	free(tmpe);
+	freeMaps(&m);
+	free(m);
+	free(REQUEST);
+	free(SERVICE_URL);
+	freeMaps(&request_input_real_format);
+	free(request_input_real_format);
+	freeMaps(&request_output_real_format);
+	free(request_output_real_format);
+	freeMaps(&tmpmaps);
+	free(tmpmaps);
+	return 1;
+      }
+    }
+    ptr=ptr->next;
+  }
+
   char *dfv1=addDefaultValues(&request_output_real_format,s1->outputs,m,1);
   if(strcmp(dfv1,"")!=0 || strcmp(dfv,"")!=0){
