This quick start guides you through the steps to create and test a widget locally, then remotely upload the widget to IBM® InfoSphere® MashupHub.
You then publish it to IBM Lotus® Mashups. It is good practice to develop and test against a locally-installed Lotus Mashups server before exporting to a remote server. Follow the steps in this document if you are unable to install a local Lotus Mashups server, or when you are done testing locally and ready to publish to a remote Lotus Mashups server.
IBM WebSphere Portlet Factory works in conjunction Lotus Mashups to create the widgets that become part of the mashups page. Typically, developers create the widgets on their local systems, publish them, and test them locally. However, in some cases, developers work in an environment where they do not have the resources to run a local Lotus Mashups server or perhaps multiple members of the development team must publish widgets to a common Lotus Mashups server. When local development and testing is done, the team publishes the newly-created widgets to a remote server. The remote server’s function could be as a production server, an integration server, or quality assurance server.
WebSphere Portlet Factory installs an IBM WebSphere Application Server Community Edition (CE) application server. WebSphere Application Server CE is an open source Java 2 Platform, Enterprise Edition (J2EE) application server based on Apache Geronimo. WebSphere Application Server CE provides lightweight testing capabilities for WebSphere Portlet Factory. You can test and run the widgets in this environment.
In some development environments, many users must have access to a common server. As WebSphere Portlet Factory is integrated with Lotus Mashups and InfoSphere MashupHub, it supports publishing widgets to a remote server.
The process of creating a widget that is useful in creating mashups involves the use of multiple products.
- WebSphere Portlet Factory
- Create the widget in WebSphere Portlet Factory.
- Run and test against a locally installed Lotus Mashups server if possible. If not, then test on the locally installed WebSphere Application Server CE.
- Export a production WAR file.
- InfoSphere MashupHub
- Upload the WAR file as an iWidget package file through the InfoSphere MashupHub
- From the details page of the widget in the InfoSphere MashupHub, choose Add to Lotus Mashups to publish the widgets to the Lotus Mashups server and publish the widget to the Lotus Mashups Toolbox.
- Lotus Mashups
Setting up a Mashup Server Configuration
Follow these steps to setup a Mashup server.
- Click on Windows -> Preferences
- Select WebSphere Portlet Factory Designer -> Server Configurationsfrom the tree
- Click the Add button.
- Enter a name for your Server Configuration
- In the Server type drop down select WebSphere Application Server and IBM Mashup Server 2.0
- Enter the hostname of your server. If your Mashup server is local, hellp locatlhost. If you are running Mashup Center remotely enter a full DNS host name. In most cases the SOAP Connector Port can remain 8880.
Note: If the soap connector port is not correct you can check the SOAP port of your server by accessing the Admin Console. In the admin console select Servers/Server Types/WebSphere Application Servers. Select server1 from the list then select Ports. You will see your Soap connector Address listed here.
- Enter a User Name and Password that has administrative access to Mashup Center.
- Click the Test Connection button to validate your entries.
- Click OK to save the Server Configuration
If you are deploying to a remote Mashup Center you will want to map a drive to the InstalledApps folder on the server to take advantage of the Auto Synchronize feature. If you do not setup a mapped drive you will need to Publish your project for running it to see your changes.
From WebSphere Portlet Factory create a widget
Create a widget.
- Create a WebSphere Portlet Factory project.
- Go to File -> New -> WebSphere Portlet Factory Project.
- Enter a name for the widget in the Project name field.
- Click Next.
- Under Integration Extensions select Widget Extension and Excel Extension.
- Click Next.
- Select the Server Configuration you want to use when publishing the project.
- Click Finish.
- Click Yes when asked to publish the project.
- In the project, create a Model.
- Go to File -> New -> WebSphere Portlet Factory Model .
- Select the project for which you want to create the model.
- Click Next.
- Select the model type. In this case, select Excel Widget.
- Click Next.
- Enter the widget title and select the Mashups Toolbox category under which you want the widget to appear. Next.
- Optionally, enter the paging settings. Click Next.
- Optionally, enter the column settings. Click Next
- Optionally enter the Details Page settings. Click Next
- Enter the model name and click Finish.
- Run and modify the widget locally until you are satisfied.
- Right-click on the Project name. Go to Export and select the correct WAR for your environment.
- Click Finish. WebSphere Portlet Factory creates the WAR file in your workspace. The widget must be in a package file that is located on an accessible file path or on a URL, either locally or on a common sever. To publish to Lotus Mashups, the package file must be a WAR.
From InfoSphere MashupHub upload the widget
Follow these steps to upload the widget to the InfoSphere MashupHub.
- On the InfoSphere MashupHub Home tab, in the Create panel, click on Upload Widget.
- From the Upload Widget tab
- Select the type of widget you want to upload, in this case iWidgets. Click Next.
- Select Upload File. The package file must be a WAR file
- Specify the location of the widget package file.
- Click Next.
- Specify the following information about the widget you are uploading:
- Specify a title, a description, and a version for the widget.
- Optionally, specify tags that are associated with your widget. You can use the list of existing tags as a guide for the tags that you apply.
- Optionally, select the permissions that you want to apply to your widget.
- Optionally select the categories that you want the widget to be associated with. The categories provide a general classification for the widget.
- Optionally, in the Related Entries section, specify the objects in the catalog that can be used with the widget you are uploading.
- Optionally, specify the URL to any technical documentation for the widget.
- Click Finish. A confirmation appears indicating that the widget was saved. The widget is now listed in the InfoSphere MashupHub catalog and available to other users as indicated by the permissions you selected in step c.
- From the widget uploaded tab or from your widget tab if you closed the finished page and came back through the list widgets link:
- Click View iWidget details. The widget details are displayed. This Window also contains an Action menu lets you add the widget directly to Lotus Mashups.
- Click Actions -> Add to Lotus Mashups.
- Enter the User ID and the password to access the Lotus Mashups server.
- Click Next.
- Enter the title and description of the widget to be added to Lotus Mashups.
- Select the category of the widget. The category appears on the Toolbox of the Lotus Mashups page. All the widgets that were defined in the WAR appear in the same category with the model names.
- Click Finish.
From Lotus Mashups build your mashup
- Login to Lotus Mashups to check if the widget appears under the specified category in the Toolbox.
Note: If you are already logged into , you must log out and log in again. The only time that Lotus Mashups refreshes the toolbox is at login.
- Test the widget on the Lotus Mashups palette to see if it performs as expected.
- If the widget requires modification, it is recommended that you return to the developer environment to modify the widget.
- Create a new Production WAR.
- Remove the old WAR from InfoSphere MashupHub using the WebSphere Application Server admin console.
- Republish the revised WAR file to InfoSphere MashupHub.
- Delete the old widget from Lotus Mashups toolbox.
- From InfoSphere MashupHub push the revised widget to Lotus Mashups.
Parent topic: Tutorials for IBM WebSphere Portlet Factory: wpf7