HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2015-08-07 fa186456dce3d0142c00061d513508627d332c96
initialize ticket validator
3 files modified
33 ■■■■■ changed files
hsarback/conf/WEB-INF/dev-web.xml 8 ●●●●● patch | view | raw | blame | history
hsarback/conf/WEB-INF/prod-web.xml 12 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/remote/HSXmlRpcServlet.java 13 ●●●●● patch | view | raw | blame | history
hsarback/conf/WEB-INF/dev-web.xml
@@ -21,6 +21,14 @@
          <param-name>enabledForExtensions</param-name>
          <param-value>true</param-value>
        </init-param>
          <init-param>
              <param-name>proxyValidateUrl</param-name>
              <param-value>https://@LOGIN_HOST@:@LOGIN_PORT@/cas/proxyValidate</param-value>
          </init-param>
          <init-param>
              <param-name>proxyServiceUrl</param-name>
              <param-value>https://@CONFIG_HOST@:@CONFIG_PORT@/hsar/backend</param-value>
          </init-param>
    </servlet>
    <servlet-mapping>
hsarback/conf/WEB-INF/prod-web.xml
@@ -18,9 +18,17 @@
        <servlet-name>XmlRpcServlet</servlet-name>
        <servlet-class>de.hsadmin.remote.HSXmlRpcServlet</servlet-class>
        <init-param>
          <param-name>enabledForExtensions</param-name>
          <param-value>true</param-value>
            <param-name>enabledForExtensions</param-name>
            <param-value>true</param-value>
        </init-param>
          <init-param>
              <param-name>proxyValidateUrl</param-name>
              <param-value>https://@LOGIN_HOST@:@LOGIN_PORT@/cas/proxyValidate</param-value>
          </init-param>
          <init-param>
              <param-name>proxyServiceUrl</param-name>
              <param-value>https://@CONFIG_HOST@:@CONFIG_PORT@/hsar/backend</param-value>
          </init-param>
    </servlet>
    <servlet-mapping>
hsarback/src/de/hsadmin/remote/HSXmlRpcServlet.java
@@ -1,16 +1,29 @@
package de.hsadmin.remote;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.metadata.XmlRpcSystemImpl;
import org.apache.xmlrpc.server.PropertyHandlerMapping;
import org.apache.xmlrpc.server.XmlRpcHandlerMapping;
import org.apache.xmlrpc.webserver.XmlRpcServlet;
import de.hsadmin.core.model.TicketValidator;
public class HSXmlRpcServlet extends XmlRpcServlet {
    private static final long serialVersionUID = 1L;
    @Override
    public void init() throws ServletException {
        super.init();
        final ServletConfig cfg = getServletConfig();
        final String validateURL = cfg.getInitParameter("proxyValidateUrl");
        final String serviceURL = cfg.getInitParameter("proxyServiceUrl");
        TicketValidator.getInstance().initialize(validateURL, serviceURL);    }
    @Override
    protected XmlRpcHandlerMapping newXmlRpcHandlerMapping()
            throws XmlRpcException {
        XmlRpcHandlerMapping handlerMapping = super.newXmlRpcHandlerMapping();