跳转到主要内容

单击提交则表示您同意developerWorks 的条款和条件。 查看条款和条件.

当您初次登录到 developerWorks 时,将会为您创建一份概要信息。您在 developerWorks 概要信息中选择公开的信息将公开显示给其他人,但您可以随时修改这些信息的显示状态。您的姓名(除非选择隐藏)和昵称将和您在 developerWorks 发布的内容一同显示。

所有提交的信息确保安全。

  • 关闭 [x]

当您初次登录到 developerWorks 时,将会为您创建一份概要信息,您需要指定一个昵称。您的昵称将和您在 developerWorks 发布的内容显示在一起。

昵称长度在 3 至 31 个字符之间。 您的昵称在 developerWorks 社区中必须是唯一的,并且出于隐私保护的原因,不能是您的电子邮件地址。

单击提交则表示您同意developerWorks 的条款和条件。 查看条款和条件.

所有提交的信息确保安全。

  • 关闭 [x]

Rational Portfolio Manager 7.1.0.0 入门:使用 Web Services API 集成

Cobber Liu (cobberliu@ca.ibm.com), 开发人员, IBM
>Cobber Liu 目前是 Concordia 大学计算机科学的在职研究生,他攻读软件工程硕士。他作为合作学生在 20006 年 1 月加入 IBM RPM Web Services 团队,同时完成了计算机科学学士学位。他最近作为开发人员加入 RPM Web Services API 团队,并从事 Rational Portfolio Manager 7.1.0.0 发布。

简介: 本文是介绍如何利用 Web Services API 在 IBM® Rational® Portfolio Manager 中集成数据的系列文章的开篇。IBM Rational Portfolio Manager 是将您所有的跨整个企业的项目、人和优先权都自动化的企业级项目组合管理解决方案。通过这些文章及它们所提供的代码示例,您将逐步了解如何完成集成,以便您可以构建您自己的特有的集成接口。

发布日期: 2007 年 9 月 26 日
级别: 中级
访问情况 : 1128 次浏览
评论: 


必备条件

注意:本文中所有的代码示例都用 Web Services API 的 Rational Portfolio Manager 7.0.3.3 版本测试过了。

下面罗列出 Rational Portfolio Manager/Web Services API 配置和入门安装的必要条件。

  1. Rational Portfolio Manager 数据库必须在 DB2® 或 Oracle® 的支持版本上运行。
  2. Rational Portfolio Manager web 应用服务器必须在以下任意的支持的应用服务器版本上安装并配置:
  • WebSphere® 5.1 或 6.0
  • WebLogic® 8.1.5.0
  • Apache Tomcat™ 5.0 或 5.5
  • Oracle 9i 或 10g
  1. 下面与 Rational Portfolio Manager 相关的 ear 文件必须在应用服务器上打开并运行。
  • Rational Portfolio Manager 中间件:IBMRPM.ear
  • Rational Portfolio Manager Web Services:rpm-web-services.ear
  1. Rational Portfolio Manager Web Services API Client 安装必须在安装了 Rational Portfolio Manger web 应用程序的同一个应用服务器上部署。

注意:查阅本文末尾参考资源部分中罗列出的 ResourcesRational Portfolio Manager Web Services API Guide 的章节 2、3 和 4,获得安装、配置,及部署 Web Services API 的详细指导。此文档的最新版本可以从 Rational Portfolio Manager Product 的支持页上获得。要获得此文档,单击下载部分中的所有 Rational Portfolio Manager 下载,选择 IBM Rational Portfolio Manager 的最新版本,并下载适合您需求的最新的下载包


引言

本文向您展示了所有集成的基本步骤:

  1. 如何配置对应用服务器的连接
  2. 如何利用 Rational Portfolio Manager Web Services API 开始

注意:将此文档作为所有其他集成文档的开始参考点进行查阅。


利用 Web Services API 配置到应用服务器的连接

您必须首先创建 properties 文件,然后配置以下变量,利用 Web Services API 连接应用服务器。

  • RPM_URL
  • RPM_USERNAME
  • RPM_PASSWORD
  • RPM_DSN

属性文件
                
# RPM Web Services URL
RPM_URL = http://localhost:9080/rpm/services/

# The user name which is used in RPM client
RPM_USERNAME = administrator

# The password of the user
RPM_PASSWORD = ibm

# The data source name
RPM_DSN = jdbc/RPMDATASOURCE


Rational Portfolio Manager —— 主要方法

以下部分是利用 Web Services API 开始 Rational Portfolio Manager 集成所必需的主要方法。

  • 登入 Rational Portfolio Manager
  • 获得应用程序接口
  • 退出 Portfolio Manager

参见下一个部分中的代码示例,了解每个方法的详细情况。

登入过程创建了包含一些信息的有效的会话 ID,Web 服务使用这些信息,通过在不必须每次重复授权的情况下使用事务来确定客户端用户。要完成这些,Web 服务在登录时为客户端用户分配了会话 ID,该会话 ID 直到客户端向 Authenticate 服务发出登出请求以终止会话之前一直有效。


代码示例

以下代码示例将令您浏览每个基本步骤和主要方法的详细情况。


代码示例
                
package samples;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;
import java.util.Properties;

import javax.xml.rpc.ServiceException;

import com.ibm.rpm.framework.RPMException;
import com.ibm.rpm.interfaces.Application;
import com.ibm.rpm.interfaces.ApplicationServiceLocator;
import com.ibm.rpm.interfaces.Authenticate;
import com.ibm.rpm.interfaces.AuthenticateServiceLocator;

