Package org.fao.geonet.utils

Examples of org.fao.geonet.utils.XmlRequest.addParam()


    if (params.useAccount)
    {
      log.info("Login into : "+ name);

      req.setAddress(servletName +"/srv/en/"+ Geonet.Service.XML_LOGIN);
      req.addParam("username", params.username);
      req.addParam("password", params.password);

      Element response = req.execute();

      if (!response.getName().equals("ok"))
View Full Code Here


    {
      log.info("Login into : "+ name);

      req.setAddress(servletName +"/srv/en/"+ Geonet.Service.XML_LOGIN);
      req.addParam("username", params.username);
      req.addParam("password", params.password);

      Element response = req.execute();

      if (!response.getName().equals("ok"))
        throw new UserNotFoundEx(params.username);
View Full Code Here

      try {
        log.info("Login into : "+ params.name);
        req.setCredentials(params.username, params.password);
                req.setPreemptiveBasicAuth(true);
        req.setAddress(params.getServletPath()+"/srv/eng/xml.info");
                req.addParam("type", "me");

        Element response = req.execute();
        if(!response.getName().equals("info") || response.getChild("me") == null) {
          pre29Login(req);
        } else if(!"true".equals(response.getChild("me").getAttributeValue("authenticated"))) {
View Full Code Here

    log.info("Retrieving information from : "+ params.host);

    req.setAddress(params.getServletPath() +"/srv/en/"+ Geonet.Service.XML_INFO);
    req.clearParams();
    req.addParam("type", "sources");
    req.addParam("type", "groups");

    Element remoteInfo = req.execute();

    if (!remoteInfo.getName().equals("info"))
View Full Code Here

    log.info("Retrieving information from : "+ params.host);

    req.setAddress(params.getServletPath() +"/srv/en/"+ Geonet.Service.XML_INFO);
    req.clearParams();
    req.addParam("type", "sources");
    req.addParam("type", "groups");

    Element remoteInfo = req.execute();

    if (!remoteInfo.getName().equals("info"))
      throw new BadServerResponseEx(remoteInfo);
View Full Code Here

      params = list.get(0);
      req.setRequest(params);
    } else {
      for (int i = 0; i < list.size();i++) {
        Element elem = list.get(i);
        req.addParam(elem.getName(), elem.getText());
      }
    }

    Element result = req.execute();
    return result;
View Full Code Here

    Lib.net.setupProxy(context, req);

    req.setAddress(params.getServletPath() +"/srv/en/"+ Geonet.Service.XML_METADATA_RATE);
    req.clearParams();
    req.addParam("uuid",   uuid);
    req.addParam("rating", rating);

    Element response = req.execute();

    if (!response.getName().equals(Params.RATING))
View Full Code Here

    Lib.net.setupProxy(context, req);

    req.setAddress(params.getServletPath() +"/srv/en/"+ Geonet.Service.XML_METADATA_RATE);
    req.clearParams();
    req.addParam("uuid",   uuid);
    req.addParam("rating", rating);

    Element response = req.execute();

    if (!response.getName().equals(Params.RATING))
      throw new BadServerResponseEx(response);
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.