Package org.apache.xmlrpc.server

Examples of org.apache.xmlrpc.server.XmlRpcServer


      if (!DEBUG)
      {
        webServer.getXmlRpcServer().setWorkerFactory(new XmlRpcWorkerFactoryDestecs(webServer.getXmlRpcServer()));
      }
      XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer();

      PropertyHandlerMapping phm = new AnnotedPropertyHandlerMapping(); // new PropertyHandlerMapping();

      phm.addHandler(ICoSimProtocol.class.getName(), CoSimImpl.class);

      xmlRpcServer.setHandlerMapping(phm);

      XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) xmlRpcServer.getConfig();
      serverConfig.setEnabledForExtensions(true);
      serverConfig.setContentLengthOptional(false);
      serverConfig.setEnabledForExceptions(true);

      webServer.start();
View Full Code Here


  protected ClientProviderImpl(XmlRpcHandlerMapping pMapping) {
    mapping = pMapping;
  }

  protected XmlRpcServer getXmlRpcServer() throws Exception {
    XmlRpcServer server = new XmlRpcServer();
    server.setHandlerMapping(mapping);
    return server;
  }
View Full Code Here

    return config;
  }

  protected void initWebServer() throws Exception {
    if (!isActive) {
      XmlRpcServer server = webServer.getXmlRpcServer();
      server.setHandlerMapping(mapping);
      XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) server.getConfig();
      serverConfig.setEnabledForExtensions(true);
      serverConfig.setContentLengthOptional(!contentLength);
            serverConfig.setEnabledForExceptions(true);
      webServer.start();
      isActive = true;
View Full Code Here

  protected ServletWebServerProvider(XmlRpcHandlerMapping pMapping, boolean pContentLength) throws ServletException, IOException {
    super(pMapping);
    contentLength = pContentLength;
    servlet = new XmlRpcServlet();
    webServer = new ServletWebServer(servlet, 0);
    XmlRpcServer server = servlet.getXmlRpcServletServer();
    server.setHandlerMapping(mapping);
    XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) server.getConfig();
    serverConfig.setEnabledForExtensions(true);
    serverConfig.setContentLengthOptional(!contentLength);
        serverConfig.setEnabledForExceptions(true);
    webServer.start();
    port = webServer.getPort();
View Full Code Here

            +   "<value>one</value></member>"
            + "</struct></value></param>"
            + "</params></methodCall>";
        assertEquals(expect, got);

        XmlRpcServer server = new XmlRpcServer();
        XmlRpcServerConfigImpl serverConfig = new XmlRpcServerConfigImpl();
        serverConfig.setEnabledForExtensions(true);
        server.setConfig(serverConfig);
        XmlRpcRequestParser parser = new XmlRpcRequestParser(serverConfig, new TypeFactoryImpl(server));
        SAXParserFactory spf = SAXParserFactory.newInstance();
        spf.setValidating(false);
        spf.setNamespaceAware(true);
        XMLReader xr = spf.newSAXParser().getXMLReader();
View Full Code Here

            + "<methodCall><methodName>DateConverter.tomorrow</methodName>"
            + "<params><param><value><dateTime.iso8601>" + format.format(cal1.getTime())
            + "</dateTime.iso8601></value></param></params></methodCall>";
        assertEquals(expect, got);
       
        XmlRpcServer server = pProvider.getServer();
        server.setTypeFactory(getCustomDateTypeFactory(server, format));
        Date date = (Date) client.execute(request);
        Calendar cal2 = Calendar.getInstance();
        cal2.setTime(date);
        cal1.add(Calendar.DAY_OF_MONTH, 1);
        assertEquals(cal1, cal2);
View Full Code Here

    return config;
  }

  protected void initWebServer() throws Exception {
    if (!isActive) {
      XmlRpcServer server = webServer.getXmlRpcServer();
      server.setHandlerMapping(mapping);
      XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) server.getConfig();
      serverConfig.setEnabledForExtensions(true);
      serverConfig.setContentLengthOptional(!contentLength);
      webServer.start();
      isActive = true;
    }
View Full Code Here

  protected ServletWebServerProvider(XmlRpcHandlerMapping pMapping, boolean pContentLength) throws ServletException, IOException {
    super(pMapping);
    contentLength = pContentLength;
    XmlRpcServlet servlet = new XmlRpcServlet();
    webServer = new ServletWebServer(servlet, 0);
    XmlRpcServer server = servlet.getXmlRpcServletServer();
    server.setHandlerMapping(mapping);
    XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) server.getConfig();
    serverConfig.setEnabledForExtensions(true);
    serverConfig.setContentLengthOptional(!contentLength);
    webServer.start();
    port = webServer.getPort();
   }
View Full Code Here

  {
    System.out.println("XMLRPCServer:");
    try
    {
      _server = new WebServer(PowerPakConfig.XMLRPC_PORT, InetAddress.getByName(PowerPakConfig.XMLRPC_HOST));
      XmlRpcServer xmlServer = _server.getXmlRpcServer();
      PropertyHandlerMapping phm = new PropertyHandlerMapping();
      xmlServer.setHandlerMapping(phm);
      int numServices = 0;
      try
      {
        L2Properties p = new L2Properties("config/powerpak/xmlrpc.service");
        for(Object s : p.keySet())
        {
          String service = p.getProperty(s.toString());
          Class<?> clazz = Class.forName(service);
          if(clazz != null)
          {
            numServices++;
            phm.addHandler(s.toString(), clazz);
          }

        }
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }

      if(numServices > 0)
      {
        XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) xmlServer.getConfig();
        serverConfig.setEnabledForExtensions(true);
        serverConfig.setContentLengthOptional(false);
        _server.start();
        System.out.println("...Listen on " + PowerPakConfig.XMLRPC_HOST + ":" + PowerPakConfig.XMLRPC_PORT + ", " + numServices + " service(s) avaliable");
      }
View Full Code Here

    public PyUnitServer(PythonRunnerConfig config, ILaunch launch) throws IOException {
        initializeDispatches();
        port = SocketUtil.findUnusedLocalPorts(1)[0];
        SocketUtil.checkValidPort(port);
        this.webServer = new WebServer(port);
        XmlRpcServer serverToHandleRawInput = this.webServer.getXmlRpcServer();
        serverToHandleRawInput.setHandlerMapping(new XmlRpcHandlerMapping() {

            public XmlRpcHandler getHandler(String handlerName) throws XmlRpcNoSuchHandlerException, XmlRpcException {
                return handler;
            }
        });
View Full Code Here

TOP

Related Classes of org.apache.xmlrpc.server.XmlRpcServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.