Package org.springframework.remoting.httpinvoker

Examples of org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean.afterPropertiesSet()


   
    final HttpInvokerProxyFactoryBean factoryBean = new HttpInvokerProxyFactoryBean();

    factoryBean.setServiceInterface(Browsable.class);
    factoryBean.setServiceUrl("http://localhost:8888/bobo-service/services/BrowseService");
    factoryBean.afterPropertiesSet();

    final Browsable svc = (Browsable) (factoryBean.getObject());

    int numThreads = 1;
   
View Full Code Here


        // Set up the Spring bean to call into the URL specified for the consumer endpoint
        HttpInvokerProxyFactoryBean pfb = new HttpInvokerProxyFactoryBean();
        pfb.setServiceInterface(Person.class);
        pfb.setServiceUrl("http://localhost:8192/service/");
        pfb.setHttpInvokerRequestExecutor(new SimpleHttpInvokerRequestExecutor());
        pfb.afterPropertiesSet();

        // Grab the object via the proxy factory bean
        Person test = (Person) pfb.getObject();

        // Test getters
View Full Code Here

    {
      HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
      httpInvokerProxyFactoryBean.setServiceUrl(serverAdress + "copperMonitoringService");
      httpInvokerProxyFactoryBean.setServiceInterface(LoginService.class);
      httpInvokerProxyFactoryBean.setServiceUrl(serverAdress + "loginService");
      httpInvokerProxyFactoryBean.afterPropertiesSet();
      httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(httpInvokerRequestExecutor);
      loginService = (LoginService) httpInvokerProxyFactoryBean.getObject();
    }

    final String sessionId;
View Full Code Here

      httpInvokerProxyFactoryBean.setServiceInterface(CopperMonitoringService.class);
      RemoteInvocationFactory remoteInvocationFactory = secureConnect ?
          new SecureRemoteInvocationFactory(sessionId) : new DefaultRemoteInvocationFactory();
      httpInvokerProxyFactoryBean.setRemoteInvocationFactory(remoteInvocationFactory);
      httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(httpInvokerRequestExecutor);
      httpInvokerProxyFactoryBean.afterPropertiesSet();
      final CopperMonitoringService copperMonitoringService = (CopperMonitoringService) httpInvokerProxyFactoryBean.getObject();

      final String serverAdressFinal = serverAdress;
      Platform.runLater(new Runnable() {
        @Override
View Full Code Here

    {
        ComplexData cd = new ComplexData("Foo", new Integer(13));
        HttpInvokerProxyFactoryBean invoker = new HttpInvokerProxyFactoryBean();
        invoker.setServiceInterface(WorkInterface.class);
        invoker.setServiceUrl(SPRING_HTTP_ENDPOINT);
        invoker.afterPropertiesSet();
        WorkInterface worker = (WorkInterface)invoker.getObject();
        ComplexData data = worker.executeComplexity(cd);
        assertNotNull(data);
        assertEquals(data.getSomeString(), "Foo Received");
        assertEquals(data.getSomeInteger(), new Integer(14));
View Full Code Here

    ServletContext ctx = config.getServletContext();
    _appCtx = WebApplicationContextUtils.getRequiredWebApplicationContext(ctx);
    final HttpInvokerProxyFactoryBean factoryBean = new HttpInvokerProxyFactoryBean();
    factoryBean.setServiceInterface(ZoieSearchService.class);
    factoryBean.setServiceUrl("http://localhost:8888/zoie-perf/services/SampleZoieService");
    factoryBean.afterPropertiesSet();
    _searchSvc = (ZoieSearchService) factoryBean.getObject();
  }
   
  public SearchResult search(SearchRequest req)
  {
View Full Code Here

  public static void main(String[] args) throws Exception{
    final HttpInvokerProxyFactoryBean factoryBean = new HttpInvokerProxyFactoryBean();

      factoryBean.setServiceInterface(ZoieSearchService.class);
      factoryBean.setServiceUrl("http://localhost:8888/zoie-perf/services/ZoieService");
      factoryBean.afterPropertiesSet();

      final ZoieSearchService svc = (ZoieSearchService) (factoryBean.getObject());
     
      SearchRequest req = new SearchRequest();
     // req.setQuery("java");
View Full Code Here

    {
      HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
      httpInvokerProxyFactoryBean.setServiceInterface(LoginService.class);
      httpInvokerProxyFactoryBean.setServiceUrl(LOGIN_SERVICE);
      httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(new CommonsHttpInvokerRequestExecutor());
      httpInvokerProxyFactoryBean.afterPropertiesSet();
      LoginService loginService = (LoginService)httpInvokerProxyFactoryBean.getObject();
      sessionId = loginService.doLogin("user1", "pass1");
    }
 
    {
View Full Code Here

      final HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
      httpInvokerProxyFactoryBean.setServiceInterface(CopperMonitoringService.class);
      httpInvokerProxyFactoryBean.setServiceUrl(COPPER_MONITORING_SERVICE);
      httpInvokerProxyFactoryBean.setRemoteInvocationFactory(new SecureRemoteInvocationFactory(sessionId));
      httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(new CommonsHttpInvokerRequestExecutor());
      httpInvokerProxyFactoryBean.afterPropertiesSet();
     
     
      CopperMonitoringService copperMonitorService = (CopperMonitoringService)httpInvokerProxyFactoryBean.getObject();
      assertNotNull(copperMonitorService);
      try {
View Full Code Here

    {
      HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
      httpInvokerProxyFactoryBean.setServiceInterface(LoginService.class);
      httpInvokerProxyFactoryBean.setServiceUrl(LOGIN_SERVICE);
      httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(new CommonsHttpInvokerRequestExecutor());
      httpInvokerProxyFactoryBean.afterPropertiesSet();
      LoginService loginService = (LoginService)httpInvokerProxyFactoryBean.getObject();
      sessionId = loginService.doLogin("userXXXX", "passXXXX");
      assertNull(sessionId);
    }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.