DX Unified Infrastructure Management

  • 1.  Nimsoft Security when calling probe callbacks from a Java app

    Posted Oct 21, 2010 02:06 PM

    Hi Everyone,

     

    I've been trying to use the NimRequest API in Java and have found that only callbacks with an ACL or 0 (Read) work, otherwise I get a "(6) permission denied" Exception.

     

    So as expected I need to authenticate, but I don't seem to be able to find a way or any examples of how to do this other than a command line

     

    pu -u administrator -p xxxxxxxx /enterprise/hub/robot/controller maint_until for 120 until ""

     

    This is my code so far, can any one assist?

    ---------------------------------------------------------------------

    package adrianTest
    import com.nimsoft.nimbus.*;

    public class setMaint
    {

     public static void main(String[] args)
     {
      try
      {
       setMaint setMaintVar = new setMaint();
       setMaintVar.start(args);
      }
      catch(Exception e)
      {
       e.printStackTrace();
      }
     }

     public void start(String[] args) throws Exception
     {
      PDS params = new PDS();
      params.putInt("for",120);
             
      NimRequest request = new NimRequest("controller","maint_until",params);
      PDS output = request.send();
     }
    }

    ---------------------------------------------------------------------



  • 2.  Re: Nimsoft Security when calling probe callbacks from a Java app

    Posted Oct 21, 2010 02:27 PM

    Hi Adrian,

     

    Try adding something like:

     

            try {
                NimUserLogin.login(user,pass);
            } catch (Exception e) {
                System.out.println("Failed to Log In");
                System.exit(1);
            }

     

    Regards,

    Richard



  • 3.  Re: Nimsoft Security when calling probe callbacks from a Java app

    Posted Oct 21, 2010 02:57 PM

    Beautiful thanks, worked like a treat :smileyhappy:

     

    Look's like the Java API SDK Doco is a bit short of some of the available Nimsoft class definitions!!

     

    All the best

    Adrian



  • 4.  Re: Nimsoft Security when calling probe callbacks from a Java app

    Posted Oct 21, 2010 05:04 PM

    I seem to recall a customer had this very problem a couple of years back. I would have hoped that the Java API documentation would have been updated so that it is complete and accurate by now. Can you open a support case on this?