5 Replies Latest reply on Jul 19, 2011 5:31 AM by itsChris

    Adding Distribution Package using WebService (MBSDK?)

    Rookie

      We need to find a way to:

       

      - Add distribution package (various types)

      - Create and schedule tasks

       

      to a LANDesk 9.0 SP2 Instance using a Visual Studio (.NET Framework 2.0+). We found out, that there is a MBSDK (Message Based SDK).

      We successfully added various URI's as service references to a VS.NET Project, but we don't know where to get further/detailed informations about how to access these services.

       

      Help's really appreciated!

       

      Christian

        • 1. Re: Adding Distribution Package using WebService (MBSDK?)
          Rookie

          Hello Christian,

           

          first of all. Use the framewok 3.5. this framewok besser better supported for xml.

           

          you must implentant only one Url: http://<coreserver>/MBSDKService/MsgSDK.asmx

          Use the the tool WSDL.exe from the Visual Studio for creating a MBSDK.cs file (okay we use C#.NET, I don't what creating for VB.NET)

          Add this file to your Project.

          Here a code snippet for creating a ScheduleProvisioningTask

                              string uri = "http://CORESERVER/MBSDKService/MsgSDK.asmx";
                              CredentialCache MyCredentialCache = new System.Net.CredentialCache();
                              MyCredentialCache.Add(new System.Uri(uri), "NTLM", new System.Net.NetworkCredential(USERNAME, PASSWORD, DOMAIN));
                              MBSDK jep = new MBSDK();
                              jep.Credentials = MyCredentialCache;
                              DateTime dt = DateTime.Now.AddMinutes(1);
                              Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                              dt.ToString("d");
                              String format = "dd/MM/yyyy hh:mm:ss";
                              string StartTaskTime = dt.ToString(format);
                              jep.ScheduleProvisioningEx("_" + GlobalOSName + "_" + Computername + "_" + oDomain + "_" + MyMyUserName, GlobalTaskID, DateTime.Now.ToShortDateString().ToString() + " " + DateTime.Now.AddMinutes(1).ToLongTimeString().ToString(), "\"Computer\".\"Device Name\" = \"" + Computername + "\"", null, "Required installation");
                              

          I hope it will help....

          Thomas

          1 of 1 people found this helpful
          • 2. Re: Adding Distribution Package using WebService (MBSDK?)
            Rookie

            Hi Thomas

             

            Thanks a lot for your answer and the provided sample source code!

            The code helps us on scheduling tasks.. in order to be able to schedule a task, we need to add the packages first.. do you know if the WebService has such a operation/method implemented? obvisously there must be a way of adding packages, since the console.exe does that (and i don't think the console communicates directly with the database!?) and also the WebConsole (/remote) provides the functionality of adding packages..  It's just pretty difficult to find any documentation.. in general!

             

            Help's really appreciated!!

             

            regards,

             

            Christian

            • 3. Re: Adding Distribution Package using WebService (MBSDK?)
              EMiranda Expert

              itsChris wrote:

               

              do you know if the WebService has such a operation/method implemented? obvisously there must be a way of adding packages, since the console.exe does that (and i don't think the console communicates directly with the database!?) and also the WebConsole (/remote) provides the functionality of adding packages..  It's just pretty difficult to find any documentation.. in general!

               

              Help's really appreciated!!

               

              regards,

               

              Christian

               

               

              http://localhost/MBSDKService/MsgSDK.asmx?op=ScheduleDistribution

               

              ScheduleDistribution


              ScheduleDistribution will create a scheduled task, add machines or queries as targets and schedule the task. The start time must be in the "10/31/2005 12:00:00 AM" format. An empty start time creates an unscheduled job. To start the job immediately use "start now" as the start time. Recurring can be "Day", "Week", "Month" or blank for a non-recurring task.Reserved must be set to empty.

               

               

              you can find everything the MBSDK can do by going here: http://localhost/MBSDKService/MsgSDK.asmx

               

              Lots of descriptions.  But i havn't found a manual yet. 

              • 4. Re: Adding Distribution Package using WebService (MBSDK?)
                ProServices

                Hi,

                I believe there is a Manual, but it is only available if the SDK is purchased - Which I guess dates back to the time when the MBSDK was not installed by default - so pre LPM days. I know.. that didn't help, but it might clarify :-)

                Regards

                Ian

                • 5. Re: Adding Distribution Package using WebService (MBSDK?)
                  Rookie

                  Hi Ian

                   

                  Thanks for your answer, even it does not help me a lot

                   

                  cheers,

                  Christian