Index: /extensions/PiwigoLib/PiwigoLib/DTO/PwgCategory.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/DTO/PwgCategory.cs	(revision 3834)
+++ /extensions/PiwigoLib/PiwigoLib/DTO/PwgCategory.cs	(revision 3834)
@@ -0,0 +1,20 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+namespace Com.Piwigo.Lib.DTO
+{
+
+    public class PwgCategory
+    {
+        public Int32        Id { get; set; }
+        public List<Int32>  UpperCategoriesId { get; set; }
+        public String       Name { get; set; }
+        public Uri          Url { get; set; }
+        public Int64        ImagesCount { get; set; }
+        public Int64        DeepImagesCount { get; set; }
+        public Int64        SubCategoriesCount { get; set; }
+        public DateTime     LastDate { get; set; }
+    }
+}
Index: /extensions/PiwigoLib/PiwigoLib/PiwigoLib.csproj
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/PiwigoLib.csproj	(revision 3833)
+++ /extensions/PiwigoLib/PiwigoLib/PiwigoLib.csproj	(revision 3834)
@@ -4,5 +4,5 @@
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.21022</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{64C068C5-DBFE-4712-9081-B9100698F35C}</ProjectGuid>
@@ -47,4 +47,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="DTO\PwgCategory.cs" />
     <Compile Include="DTO\PwgImage.cs" />
     <Compile Include="DTO\Helper\PwgEnumHelper.cs" />
@@ -53,6 +54,8 @@
     <Compile Include="DTO\PwgSession.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Proxy\PwgCategoriesProxy.cs" />
     <Compile Include="Proxy\Helper\PwgProxyReponseHelper.cs" />
     <Compile Include="Proxy\PwgTagsProxy.cs" />
+    <Compile Include="Proxy\Response\PwgAddRequestProxyResponse.cs" />
     <Compile Include="Proxy\Response\PwgCategoriesProxyResponse.cs" />
     <Compile Include="Proxy\Response\PwgImagesProxyResponse.cs" />
@@ -65,4 +68,5 @@
     <Compile Include="Proxy\PwgProxyException.cs" />
     <Compile Include="Proxy\PwgSessionProxy.cs" />
+    <Compile Include="Service\PwgCategoriesService.cs" />
     <Compile Include="Service\PwgImagesService.cs" />
     <Compile Include="Service\PwgTagsService.cs" />
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Helper/PwgProxyReponseHelper.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Helper/PwgProxyReponseHelper.cs	(revision 3833)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Helper/PwgProxyReponseHelper.cs	(revision 3834)
@@ -7,7 +7,7 @@
 namespace Com.Piwigo.Lib.Proxy.Helper
 {
-    public static class PwgProxyReponseHelper<T>
+    public static class PwgProxyReponseHelper
     {
-        public static void buildQueryFromArray(List<T> values, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
+        public static void buildQueryFromArray<T>(List<T> values, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
         {
             String FormatString = String.Empty;
@@ -34,5 +34,29 @@
 
             }
+        }
 
+        public static void buildQueryFromValue<T>(Nullable<T> nullableValue, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
+            where T: struct 
+        {
+            if (nullableValue.HasValue)
+            {
+                buildQueryFromValue<T>(nullableValue.Value, paramName, ref firstOcc, queryStringBuilder);
+            }
+        }
+
+        public static void buildQueryFromValue<T>(T value, String paramName, ref Boolean firstOcc, StringBuilder queryStringBuilder)
+        {
+            String FormatString = String.Empty;
+            if (value != null)
+            {
+                FormatString = "{0}={1}";
+                if (firstOcc != true)
+                {
+                    FormatString = String.Format("&{0}", FormatString);
+                }
+
+                queryStringBuilder.AppendFormat(FormatString, paramName, HttpUtility.UrlEncode(value.ToString().ToLower()));
+                firstOcc = false;
+            }
         }
     }
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgCategoriesProxy.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgCategoriesProxy.cs	(revision 3834)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgCategoriesProxy.cs	(revision 3834)
@@ -0,0 +1,83 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+using Com.Piwigo.Lib.DTO;
+using System.Web;
+using Com.Piwigo.Lib.Proxy.Response;
+using Com.Piwigo.Lib.Proxy.Helper;
+
+namespace Com.Piwigo.Lib.Proxy
+{
+    static class PwgCategoriesProxy
+    {
+        static public PwgCategoriesProxyResponse pwg_categories_getList(Int32? CategoryId, 
+            Boolean? Recursive, Boolean? PublicOnly)
+        {
+            PwgCategoriesProxyResponse response = null;
+            try
+            {
+                StringBuilder data = new StringBuilder();
+                Boolean firstOcc = true;
+
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(CategoryId, "cat_id", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Boolean>(Recursive, "recursive", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Boolean>(PublicOnly, "public", ref firstOcc, data);
+
+                response = PwgGenericProxy<PwgCategoriesProxyResponse>.Get(
+                                PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                                "pwg.categories.getList", data.ToString());
+            }
+            catch (Exception ex)
+            {
+                throw new PwgProxyException("pwg_categories_getList", ex);
+            }
+            return response;
+
+        }
+
+        static public PwgCategoriesProxyResponse pwg_categories_getAdminList()
+        {
+            PwgCategoriesProxyResponse response = null;
+            try
+            {
+                response = PwgGenericProxy<PwgCategoriesProxyResponse>.Get(
+                                PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                                "pwg.categories.getAdminList", null);
+            }
+            catch (Exception ex)
+            {
+                throw new PwgProxyException("pwg_categories_getAdminList", ex);
+            }
+            return response;
+
+        }
+
+        static public PwgAddRequestProxyResponse pwg_categories_add(String categorieName, Int32? IdUpperCat)
+        {
+            PwgAddRequestProxyResponse response = null;
+            try
+            {
+                StringBuilder data = new StringBuilder();
+                data.Append("method=pwg.categories.add");
+                Boolean firstOcc = false;
+                PwgProxyReponseHelper.buildQueryFromValue<String>(categorieName, "name", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(IdUpperCat, "parent", ref firstOcc, data);
+
+                response = PwgGenericProxy<PwgAddRequestProxyResponse>.Post(
+                    PwgConfigProxy.PwgServeurUriBuilder.Uri,
+                    data.ToString());
+            }
+            catch (Exception ex)
+            {
+                throw new PwgProxyException("pwg_categories_add", ex);
+            }
+
+            return response;
+        }
+
+
+    }
+
+}
+
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/PwgTagsProxy.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/PwgTagsProxy.cs	(revision 3833)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/PwgTagsProxy.cs	(revision 3834)
@@ -12,5 +12,5 @@
     static class PwgTagsProxy
     {
-        static public PwgTagsProxyResponse pwg_tags_getList(Boolean sortedByCounter)
+        static public PwgTagsProxyResponse pwg_tags_getList(Boolean? sortedByCounter)
         {
             PwgTagsProxyResponse response = null;
@@ -18,5 +18,7 @@
             {
                 StringBuilder data = new StringBuilder();
-                data.Append("sort_by_counter=" + HttpUtility.UrlEncode(sortedByCounter.ToString().ToLower()));
+                Boolean firstOcc = true;
+
+                PwgProxyReponseHelper.buildQueryFromValue<Boolean>(sortedByCounter, "sort_by_counter", ref firstOcc, data);
 
                 response = PwgGenericProxy<PwgTagsProxyResponse>.Get(
@@ -55,5 +57,5 @@
                                                                     Int32?           perPage,
                                                                     Int32?           Page,
-                                                                    Int32?          Order,
+                                                                    Int32?           Order,
                                                                     Int32?           minRate,
                                                                     Int32?           maxRate,
@@ -75,68 +77,23 @@
                 data.AppendFormat("method={0}","pwg.tags.getImages");
                 firstOcc = false;
-                PwgProxyReponseHelper<Int32>.buildQueryFromArray(tagsId, "tag_id", ref firstOcc, data);
-                PwgProxyReponseHelper<String>.buildQueryFromArray(tagsUrlName, "tag_url_name", ref firstOcc, data);
-                PwgProxyReponseHelper<String>.buildQueryFromArray(tagsName, "tag_name", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromArray<Int32>(tagsId, "tag_id", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromArray<String>(tagsUrlName, "tag_url_name", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromArray<String>(tagsName, "tag_name", ref firstOcc, data);
 
-                if (tagModeAnd.HasValue)
-                {
-                    data.Append("&tag_mode_and=" + HttpUtility.UrlEncode(tagModeAnd.ToString().ToLower()));
-                }
-                if (perPage.HasValue)
-                {
-                    data.Append("&per_page=" + HttpUtility.UrlEncode(perPage.ToString().ToLower()));
-                }
-                if (Page.HasValue)
-                {
-                    data.Append("&page=" + HttpUtility.UrlEncode(Page.ToString().ToLower()));
-                }
-                if (Order.HasValue)
-                {
-                    data.Append("&order=" + HttpUtility.UrlEncode(Order.ToString().ToLower()));
-                }
-                if (minRate.HasValue)
-                {
-                    data.Append("&f_min_rate=" + HttpUtility.UrlEncode(minRate.ToString().ToLower()));
-                }
-                if (maxRate.HasValue)
-                {
-                    data.Append("&f_max_rate=" + HttpUtility.UrlEncode(maxRate.ToString().ToLower()));
-                }
-                if (minHit.HasValue)
-                {
-                    data.Append("&f_min_hit=" + HttpUtility.UrlEncode(minHit.ToString().ToLower()));
-                }
-                if (maxHit.HasValue)
-                {
-                    data.Append("&f_max_hit=" + HttpUtility.UrlEncode(maxHit.ToString().ToLower()));
-                }
-                if (minDateAvailable.HasValue)
-                {
-                    data.Append("&f_min_date_available=" + HttpUtility.UrlEncode(minDateAvailable.ToString().ToLower()));
-                }
-                if (maxDateAvailable.HasValue)
-                {
-                    data.Append("&f_max_date_available=" + HttpUtility.UrlEncode(maxDateAvailable.ToString().ToLower()));
-                }
-                if (minDateCreated.HasValue)
-                {
-                    data.Append("&f_min_date_created=" + HttpUtility.UrlEncode(minDateCreated.ToString().ToLower()));
-                }
-                if (maxDateCreated.HasValue)
-                {
-                    data.Append("&f_max_date_created=" + HttpUtility.UrlEncode(maxDateCreated.ToString().ToLower()));
-                }
-                if (minRatio.HasValue)
-                {
-                    data.Append("&f_min_ratio=" + HttpUtility.UrlEncode(minRatio.ToString().ToLower()));
-                }
-                if (maxRatio.HasValue)
-                {
-                    data.Append("&f_max_ratio=" + HttpUtility.UrlEncode(maxRatio.ToString().ToLower()));
-                }
-                if (withThumbnail.HasValue)
-                {
-                    data.Append("&f_with_thumbnail=" + HttpUtility.UrlEncode(withThumbnail.ToString().ToLower()));
-                }
+                PwgProxyReponseHelper.buildQueryFromValue<Boolean>(tagModeAnd, "tag_mode_and", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(perPage, "per_page", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(Page, "page", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(Order, "order", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(minRate, "f_min_rate", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(maxRate, "f_max_rate", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(minHit, "f_min_hit", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(maxHit, "f_max_hit", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<DateTime>(minDateAvailable, "f_min_date_available", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<DateTime>(maxDateAvailable, "f_max_date_available", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<DateTime>(minDateCreated, "f_min_date_created", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<DateTime>(maxDateCreated, "f_max_date_created", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(minRatio, "f_min_ratio", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Int32>(maxRatio, "f_max_ratio", ref firstOcc, data);
+                PwgProxyReponseHelper.buildQueryFromValue<Boolean>(withThumbnail, "f_with_thumbnail", ref firstOcc, data);
 
                 response = PwgGenericProxy<PwgImagesProxyResponse>.Post(
@@ -151,7 +108,7 @@
 
         }
-        static public PwgTagsProxyResponse pwg_tag_add(string tagName)
+        static public PwgAddRequestProxyResponse pwg_tag_add(string tagName)
         {
-            PwgTagsProxyResponse response = null;
+            PwgAddRequestProxyResponse response = null;
             try
             {
@@ -160,5 +117,5 @@
                 data.Append("&name=" + HttpUtility.UrlEncode(tagName));
 
-                response = PwgGenericProxy<PwgTagsProxyResponse>.Post(
+                response = PwgGenericProxy<PwgAddRequestProxyResponse>.Post(
                     PwgConfigProxy.PwgServeurUriBuilder.Uri,
                     data.ToString());
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgAddRequestProxyResponse.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgAddRequestProxyResponse.cs	(revision 3834)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgAddRequestProxyResponse.cs	(revision 3834)
@@ -0,0 +1,20 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Serialization;
+using Com.Piwigo.Lib.DTO;
+
+namespace Com.Piwigo.Lib.Proxy.Response
+{
+    [Serializable()]
+    [XmlRoot(ElementName = "rsp")]
+    public class PwgAddRequestProxyResponse : PwgBaseProxyReponse
+    {
+        [XmlElement(ElementName="info")]
+        public String Message { get; set; }
+        [XmlElement(ElementName = "id")]
+        public Int32 NewId { get; set; }
+
+    }
+}
Index: /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgCategoriesProxyResponse.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgCategoriesProxyResponse.cs	(revision 3833)
+++ /extensions/PiwigoLib/PiwigoLib/Proxy/Response/PwgCategoriesProxyResponse.cs	(revision 3834)
@@ -9,22 +9,28 @@
 {
     [Serializable()]
-    [XmlRoot(ElementName = "categories")]
+    [XmlRoot(ElementName = "category")]
     public class PwgCategoryProxyResponse
     {
         [XmlAttribute(AttributeName = "id")]
         public Int32 Id { get; set; }
-        [XmlAttribute(AttributeName = "name")]
+        [XmlElement(ElementName = "uppercats")]
+        public String UpperCategoryId { get; set; }
+        [XmlElement (ElementName = "name")]
         public String Name { get; set; }
-        [XmlAttribute(AttributeName = "url_name")]
-        public String UrlName { get; set; }
-        [XmlAttribute(AttributeName = "counter")]
-        public Int64 Counter { get; set; }
         [XmlAttribute(AttributeName = "url")]
-        public String UrlTag { get; set; }
+        public String Url { get; set; }
+        [XmlAttribute(AttributeName = "nb_images")]
+        public Int64 ImagesCount { get; set; }
+        [XmlAttribute(AttributeName = "total_nb_images")]
+        public Int64 DeepImagesCount { get; set; }
+        [XmlAttribute(AttributeName = "nb_categories")]
+        public Int64 SubCategoriesCount { get; set; }
+        [XmlAttribute(AttributeName = "max_date_last")]
+        public String LastDate { get; set; }
     }
 
     [Serializable()]
     [XmlRoot(ElementName = "rsp")]
-    public class PwgcategoriesProxyResponse : PwgBaseProxyReponse
+    public class PwgCategoriesProxyResponse : PwgBaseProxyReponse
     {
         [XmlArray("categories")]
Index: /extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs	(revision 3834)
+++ /extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs	(revision 3834)
@@ -0,0 +1,201 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+using Com.Piwigo.Lib.DTO;
+using Com.Piwigo.Lib.Proxy;
+using Com.Piwigo.Lib.Proxy.Response;
+using Com.Piwigo.Lib.DTO.Helper;
+
+namespace Com.Piwigo.Lib.Service
+{
+
+    static public class PwgCategoriesService
+    {
+        /// <summary>
+        /// Get the list of category the user is connected can access
+        /// </summary>
+        /// <param name="sortedByCounter"></param>
+        /// <returns></returns>
+        static public List<PwgCategory> GetListOfCategory(Int32? CatgeroryId, Boolean? Recursive, Boolean? PublicOnly)
+        {
+            List<PwgCategory> returnValue = new List<PwgCategory>();
+
+            try
+            {
+                PwgCategoriesProxyResponse response = PwgCategoriesProxy.pwg_categories_getList(CatgeroryId, Recursive, PublicOnly);
+
+                if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok)
+                {
+                    if (response.Erreur != null)
+                    {
+                        throw new PwgServiceException("GetListOfCategory, the server has return the error.",
+                            response.Erreur.Code,
+                            response.Erreur.Message);
+                    }
+                    else
+                    {
+                        throw new PwgServiceException("GetListOfCategory : a error occurs during server process.");
+                    }
+                }
+                else
+                {
+                    returnValue = ConvertProxyResponseToDTO(response);
+                }
+            }
+            catch (PwgProxyException ex)
+            {
+                throw new PwgServiceException("GetListOfCategory : a error is raised by proxy.", ex);
+            }
+            return returnValue;
+        }
+
+        /// <summary>
+        /// Get List of all Category, must be logged as admin
+        /// </summary>
+        /// <returns></returns>
+        static public List<PwgCategory> GetAdminListOfCategory()
+        {
+            List<PwgCategory> returnValue = new List<PwgCategory>();
+
+            try
+            {
+                PwgCategoriesProxyResponse response = PwgCategoriesProxy.pwg_categories_getAdminList();
+
+                if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok)
+                {
+                    if (response.Erreur != null)
+                    {
+                        throw new PwgServiceException("GetAdminListOfCategory, the server has return the error.",
+                            response.Erreur.Code,
+                            response.Erreur.Message);
+                    }
+                    else
+                    {
+                        throw new PwgServiceException("GetAdminListOfCategory : a error occurs during server process.");
+                    }
+                }
+                else
+                {
+                    returnValue = ConvertProxyResponseToDTO(response);
+                }
+            }
+            catch (PwgProxyException ex)
+            {
+                throw new PwgServiceException("GetAdminListOfCategory : a error is raised by proxy.", ex);
+            }
+            return returnValue;
+        }
+
+        /// <summary>
+        /// Add a Categorie
+        /// </summary>
+        /// <param name="tagName"></param>
+        /// <returns></returns>
+        static public Boolean AddCategory(String categoryName, Int32? upperCatId, ref Int32 newId, ref String messageInfo)
+        {
+            Boolean returnValue = false;
+
+            try
+            {
+                PwgAddRequestProxyResponse response = PwgCategoriesProxy.pwg_categories_add(categoryName, upperCatId);
+
+                if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok)
+                {
+                    if (response.Erreur != null)
+                    {
+                        throw new PwgServiceException("AddTag, the server has return the error.",
+                            response.Erreur.Code,
+                            response.Erreur.Message);
+                    }
+                    else
+                    {
+                        throw new PwgServiceException("AddTag : a error occurs during server process.");
+                    }
+                }
+                else
+                {
+                    returnValue = true;
+                    newId = response.NewId;
+                    messageInfo = response.Message;
+                }
+            }
+            catch (PwgProxyException ex)
+            {
+                throw new PwgServiceException("AddTag : a error is raised by proxy.", ex);
+            }
+            return returnValue;
+        }
+
+        /// <summary>
+        /// private: convert response to dto object
+        /// </summary>
+        /// <param name="response"></param>
+        /// <param name="session"></param>
+        static public List<PwgCategory> ConvertProxyResponseToDTO(PwgCategoriesProxyResponse response)
+        {
+            List<PwgCategory> returnValue = new List<PwgCategory>();
+
+            foreach (PwgCategoryProxyResponse respCat in response.Categories)
+            {
+                returnValue.Add(ConvertProxyResponseToDTO(respCat));
+            }
+
+            return returnValue;
+        }
+
+
+        /// <summary>
+        /// private: convert response to dto object
+        /// </summary>
+        /// <param name="response"></param>
+        /// <param name="session"></param>
+        static public PwgCategory ConvertProxyResponseToDTO(PwgCategoryProxyResponse response)
+        {
+            PwgCategory returnValue = new PwgCategory();
+
+            try
+            {
+                returnValue.Id = response.Id;
+                returnValue.Name = response.Name;
+
+                returnValue.DeepImagesCount = response.DeepImagesCount;
+                returnValue.ImagesCount = response.ImagesCount;
+                returnValue.SubCategoriesCount = response.SubCategoriesCount;
+
+                returnValue.UpperCategoriesId = new List<int>();
+                if (response.UpperCategoryId != null)
+                {
+                    foreach (String stringId in response.UpperCategoryId.Split(','))
+                    {
+                        returnValue.UpperCategoriesId.Add(Int32.Parse(stringId));
+                    }
+                }
+
+                if (response.LastDate != null)
+                {
+                    DateTime tryDate;
+                    if (DateTime.TryParse(response.LastDate, out tryDate))
+                    {
+                        returnValue.LastDate = tryDate;
+                    }
+                }
+
+                if (String.IsNullOrEmpty(response.Url))
+                {
+                    returnValue.Url = null;
+                }
+                else
+                {
+                    returnValue.Url = (new UriBuilder(response.Url)).Uri;
+                }
+            }
+            catch (Exception ex)
+            {
+                throw new PwgServiceException("ConvertProxyResponseToDTO : a error is raised when converting PwgTagProxyResponse.", ex);
+            }
+
+            return returnValue;
+        }
+    }
+}
Index: /extensions/PiwigoLib/PiwigoLib/Service/PwgTagsService.cs
===================================================================
--- /extensions/PiwigoLib/PiwigoLib/Service/PwgTagsService.cs	(revision 3833)
+++ /extensions/PiwigoLib/PiwigoLib/Service/PwgTagsService.cs	(revision 3834)
@@ -18,5 +18,5 @@
         /// <param name="sortedByCounter"></param>
         /// <returns></returns>
-        static public List<PwgTag> GetListOfTag(Boolean sortedByCounter)
+        static public List<PwgTag> GetListOfTag(Boolean? sortedByCounter)
         {
             List<PwgTag> returnValue = new List<PwgTag>();
@@ -94,5 +94,5 @@
         /// <param name="tagName"></param>
         /// <returns></returns>
-        static public Boolean AddTag(String tagName)
+        static public Boolean AddTag(String tagName, ref Int32 newId, ref String messageInfo)
         {
             Boolean returnValue = false;
@@ -100,5 +100,5 @@
             try
             {
-                PwgTagsProxyResponse response = PwgTagsProxy.pwg_tag_add(tagName);
+                PwgAddRequestProxyResponse response = PwgTagsProxy.pwg_tag_add(tagName);
 
                 if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok)
@@ -118,4 +118,6 @@
                 {
                     returnValue = true;
+                    newId = response.NewId;
+                    messageInfo = response.Message;
                 }
             }
Index: /extensions/PiwigoLib/TestPiwigoLib/Form1.cs
===================================================================
--- /extensions/PiwigoLib/TestPiwigoLib/Form1.cs	(revision 3833)
+++ /extensions/PiwigoLib/TestPiwigoLib/Form1.cs	(revision 3834)
@@ -48,13 +48,17 @@
 
                 //List<PwgTag> lstTag = PwgTagsService.GetAdminListOfTag();
-                Int32 Page = 0;
-                Int32 PerPage = 0; 
-                Int32 Count = 0;
 
-                List<PwgImage> lstImg = PwgTagsService.GetListOfImagesFormTags(new List<Int32>() { 1, 7 },
-                    null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
-                    ref Page, ref PerPage, ref Count);
+                //Int32 Page = 0;
+                //Int32 PerPage = 0; 
+                //Int32 Count = 0;
 
-                Console.WriteLine("lstImg : Page " + Page.ToString() + " PerPage " + PerPage);
+                //List<PwgImage> lstImg = PwgTagsService.GetListOfImagesFormTags(new List<Int32>() { 1, 7 },
+                //    null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+                //    ref Page, ref PerPage, ref Count);
+
+                //Console.WriteLine("lstImg : Page " + Page.ToString() + " PerPage " + PerPage);
+
+                List<PwgCategory> lstCat = PwgCategoriesService.GetAdminListOfCategory(); 
+
 
                 sess = PwgSessionService.Logout();
