4 Replies Latest reply on Aug 25, 2010 7:31 AM by 793338

    Upload zip to the OSB from the API

      Im trying to upload zip file to the admin server from java code using the API.

      i get an error "cannot create resource outside of the session"

      the upload code:

      ALSBConfigurationMBean alsbSession = ..... (Get the Service...)
      SEssionManagementMBean sessionMgr =.....(Get the Service...)

      String sessionName = "Temp_session";
      Byte[] zipFile = GetTheContent();
      Ref ref = Location();

      BulkImportResult result = alsbSession.importZip(ref,zipFile,null);

      And it's not working , the result is failed no exception is thrown

      i checked the before the import method
      alsbSession.GetSessions() and it return null

      how can i create the session to upload the zip ?