public class IntegrationCommonFunctionality
{
    /**
     * application interface
     */
    private static Application applicationInterface = null;

    /**
     * url of the application service
     */
    private static String urlApplication;

    /**
     * application service locator
     */
    private static ApplicationServiceLocator appServiceLocator 
    = new ApplicationServiceLocator();

    /**
     * authenticate interface
     */
    private static Authenticate authenticate = null;

    /**
     * url of the authenticate service
     */
    private static String urlAuthenticate;

    /**
     * authenticate service locator
     */
    private static AuthenticateServiceLocator authServiceLocator 
    = new AuthenticateServiceLocator();

    /**
     * The user name which is used in RPM client.
     */
    private static String userName;

    /**
     * The password of the user.
     */
    private static String password;

    /**
     * The data source name.
     */
    private static String dsn;
    
    /**
     * Set the variables using the configuration property file.
     */
    static 
    {
        // Open the property file
        // if the file is not,found, exceptions are thrown
        Properties properties = new Properties();
        try
        {
            properties.load(new FileInputStream(".\\src\\samples\\config.property"));
        }
        catch (FileNotFoundException e)
        {
            e.printStackTrace();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }

        // Set the variables using the property file
        urlApplication = properties.getProperty("RPM_URL") + "Application";
        urlAuthenticate = properties.getProperty("RPM_URL") + "Authenticate";
        userName = properties.getProperty("RPM_USERNAME");
        password = properties.getProperty("RPM_PASSWORD");
        dsn = properties.getProperty("RPM_DSN");
    }

    /**
     * Log into RPM server
     * 
     * @return Session ID which will be used during the integration.
     * @throws MalformedURLException
     * @throws ServiceException
     * @throws RPMException
     * @throws RemoteException
     */
    public static String login() throws MalformedURLException,
            ServiceException, RPMException, RemoteException
    {
        String sessionID = null;

        // get Authenticate service interface
        authenticate = authServiceLocator.getAuthenticate(new URL(
            urlAuthenticate));

        // login to RPM server
        sessionID = authenticate.login(userName, password, dsn);

        return sessionID;
    }

    /**
     * Log out from RPM server.
     * 
     * @param sessionID
     * @throws RPMException
     * @throws RemoteException
     */
    public static void logout(String sessionID) throws RPMException,
            RemoteException
    {
        authenticate.logout(sessionID);
    }

    /**
     * Get ApplicationInterface for further operations.
     * @return ApplicationInterface
     * @throws MalformedURLException
     * @throws ServiceException
     */
    public static Application getApplicationInterface()
            throws MalformedURLException, ServiceException
    {
        if (applicationInterface == null)
        {
            applicationInterface = appServiceLocator.getApplication(new URL(
                urlApplication));
        }

        return applicationInterface;
    }
}



下载

描述名字大小下载方法
PDF file of referencei1167610.pdf13,001KBHTTP

关于下载方法的信息          Get Adobe® Reader®


参考资料

学习

获得产品和技术

讨论

关于作者

>Cobber Liu 目前是 Concordia 大学计算机科学的在职研究生,他攻读软件工程硕士。他作为合作学生在 20006 年 1 月加入 IBM RPM Web Services 团队,同时完成了计算机科学学士学位。他最近作为开发人员加入 RPM Web Services API 团队,并从事 Rational Portfolio Manager 7.1.0.0 发布。

关于报告滥用的帮助

报告滥用

谢谢! 此内容已经标识给管理员注意。


关于报告滥用的帮助

报告滥用

报告滥用提交失败。 请稍后重试。


developerWorks:登录


需要一个 IBM ID?
忘记 IBM ID?


忘记密码?
更改您的密码

单击提交则表示您同意developerWorks 的条款和条件。 使用条款

 


当您初次登录到 developerWorks 时,将会为您创建一份概要信息。您在 developerWorks 概要信息中选择公开的信息将公开显示给其他人,但您可以随时修改这些信息的显示状态。您的姓名(除非选择隐藏)和昵称将和您在 developerWorks 发布的内容一同显示。

请选择您的昵称:

当您初次登录到 developerWorks 时,将会为您创建一份概要信息,您需要指定一个昵称。您的昵称将和您在 developerWorks 发布的内容显示在一起。

昵称长度在 3 至 31 个字符之间。 您的昵称在 developerWorks 社区中必须是唯一的,并且出于隐私保护的原因,不能是您的电子邮件地址。

(长度在 3 至 31 个字符之间)


单击提交则表示您同意developerWorks 的条款和条件。 使用条款.

 


为本文评分

评论

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=10
Zone=Rational, SOA and web services
ArticleID=258279
ArticleTitle=Rational Portfolio Manager 7.1.0.0 入门:使用 Web Services API 集成
publish-date=09262007
author1-email=cobberliu@ca.ibm.com
author1-email-cc=rhalden@us.ibm.com

标签

Help
使用 搜索 文本框在 My developerWorks 中查找包含该标签的所有内容。

使用 滑动条 调节标签的数量。

热门标签 显示了特定专区最受欢迎的标签(例如 Java technology,Linux,WebSphere)。

我的标签 显示了特定专区您标记的标签(例如 Java technology,Linux,WebSphere)。

使用搜索文本框在 My developerWorks 中查找包含该标签的所有内容。热门标签 显示了特定专区最受欢迎的标签(例如 Java technology,Linux,WebSphere)。我的标签 显示了特定专区您标记的标签(例如 Java technology,Linux,WebSphere)。