1 2 Previous Next 18 Replies Latest reply on Apr 23, 2014 2:35 AM by Laurent Matheo Branched to a new discussion.

    How to authenticate in Remedy using Java

      Share This:

      I need to authenticate myself in Remedy. I'm following the documentation, but I still getting some errors.https://communities.bmc.com/docs/DOC-17514

      This is my code:

       

      import com.bmc.arsys.api.ARServerUser;
      import com.bmc.arsys.api.ARException;
      
      
      public class Remedy {
      
      
           public static void main(String[] args) {
      
      
             String serverName = "http://127.0.0.1:8080/arsys";
             String userName = "myuser";
             String userPassword = "";
      
             ARServerUser ctx = new ARServerUser();
             ctx.setServer(serverName);
             ctx.setUser(userName);
             ctx.setPassword(userPassword);
      
             try {
                  ctx.login();
                  System.out.println("Authentication:" + ctx.getAuthentication());
                  System.out.println("CacheID:" + ctx.getCacheId());
                  ctx.logout();
             } catch (ARException ex) {
                  System.out.println(ex);
             }
      
        }
      }
      
      
      
      
      
      
      

       

      I'm receiving this error:

      ERROR (90): Cannot establish a network connection to the AR System server; Connection timed out: connect http://127.0.0.1:8080/arsys

      How can I fix that? My Remedy instance is arsys.

      I can authenticate using the browser: http://127.0.0.1:8080/arsys

      Thanks in advance.

        1 2 Previous Next