예제 #1
0
  public Response sendTestMessage(LdapConnectionInfoDTO resource) throws IOException {

    XStreamRepresentation representation = new XStreamRepresentation(xstream, "", mediaType);

    String serviceURI = RequestFacade.SERVICE_LOCAL + "ldap/test_auth";

    LdapConnectionInfoResponse repoResponseRequest = new LdapConnectionInfoResponse();
    repoResponseRequest.setData(resource);

    // now set the payload
    representation.setPayload(repoResponseRequest);

    LOG.debug("sendMessage: " + representation.getText());

    return RequestFacade.sendMessage(serviceURI, Method.PUT, representation);
  }
  public Response sendMessage(Method method, LdapUserAndGroupConfigurationDTO resource)
      throws IOException {

    XStreamRepresentation representation = new XStreamRepresentation(xstream, "", mediaType);

    String serviceURI = SERVICE_PART;

    LdapUserAndGroupConfigurationResponse repoResponseRequest =
        new LdapUserAndGroupConfigurationResponse();
    repoResponseRequest.setData(resource);

    // now set the payload
    representation.setPayload(repoResponseRequest);

    LOG.debug("sendMessage: " + representation.getText());

    return RequestFacade.sendMessage(serviceURI, method, representation);
  }