Package org.springside.examples.showcase.ws.server

Examples of org.springside.examples.showcase.ws.server.UserWebService


    //将Inteceptor加入factory
    proxyFactory.getOutInterceptors().add(wss4jOut);

    //生成clientProxy
    UserWebService userWebService = (UserWebService) proxyFactory.create();

    //调用UserWebService
    GetAllUserResult result = userWebService.getAllUser();
    assertTrue(result.getUserList().size() > 0);
  }
View Full Code Here


  /**
   * 测试明文密码, 用<jaxws:client/>创建的Client.
   */
  @Test
  public void getAllUserWithPlainPassword() {
    UserWebService userWebService = (UserWebService) applicationContext.getBean("userServiceWithPlainPassword");
    GetAllUserResult result = userWebService.getAllUser();
    assertTrue(result.getUserList().size() > 0);
  }
View Full Code Here

  /**
   * 测试访问与SpringSecurity结合的EndPoint, 调用受SpringSecurity保护的方法, 用<jaxws:client/>创建的Client.
   */
  @Test
  public void getUserWithSpringSecurity() {
    UserWebService userWebService = (UserWebService) applicationContext.getBean("userServiceWithSpringSecurity");
    GetUserResult result = userWebService.getUser("1");
    assertEquals("admin", result.getUser().getLoginName());
  }
View Full Code Here

  /**
   * 测试访问没有与SpringSecurity结合的EndPoint, 调用受SpringSecurity保护的方法, 用<jaxws:client/>创建的Client.
   */
  @Test(expected = SOAPFaultException.class)
  public void getUserWithSpringSecurityWithoutPermission() {
    UserWebService userWebService = (UserWebService) applicationContext.getBean("userServiceWithPlainPassword");
    GetUserResult result = userWebService.getUser("1");
    assertEquals("admin", result.getUser().getLoginName());
  }
View Full Code Here

TOP

Related Classes of org.springside.examples.showcase.ws.server.UserWebService

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.