Websphereでのアプリケーションはcews(wsi)方式でfilenet ceに接続/ログインする


接続filenet ceはejbとwebserviceの2つの方法で、次はwsです.
一、websphereアプリケーションサーバの設定
セキュリティ-セキュリティ管理、アプリケーションおよびインフラストラクチャ-java認証および認可サービス-アプリケーションログイン-新規FileNet 8 WSIエイリアスおよびFileNet 8 WSI固定書き方- JAASログインモジュール-新規com.filenet.api.util.WSIloginModule-ログインモジュールエージェントを使用したカスタム属性-新規name:delegate value:com.filenet.api.util.WSILoginModule
注意:FileNetP 8 WSIはjaas.conf.wsiのFileNetP 8 WSIで、webserviceで接続するという意味です.
FileNetP8 {     com.filenet.api.util.WSILoginModule required; }; FileNetP8WSI {     com.filenet.api.util.WSILoginModule required; }; FileNetP8Engine {     com.filenet.api.util.WSILoginModule required; }; FileNetP8Server {     com.filenet.api.util.WSILoginModule required; };
下のも使えます.実は同じです.FileNetP 8 WSIのようにすればいいです.
jaas.conf.WebSphere
FileNetP8 {     com.ibm.ws.security.common.auth.module.WSLoginModuleImpl required; }; FileNetP8WSI {     com.filenet.api.util.WSILoginModule required; }; FileNetP8Engine {     com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required         delegate=com.ibm.ws.security.common.auth.module.WSLoginModuleImpl; }; FileNetP8Server {     com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required         delegate=com.ibm.ws.security.common.auth.module.WSLoginModuleImpl; }; FileNetP8KerberosService {     com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required         delegate=com.filenet.engine.authentication.kerberos.login.KrbServiceLoginModule;     com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required         delegate=com.ibm.ws.security.server.lm.ltpaLoginModule;     com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy required         delegate=com.ibm.ws.security.server.lm.wsMapDefaultInboundLoginModule; }; Credentials {     com.idoox.security.jaas.GSSLoginModule required debug=true; }; ReceivedCredentials {     com.idoox.security.jaas.GSSLoginModuleNoAuth required debug=true; }; HttpCredentials {     com.idoox.security.jaas.HttpLoginModule required debug=true; }; KrbCredentials {     com.ibm.security.auth.module.Krb5LoginModule required debug=false credsType=both; }; CachedKrbCredentials {     com.ibm.security.auth.module.Krb5LoginModule required debug=false useDefaultCcache=true; }; NamePasswordNoAN {     com.idoox.security.jaas.NamePasswordLoginModuleNoAuth required debug=true; }; NamePasswordAN {     com.idoox.security.jaas.NamePasswordLoginModule required debug=true; }; NameDigestAN {     com.idoox.security.jaas.NameDigestLoginModule required debug=true; }; NameMapping {     com.idoox.security.jaas.NameLoginModuleNoAuth required debug=true; }; CertsMapping {     com.idoox.security.jaas.CertsLoginModule required debug=true; };
二、接続コード
具体的には貼らないで、主に下の
System.setProperty("wasp.location", location); System.setProperty("java.security.auth.login.config", location+"/jaas.conf.WSI"); System.setProperty("filenet.pe.bootstrap.ceuri", url);
Subject m_Subject = UserContext.createSubject(m_Connection, username, password, "FileNetP8WSI");
FileNetP 8 WSIで、上と同じです.
これで続きがいいです.ははは、楽しかったです.
次は検索した資料も貼っておきましょう
1、Setting Up a Thin Client Application Development Environment Using CEWS Transport
http://publib.boulder.ibm.com/infocenter/p8docs/v4r5m1/index.jsp?topic=%2Fcom.ibm.p8.doc%2Fdeveloper_help%2Fcontent_engine_api%2Fguide%2Fgs_concepts_setup_thin_client_cews_transport.htm
2、java call filenet ejb api
http://blog.csdn.net/hyhbyl/article/details/6858305
3、FileNet_ecm_helpにおけるDeveloper Help>Content Engine Development>Java and.NET Developer's Guide>Geting Started>Concepts>Setting up a Thick Client Development
CEWS transport protocol (non-application-server dependent)
When setting up a thick client development machine using the CEWS protocol, the following tasks are required.
NOTE  Examples assume a default directory of C:\Program Files. If your directory structure is not the default, modify the path in the examples to reflect your directory structure.
  • After the Content Engine client installation is performed, make sure the following JAR files are installed on the client machine: Jace.jar, log4j.jar, and wasp.jar (for Systinet). After a client installation, these files should be in the following locations:
  • For Systinet JAR files: C:\Program Files\FileNet\ContentEngine\wsi\lib
  • For Java API and log4j JAR files: C:\Program Files\FileNet\ContentEngine\lib

  • (See Required Java Archive (JAR) Files for more information.)
  • Set the wasp.location property, specifying the directory in which Systinet WASP is installed, as shown in the example below: java -Dwasp.location=C:\Program Files\FileNet\ContentEngine\wsi
  • Specify the FileNetP8WSI login module for JAAS. (Note that you can use the FileNetP8WSI default stanza, which is bundled with the Jace.jar.) You can accomplish this task in one of the two ways described below.
  • Add the FileNetP8WSI stanza to a JAAS configuration file and specify a JVM command line argument pointing to the file, as shown in the example below: Here is the stanza that must exist in the JAAS configuration file: FileNetP8WSI {     com.filenet.api.util.WSILoginModule required; }; Here is the command line argument you provide to the JVM that tells the system which JAAS configuration file to use: -Dwasp.security.auth.login.config=C:\jaas.conf and then use "FileNetP8WSI"in the constructor of the LoginContext JAAS class.
  • Call UserContext.createSubject with a stanza name of "FileNetP8WSI":
    Subject subject = UserContext.createSubject(connection, "userid", "password","FileNetP8WSI");
    UserContext uc = UserContext.get();
    uc.pushSubject(sub);
    try
    {
            // your code here
    }
    finally
    {
            uc.popSubject();
    }