MicroStrategy ONE

Converting Tasks to a Web Service

This topic provides step-by-step instructions on deploying one or more tasks as a web service.

Before you use this wizard, you must have configured the Web Services preferences when you deployed the Web Customization Editor plug-in. If you plan to generate a web services stub class using the Web Services Client Stubs Wizard, you must convert tasks to a web service using the version of Axis 2 that is supported for the Web Services Client Stubs Wizard. You specify the version of Axis 2 when you set the preference for the Axis2 Location. Refer to the MicroStrategy SDK Readme for the currently supported version of Axis 2.

  1. Launch the Web Services Deployment Wizard

  2. In the Available Tasks pane, select one or more MicroStrategy tasks and use the >> button to move then to the Tasks Bundled with this Web Service pane. 

  3. When you have finished selecting tasks, click Next

  4. If you selected multiple tasks, choose one of the tasks from the Please select a task drop-down and follow steps 5 - 7. 

  5. For Task Alias, accept or enter the name that you want to use for this operation within the web service. Choose a name that will be meaningful for users of this web service operation. For example, you might change the browseElements task to the chooseAttribute operation. 

  6. In the Parameters list box, select a parameter and configure the following information: 

    1. For Parameter Alias, accept or enter the name that you want to use for the parameter. Choose a name that will be meaningful for users of this web service operation. For example, you might change the attributeID parameter to the Region or Category parameter. 

    2. For Parameter Type, select from the following choices—String, Boolean, Decimal, Float, Double, Duration, DateTime, Time, or Date. 

    3. If you want the operation to be exposed to users, check the Exposed check box. Because all required tasks must be exposed, this check box is checked and disabled for required tasks. 

    4. If you want to automatically use the default value for a task, check the Use Default check box. This check box is enabled only if the task is not required and a default value does exist for the task. When you check the Use Default check box, the Exposed check box is automatically cleared. 

  7. For the Return Value, choose the value that will be returned by the operation. Select from the following choices for what the task will return:

    • Void

      The task returns nothing. 

    • Markup

      The task returns HTML, XML, or JSON.

      If you choose Markup, specify whether or not to allow users to change the content type. If you want users to be able to change this value, check the Expose content type as web service parameter check box. 

      These are the same choices that exist for the task content type associated with the task envelope on the Builder page of the Task Administrator application.

    • Block

      The task attempts to return the value as a block of content

      If you chose Block, you must also specify the following:

      • Path
        Specify where you want the parameter (property) tobe placed within the block. 

      • Type
        Choose the type of content that is being returned—String, Boolean, or Integer.

  8. If you selected multiple tasks and want to modify information for another task, return to step 4. Otherwise, click Next

  9. For Web Service name, enter the name for the web service you are creating. 

  10. For Web Service description, enter the description for the web service you are creating. 

  11. Click Next

  12. Review the summary of information for the web service that you are creating and click Finish

  13. Save your changes. 

A folder with the name of your new web service is created in the location you specified as the Web Services Deployment Location when you set the MicroStrategy preferences for Web Services. This folder contains all of the files needed to run the web service. You can use the Web Services Client Stubs Wizard to generate a class with stub code that uses the web service you created.

See also: