MicroStrategy ONE

Generating Web Service Client Stubs

This topic provides step-by-step instructions on how to generate classes with the stub code for a set of specified web services in one or more specified programming languages.

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 use a web service that you created using the Web Services Deployment Wizard, you must have specified the version of Axis 2 that is supported for the Web Services Client Stubs Wizard 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 Client Stubs Wizard.


  2. On the first wizard panel, do the following: 

    1. Use the shopping cart to choose the type(s) of client stubs that should be generated: 

      • C# 

      • Java 

      • Visual Basic 

    2. For WSDL URL, enter the URL of the WSDL for the web services for which you want to generate stub code.

      If you used the Web Services Deployment Wizard to create a web service from MicroStrategy tasks, the folder generated by that wizard contains the WSDL for the web service (This folder was saved in the location you specified as the Web Services Deployment Location when you set the MicroStrategy preferences for Web Services.) In this case, you would enter the URL that points to that location.

    3. For Output Location, browse to or enter the path to the folder where the generated code should be saved. 

    4. Click Next. 

  3. The second wizard panel provides a summary of the choices you made on the previous panel—the name of the web service and the language for the stub code. If you need to make a change, click Back. If the choices are correct, click Finish.


  4. A message is displayed indicating whether generation was successful or not. 

    • If there was a problem generating the stub code, an error message is displayed. Possible problems include using an incorrect version of Ant or Axis2, failing to add the ant-contrib-1.0b3.jar file to the Ant lib directory, or having spaces in the CLASSPATH environment variable value. 

    • If generation was successful, a dialog is displayed with the message "Client stubs generated successfully". Click OK.


  5. If generation was successful, one or more files are created based on the programming language you selected. 

    • If you chose C#, one file called <WSDL name>Class.CS is created and saved in the specified output location. This file contains the web services stub code. 

    • If you chose Java, a number of other files are created and saved under src\com\microstrategy\webservices\client\<WSDL name> in the specified output location.

      • <WSDL name>Stub.java

        This Java class contains the web services stub code. 

      • <WSDL name>CallbackHandler.java

        You can use this Java class if you want to do something with the response that you get back from the web services. 

      • <Web Service name>Fault.java

        A number of Java classes, with the format <Web Service name>Fault.java, are created—one for each web service. These files can be used for error handling. Examples include FolderBrowsefault.java or LoginFault.java. 

      • build.xml

        This file is an auto-generated ant build file. 

    • If you chose Visual Basic, one file called <WSDL name>Class.VB is created and saved in the specified output location. This file contains the web services stub code.

  1. You need the appropriate library files in order to compile the client stub code. 

    • If you chose C# or Visual Basic, you need the System.Web.Services reference. 

    • If you chose Java, you need all of the Axis2 library files (that is, all of the JAR files in the Axis2 lib folder).