|
|
@ -58,10 +58,12 @@ public class FirmaServlet extends HttpServlet { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) |
|
|
|
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse |
|
|
|
|
|
|
|
* response) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { |
|
|
|
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, |
|
|
|
|
|
|
|
IOException { |
|
|
|
|
|
|
|
|
|
|
|
String pathInfo = request.getPathInfo().substring(1); |
|
|
|
String pathInfo = request.getPathInfo().substring(1); |
|
|
|
String[] pathArray = StringUtil.split(pathInfo, "/"); |
|
|
|
String[] pathArray = StringUtil.split(pathInfo, "/"); |
|
|
@ -113,10 +115,12 @@ public class FirmaServlet extends HttpServlet { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) |
|
|
|
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse |
|
|
|
|
|
|
|
* response) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { |
|
|
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, |
|
|
|
|
|
|
|
IOException { |
|
|
|
|
|
|
|
|
|
|
|
String pathInfo = request.getPathInfo().substring(1); |
|
|
|
String pathInfo = request.getPathInfo().substring(1); |
|
|
|
String[] pathArray = StringUtil.split(pathInfo, "/"); |
|
|
|
String[] pathArray = StringUtil.split(pathInfo, "/"); |
|
|
@ -163,7 +167,8 @@ public class FirmaServlet extends HttpServlet { |
|
|
|
if (pathArray.length == 3) { |
|
|
|
if (pathArray.length == 3) { |
|
|
|
String tipo = pathArray[1]; |
|
|
|
String tipo = pathArray[1]; |
|
|
|
String idFile = pathArray[2]; |
|
|
|
String idFile = pathArray[2]; |
|
|
|
JSONDeserializer<Map<String, String>> jsonDeserializer = JSONFactoryUtil.createJSONDeserializer(); |
|
|
|
JSONDeserializer<Map<String, String>> jsonDeserializer = JSONFactoryUtil |
|
|
|
|
|
|
|
.createJSONDeserializer(); |
|
|
|
Map<String, String> map = jsonDeserializer.deserialize(token); |
|
|
|
Map<String, String> map = jsonDeserializer.deserialize(token); |
|
|
|
|
|
|
|
|
|
|
|
ServiceContext serviceContext = null; |
|
|
|
ServiceContext serviceContext = null; |
|
|
@ -173,7 +178,8 @@ public class FirmaServlet extends HttpServlet { |
|
|
|
_log.error(e.getMessage()); |
|
|
|
_log.error(e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
risposta = firmaPostUtil.setFile(map.get("token"), map.get("file"), tipo, idFile, serviceContext); |
|
|
|
risposta = firmaPostUtil.setFile(map.get("token"), map.get("file"), tipo, idFile, |
|
|
|
|
|
|
|
serviceContext); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|