Révision 96454bcd
Ajouté par Sylvain Sauvage il y a plus de 11 ans
EpcILoN/src/main/java/fr/unicaen/iota/epcilon/test/TestConfiguration.java | ||
---|---|---|
};
|
||
|
||
/**
|
||
* Processes requests for HTTP <code>GET</code> methods.
|
||
* Processes requests for HTTP
|
||
* <code>GET</code> methods.
|
||
*
|
||
* @param request servlet request
|
||
* @param response servlet response
|
||
*/
|
||
... | ... | |
out.println("<form method=\"POST\" action=\"test?action=serviceaddress\" target=\"serviceaddresseframe\"><input type=\"submit\" value=\"Test address\" /></form>");
|
||
out.println("<iframe name=\"serviceaddresseframe\" ></iframe>");
|
||
out.println("<h2>Authentification configuration: </h2>");
|
||
out.println("<div><span class=\"name\">Login: </span><span class=\"param\">" + Configuration.LOGIN + "</span></div>");
|
||
out.println("<div><span class=\"name\">Password: </span><span class=\"param\">" + Configuration.PASS + "</span></div>");
|
||
out.println("<div><span class=\"name\">identity: </span><span class=\"param\">" + Configuration.IDENTITY + "</span></div>");
|
||
out.println("<form method=\"POST\" action=\"test?action=login\" target=\"loginframe\"><input type=\"submit\" value=\"Test login\" /></form>");
|
||
out.println("<iframe name=\"loginframe\" ></iframe>");
|
||
out.println("<h2>Database configuration: </h2>");
|
||
... | ... | |
}
|
||
}
|
||
|
||
@Override
|
||
protected void doPost(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException {
|
||
processAction(req, rsp);
|
||
}
|
||
|
||
@Override
|
||
protected void doGet(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException {
|
||
processRequest(req, rsp);
|
||
}
|
||
|
||
/**
|
||
* Processes requests for HTTP <code>POST</code> methods.
|
||
* Processes requests for HTTP
|
||
* <code>POST</code> methods.
|
||
*
|
||
* @param request servlet request
|
||
* @param response servlet response
|
||
*/
|
||
... | ... | |
out.flush();
|
||
out.println("<br/>");
|
||
} catch (EnhancedProtocolException ex) {
|
||
LOG.error("Impossible de se connecter au DS référant: "+ex.getMessage(), null);
|
||
LOG.error("Impossible de se connecter au DS référant: " + ex.getMessage(), null);
|
||
out.println("<span class=\"error\">[ FAILED ]</span>");
|
||
out.flush();
|
||
out.println("<br/>");
|
||
... | ... | |
out.println("<span class=\"error\">finished: [ ERROR ]</span>");
|
||
out.flush();
|
||
}
|
||
} else if ("login".equals(action)) {
|
||
try {
|
||
out.println("start test login/logout !");
|
||
out.flush();
|
||
out.println("<br/>");
|
||
out.println("<span class=\"name\">executing login operation ... </span>");
|
||
out.flush();
|
||
String sessionId = new DsClient(Configuration.DISCOVERY_SERVICE_ADDRESS).userLogin(fr.unicaen.iota.discovery.client.util.Configuration.DEFAULT_SESSION,Configuration.LOGIN, Configuration.PASS).getSessionId();
|
||
out.println("<span class=\"param\">[ DONE ]</span>");
|
||
out.flush();
|
||
out.println("<br/>");
|
||
out.println("<span class=\"name\">executing logout operation ... </span>");
|
||
out.flush();
|
||
new DsClient(Configuration.DISCOVERY_SERVICE_ADDRESS).userLogout(sessionId);
|
||
out.println("<span class=\"param\">[ DONE ]</span>");
|
||
out.flush();
|
||
out.println("<br/>");
|
||
out.println("<span class=\"name\">finished:</span><span class=\"param\"> [ SUCCEDED ]</span>");
|
||
out.flush();
|
||
out.println("<br/>");
|
||
} catch (Exception e) {
|
||
LOG.error("Impossible de se connecter au DS référant", e);
|
||
out.println("<span class=\"error\">[ FAILED ]</span>");
|
||
out.flush();
|
||
out.println("<br/>");
|
||
out.flush();
|
||
out.println("<span class=\"error\">finished: [ ERROR ]</span>");
|
||
out.flush();
|
||
}
|
||
} else if ("db".equals(action)) {
|
||
out.println("start test DB connection !");
|
||
out.flush();
|
||
... | ... | |
out.flush();
|
||
out.println("<br/>");
|
||
QueryControlClient client;
|
||
StandingQueryCaptureModule captureModule = new StandingQueryCaptureModule();
|
||
try {
|
||
out.println("<span class=\"name\"> Sending subscription to " + Configuration.DEFAULT_QUERY_CLIENT_ADDRESS + "...</span>");
|
||
out.flush();
|
||
client = new QueryControlClient(Configuration.DEFAULT_QUERY_CLIENT_ADDRESS);
|
||
Subscribe subscribe = captureModule.createScheduleSubscribe("SimpleEventQuery", "test",
|
||
Subscribe subscribe = StandingQueryCaptureModule.createScheduleSubscribe("SimpleEventQuery", "test",
|
||
Configuration.DEFAULT_QUERY_CALLBACK_ADDRESS, Configuration.SUBSCRIPTION_TYPE, Configuration.SUBSCRIPTION_VALUE);
|
||
client.subscribe(subscribe);
|
||
LOG.info("Subscription shared");
|
Formats disponibles : Unified diff
Version 1.9-mock
This is version 1.9-mock. 1.9 because the API still have changes pending
(principally relative to the Discovery Services). “mock” because TLS
configuration is not yet available and the signatures (SigMa) are not fully
implemented.
- code cleaned and refactored
- lots of bugs fixed
- dependencies checked and trimmed
- documentation added
- Identity handling added
- code refactored
- new, better APIs
- Identity handling added
- use EPCglobal and DS events (no proxy types anymore)
- ETa-Callback modules are now available as web applications
- filtering rules: if a part of an event is not allowed, now the whole
event is deleted from the result (before only the rejectd part was)
- new temporary User web service
- new Xi module: XACML Interrogation web service (was two modules: TCP and
servlet)
- ETa and its Callback modules
- ActiveMQ
- SigMa
- certificate/signing key
- new simplified figures (sans IoTa and simplified IoTa)
- new figure for ETa modules
- show 3rd party clients
- data flows specified
- TLS and link security added
- IDs and trusted IDs added
- color adjusted for printing
- GREYC logo added