How to invoke a LANDesk MBSDK method using a HTTP POST

Version 4
    DESCRIPTION

     

    The LANDesk MBSDK has many methods that normally are invoked through an application (Service Consumer) that generally sends a SOAP message to them.

    These methods are generally invokable even using the POST method.

    This is quite useful because sometime the customer wants to build only a simple HTML page with a form to invoke a particular method without spending time and resources to create a .NET application to consume the web service.

     

    SOLUTION

     

    Basically the POST method of the form need to be used.
    The URL to submit is generally in this way:


    http://<core>/MBSDKService/MsgSDK.asmx/<name of the method>

     

    In this example we are trying to invoke the method AddDeviceToScheduledTask

     

     

    <html>
    <head>
    <title>My Page</title>
    </head>
    <body>
    <form name="myform" action="http://localhost/MBSDKService/MsgSDK.asmx/AddDeviceToScheduledTask" method="POST">
    <div align="center">
    <br><br>
    <input type="text" size="25" value="taskId" name="taskId"><br>
    <input type="text" size="25" value="deviceName" name="deviceName"><br>
    <br><input type="submit" value="Submit to MBSDK"><br>
    </div>
    </form>
    </body>
    </html>
    

     

    To know exactly the parameters required by the method browse to http://<core>/MBSDKService/MsgSDK.asmx and click on the method you want to invoke.

    You will see a short description of it, a test form (if you browse from the core) and the parameters needed to invoke (the HTTP POST syntax is the latest one).