Step by step procedure for building Excel client using Developer
Building an Excel Client For invoking a service:
We can execute wM service from a MS Excel spreadsheet by generating client code .
For to create Excel Client we have ensure about below points:
- webMethods Integration Server is running.
- Excel 97 or Excel 2000 is installed.
- webMethods Type Library is installed. ( The webMethods Type Library is a COM object that Visual Basic uses to interact with webMethods Integration Server. The webMethods Type Library is automatically installed when you install Developer).
We have some limitations with Excel client code:
- The client code that Developer generates only supports input values of type String
and output values of type String, String list, and String table.
- The client code that Developer generates does not support multiple input or output
variables with the same name.
- When Developer generates client code, Developer replaces any space in a variable
name with an underscore.
If we want to override these limitations, we will need to modify the client code that Developer generates.
Procedure for Developer generate Excel client code :
Use the following procedure to have Developer generate Excel client code that invokes a service.
Step 1: Open the service for which you want to generate client code.
Step 2 : On the Tools menu, click Generate Code.
Step 3 : In the Code Generation dialog box, select For calling this service from a client, and click
Step 4 : In the Language field, select Excel 97/2000, and click Next.
Step 5 : Identify the directory where you want Developer to place the generated client code.
Either select an existing directory or type the path for a new directory. If you type the
path for a new directory, Developer creates the directory.
Step 6 : Click Finish.
Developer generates several files(BAS and CLS Files), including the serviceNameReadMe.txt file. This file contains detailed information about all generated files.
Step 7 : Copy the wmXLTemplate.xls file that Developer provides to the directory that
contains the client code that Developer generated. The wmXLTemplate.xls file is located in the Developer_directorysupportExcel directory.
Step 8 : Open the wmXLTemplate.xls file. When prompted to indicate whether you want to enable macros, select Enable Macros.
Step 9 : Follow the instructions in the wmXLTemplate.xls file to complete your client
application. See the ServiceNameReadMe.txt file for information about deploying your client application.
The files that are Developer generated for an Excel client application:
File Name and Description
ServiceNameReadMe.txt A file that contains information and instructions for the Visual Basic client code. Refer to this file for information about deploying your Visual Basic client application.
ServiceName.bas An example file that illustrates how to use the service class in a spreadsheet. This module is dependent on objects in the project template that Developer provides. It is not intended for use âas isâ in custom applications.
ServiceName.cls The service object. You include this object into your own project.
Instructions in the wmXLTemplate.xls file :
- Make sure you are editing a copy of wmXLTemplate.xls and not the original one.
- Press Alt-F11 to open Visual Basic for Application.
- Press Control-M to import a file. Import the generated CLS and BAS files.
- Enabling Macros
- Choose Reference from the Tool menu. Scroll down and add âwebMethods 6 Type Libraryâ
- Choose Compile VBA Project from the Debug menu.
- Return to this page.
- Click button âGenerate Sheetâ.
- On the new page,type in the input values.
- Click Invoke.
- The result data will appear on the same page.
You can change the inputs and click invokes to run the service again.