Index: trunk/zoo-project/HISTORY.txt
===================================================================
--- trunk/zoo-project/HISTORY.txt	(revision 752)
+++ trunk/zoo-project/HISTORY.txt	(revision 753)
@@ -1,5 +1,8 @@
 Version 1.6.0-dev
-  * Add CORS support
-  * Fix issue when dealing with Array in JavaScript support
+  * Add the MapServer 7.0.1 internal support.
+  * Support for exotic location of openssl.
+  * Add ZOO-Client API documentation reference in the official documentation.
+  * Add CORS support.
+  * Fix issue when dealing with Array in JavaScript support.
   * Update the Centos installation procedure.
   * Small fixes in java support.
Index: trunk/zoo-project/zoo-client/lib/tpl/payload_Execute.mustache
===================================================================
--- trunk/zoo-project/zoo-client/lib/tpl/payload_Execute.mustache	(revision 752)
+++ trunk/zoo-project/zoo-client/lib/tpl/payload_Execute.mustache	(revision 753)
@@ -2,53 +2,51 @@
 ../wpsExecute_request.xsd" language="{{language}}">
   <!-- template-version: 0.21 -->
-	<ows:Identifier>{{Identifier}}</ows:Identifier>
-	<wps:DataInputs>
+  <ows:Identifier>{{Identifier}}</ows:Identifier>
+  <wps:DataInputs>
 {{#DataInputs}}
 {{#is_literal}}
-		<wps:Input>
-			<ows:Identifier>{{identifier}}</ows:Identifier>
-			<wps:Data>
-				<wps:LiteralData{{#dataType}} dataType="{{dataType}}"{{/dataType}}>{{value}}</wps:LiteralData>
-			</wps:Data>
-		</wps:Input>
+    <wps:Input>
+      <ows:Identifier>{{identifier}}</ows:Identifier>
+      <wps:Data>
+        <wps:LiteralData{{#dataType}} dataType="{{dataType}}"{{/dataType}}>{{value}}</wps:LiteralData>
+      </wps:Data>
+    </wps:Input>
 {{/is_literal}}
 {{#is_bbox}}
-		<wps:Input>
-			<ows:Identifier>{{identifier}}</ows:Identifier>
-			<wps:Data>
-				<wps:BoundingBoxData ows:crs="{{crs}}" ows:dimensions="{{dimension}}">
-            <ows:LowerCorner>{{lowerCorner}}</ows:LowerCorner>
-            <ows:UpperCorner>{{upperCorner}}</ows:UpperCorner>
-         </wps:BoundingBoxData>
-			</wps:Data>
-		</wps:Input>
+    <wps:Input>
+      <ows:Identifier>{{identifier}}</ows:Identifier>
+      <wps:Data>
+        <wps:BoundingBoxData ows:crs="{{crs}}" ows:dimensions="{{dimension}}">
+          <ows:LowerCorner>{{lowerCorner}}</ows:LowerCorner>
+          <ows:UpperCorner>{{upperCorner}}</ows:UpperCorner>
+        </wps:BoundingBoxData>
+      </wps:Data>
+    </wps:Input>
 {{/is_bbox}}
 {{#is_complex}}
 {{#is_reference}}
 {{#is_get}}
-		<wps:Input>
-			<ows:Identifier>{{identifier}}</ows:Identifier>
-			<wps:Reference xlink:href="{{href}}"{{#schema}} schema="{{shema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}/>
-		</wps:Input>
+    <wps:Input>
+      <ows:Identifier>{{identifier}}</ows:Identifier>
+      <wps:Reference xlink:href="{{href}}"{{#schema}} schema="{{shema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}/>
+    </wps:Input>
 {{/is_get}}
 {{#is_post}}
-		<wps:Input>
-			<ows:Identifier>{{identifier}}</ows:Identifier>
-			<wps:Reference xlink:href="{{href}}" method="{{method}}" {{#schema}} schema="{{shema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}>
+    <wps:Input>
+      <ows:Identifier>{{identifier}}</ows:Identifier>
+      <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}}" />
+        <wps:Header key="{{key}}" value="{{value}}" />
 {{/headers}}
-			  <wps:Body>{{{value}}}</wps:Body>
-			</wps:Reference>
-		</wps:Input>
+        <wps:Body>{{{value}}}</wps:Body>
+      </wps:Reference>
+    </wps:Input>
 {{/is_post}}
 {{/is_reference}}
 {{^is_reference}}
-		<wps:Input>
+    <wps:Input>
       <ows:Identifier>{{identifier}}</ows:Identifier>
       <wps:Data>
-        <wps:ComplexData{{#schema}} schema="{{shema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}>{{#is_XML}}
-	 {{{value}}}{{/is_XML}}{{^is_XML}}<![CDATA[{{{value}}}]]>{{/is_XML}}
-        </wps:ComplexData>
+        <wps:ComplexData{{#schema}} schema="{{shema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}>{{#is_XML}}{{{value}}}{{/is_XML}}{{^is_XML}}<![CDATA[{{{value}}}]]>{{/is_XML}}</wps:ComplexData>
       </wps:Data>
     </wps:Input>
@@ -56,6 +54,6 @@
 {{/is_complex}}
 {{/DataInputs}}
-	</wps:DataInputs>	
-	<wps:ResponseForm>
+  </wps:DataInputs>	
+  <wps:ResponseForm>
 {{#RawDataOutput}}
 {{#DataOutputs}}
Index: trunk/zoo-project/zoo-kernel/Makefile.in
===================================================================
--- trunk/zoo-project/zoo-kernel/Makefile.in	(revision 752)
+++ trunk/zoo-project/zoo-kernel/Makefile.in	(revision 753)
@@ -58,5 +58,5 @@
 
 service_internal_ms.o: service_internal_ms.c
-	gcc ${JS_ENABLED} ${JSCFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_internal_ms.c
+	gcc ${JS_ENABLED} ${GDAL_CFLAGS}  ${JSCFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_internal_ms.c
 
 service_internal_python.o: service_internal_python.c service.h
Index: trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in
===================================================================
--- trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in	(revision 752)
+++ trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in	(revision 753)
@@ -68,5 +68,5 @@
 
 ZOO_CFLAGS=-I${ZRPATH}/../thirds/cgic206/ -I${ZRPATH}/zoo-kernel/
-ZOO_LDFLAGS=-lcrypto -luuid
+ZOO_LDFLAGS=@OPENSSL_LDFLAGS@ -luuid
 
 JAVACFLAGS=@JAVA_CPPFLAGS@
@@ -96,5 +96,5 @@
 SAGA_FILE=@SAGA_FILE@
 
-CFLAGS=@RELY_ON_DB@ @DEB_DEF@ -fpic ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
-LDFLAGS=-lzoo_service @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS}  ${FCGI_LDFLAGS} -lcrypto -luuid ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS}
+CFLAGS=@RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
+LDFLAGS=-lzoo_service @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS}  ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ -luuid ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS}
 
Index: trunk/zoo-project/zoo-kernel/configure.ac
===================================================================
--- trunk/zoo-project/zoo-kernel/configure.ac	(revision 752)
+++ trunk/zoo-project/zoo-kernel/configure.ac	(revision 753)
@@ -38,4 +38,24 @@
 AC_FUNC_REALLOC
 AC_CHECK_FUNCS([dup2 getcwd memset setenv strdup strstr])
+
+#============================================================================
+# Detect if openssl is available
+#============================================================================
+
+AC_ARG_WITH([openssl],
+    [AS_HELP_STRING([--with-openssl=PATH], [Specifies an alternative location for the openssl library])],
+    [OPENSSL_DIR="$withval"], [OPENSSL_DIR="/usr/"])
+OPENSSL_CFLAGS="-I$OPENSSL_DIR/include"
+OPENSSL_LDFLAGS="-lcrypto -L$OPENSSL_DIR/lib -lssl"
+CPPFLAGS_SAVE="$CPPFLAGS"
+CPPFLAGS="$OPENSSL_CFLAGS"
+LIBS_SAVE="$LIBS"
+LIBS="$OPENSSL_LDFLAGS"
+AC_CHECK_HEADERS([openssl/md5.h openssl/hmac.h openssl/evp.h openssl/bio.h openssl/buffer.h],
+			[], [AC_MSG_ERROR([could not find header file $i related to openssl])])
+AC_CHECK_LIB(crypto, BIO_f_base64,
+			[], [AC_MSG_ERROR([could not find $i function in openssl library])])
+AC_SUBST([OPENSSL_CFLAGS])
+AC_SUBST([OPENSSL_LDFLAGS])
 
 #============================================================================
@@ -333,4 +353,8 @@
        [MS_SRC_PATH="$withval"], [MS_SRC_PATH=""])
 
+AC_ARG_WITH([ms-version], 
+       [AS_HELP_STRING([--with-ms-version=VERSION], [Specifies the MapServer version to build against])], 
+       [MS_VERSION="$withval"], [MS_VERSION=""])
+
 if test -z $MS_SRC_PATH;
 then
@@ -345,4 +369,10 @@
                AC_MSG_RESULT([Using MacOS X Framework for MapServer])
        else
+	if test "x$MS_VERSION" = "x7";
+	then
+		MS_LDFLAGS="-L$MS_SRC_PATH/lib -lmapserver"
+		MS_CPPFLAGS="-DUSE_MS -I$MS_SRC_PATH/include/mapserver "
+               	AC_MSG_RESULT([Using user-specified MapServer src path: $MS_SRC_PATH])
+        else
                if test -d $MS_SRC_PATH; then
                        MS_LDFLAGS="-L$MS_SRC_PATH -lmapserver `$MS_SRC_PATH/mapserver-config --libs`"
@@ -353,4 +383,5 @@
                        AC_MSG_ERROR([the user-specified mapserver-config file $MS_SRC_PATH does not exist])
                fi
+        fi
        fi
        MS_FILE="service_internal_ms.o"
Index: trunk/zoo-project/zoo-kernel/service_internal_ms.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 752)
+++ trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 753)
@@ -669,5 +669,7 @@
     if(initClass((myLayer->CLASS[myLayer->numclasses])) == -1)
       return -1;
+#if MS_VERSION_MAJOR<7
     myLayer->CLASS[myLayer->numclasses]->type = myLayer->type;
+#endif
     if(msGrowClassStyles(myLayer->CLASS[myLayer->numclasses]) == NULL)
       return -1;
@@ -918,5 +920,7 @@
 	    if(initClass((myLayer->CLASS[myLayer->numclasses])) == -1)
 	      return -1;
+#if MS_VERSION_MAJOR<7
 	    myLayer->CLASS[myLayer->numclasses]->type = myLayer->type;
+#endif
 	    if(msGrowClassStyles(myLayer->CLASS[myLayer->numclasses]) == NULL)
 	      return -1;
