Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

こちらのセクションでは、Webサービスを介したユーザーの作成、操作、および削除方法について紹介します。こちらでは、サードパーティ製アプリケーションでユーザーの変更が行われるとすぐに、Webサービスが呼び出され、ユーザーの変更がミラーリングされることを想定しています。

主なユーザー管理関数

 

Expand
titleADDUSER

こちらの関数は、Yellowfinに新規ユーザーアカウントを作成します。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「ADDUSER」に設定します。

Person

AdministrationPersonユーザー作成プロセスに関する新規ユーザーの詳細のすべてを含むオブジェクトです。以下の表を参照してください。

ユーザー作成プロセスに関する新規ユーザーの詳細のすべてを含むオブジェクトです。以下のを参照してください。

OrgRefString

クライアント組織内部参照IDです(こちらの設定はオプションです)。こちらは、参照されるクライアント組織に新規ユーザーを作成します。こちらを設定しない場合、新規ユーザーはデフォルト(プライマリー)組織内に作成されます。

Anchor
以下の表1
以下の表1
以下は、新規ユーザーを作成するために、「AdministrationPerson」オブジェクトに設定しなくてはいけない必須のパラメーターです。

AdministrationPerson 要素データ型説明

UserId

String

新規ユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

Password

String

新規ユーザーのパスワードです。こちらは、Yellowfinのパスワードポリシーに準拠する必要があります。

FirstName

String

新規ユーザーの名です。

LastName

String

新規ユーザーの姓です。

RoleCode

String

新規ユーザーのロールを設定します。例:YFREPORTCONSUMER

注意:リポジトリデータベースから、Yellowfinのロールコードの一覧を取得することができます。例:SQLクエリーを使用する場合:SELECT * FROM OrgRole

EmailAddress

String

新規ユーザーの電子メールアドレスです。

 

リクエストの例

以下のSOAP XMLの例は、この呼び出しに渡すことのできるパラメーターを表示しています。

theme
Code Block
Eclipselanguagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteAdministrationCall>
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <function>ADDUSER</function>       
            <person>
                <userId>binish.sheikh@yellowfin.com.au</userId>
                <emailAddress>binish.sheikh@yellowfin.com.au</emailAddress>
                <password>admin</password>
                <firstName>Binish</firstName>
                <lastName>Sheikh</lastName>
                <roleCode>YFREPORTCONSUMER</roleCode>
            </person>         
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE

 

応答の例

サービスは、今回のSOAPの例に基づき、以下の応答を返します。

Code Block
themeEclipse
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Creating New User via Webservices...</messages>
            <messages>Creating SessionBean for webservices user...</messages>
            <messages>Looking up user...</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>8090cb7879f7d5e72eab9625772c00b5</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>
 

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • こちらは、Yellowfinの新規ユーザーを作成する基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

    Code Block
    themeEclipse
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("ADDUSER");


  • 特定のクライアント組織に新規ユーザーを作成する場合は、こちらをコードに追加します。

    Code Block
    themeEclipse
    languagejava
    rsr.setOrgRef("org1");      // A new user will be added to the client org with "org1" as an organization reference ID


    orgRefパラメーターを定義しない場合は、新規ユーザーはデフォルト(プライマリー)組織内に作成されます。

 

  • ADDUSER関数は、新規Yellowfinユーザーの詳細を定義するために、AdministrationPersonオブジェクトを要求します。

    Code Block
    themeEclipse
    languagejava
    AdministrationPerson ap = new AdministrationPerson();
  • 新規ユーザーを作成するには、これら必須パラメーターの提供が必要です。:UserId、FirstName、LastName、RoleCode、Password、EmailAddress

    Code Block
    themeEclipse
    languagejava
    ap.setUserId("john.smith@yellowfin.com.au");      // if Yellowfin authentication option is set to "email address"
    ap.setFirstName("John");
    ap.setLastName("Smith");
    ap.setRoleCode("YFREPORTCONSUMER");                // Yellowfin role codes can be found performing this query against
                                                       // Yellowfin configuration database: SELECT * FROM OrgRole
    
    ap.setPassword("test");                              // Password must comply with your Yellowfin password policy
    ap.setEmailAddress("john.smith@yellowfin.com.au");

    AdministrationPersonオブジェクトのその他のパラメーターの設定はオプションです。

 

  • リクエストに「ap」オブジェクトを渡します。

    Code Block
    languagejava
    rsr.setPerson(ap);
  • リクエストを構成したら、呼び出しを実行します。

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

    管理サービスを初期化します。実行方法の詳細は、管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • 返される応答には、StatusCodeパラメーターが含まれます。詳細については、上記の応答パラメーターの表を参照してください。
 

 

完成例

以下は、ADDUSER関数の完成例です。こちらを使用するには、以下の手順に従います。

  1. コードをコピーして、「ws_adduser.jsp」として保存します。
  2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
  4. インターネットブラウザから、「http://<host>:<port>/ws_adduser.jsp」を実行します。

 

Code Block
themeEclipse
languagejava
<%           
/*              ws_adduser.jsp                */
%>
 
 
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
 
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
 
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
 
 
rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web service admin account
rsr.setPassword("test");                           // change this to the password of the above account
rsr.setOrgId(1);
rsr.setFunction("ADDUSER");
 
 
AdministrationPerson ap = new AdministrationPerson();
 
 
ap.setUserId("john.smith@yellowfin.com.au");      // If Yellowfin authentication option is set to "email address"
ap.setFirstName("John");
ap.setLastName("Smith");
ap.setRoleCode("YFREPORTCONSUMER");                // Yellowfin role codes can be found performing this query against
                                                   // Yellowfin configuration database: SELECT * FROM OrgRole
 
ap.setPassword("test");                          // Password must comply with your Yellowfin password policy
ap.setEmailAddress("john.smith@yellowfin.com.au");
rsr.setPerson(ap);
 
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if
("SUCCESS".equals(rs.getStatusCode()) ) {
    out.write("Success");
} else {
    out.write("Failure");
    out.write(" Code: " + rs.getErrorCode());
}
%>
 
Expand
titleADDUSERS

こちらの関数は、一度に複数のユーザーを作成します。ADDUSER関数と類似していますが、こちらの関数はAdministrationPersonオブジェクトの配列を渡すように要求します。こちらの関数は、一度に複数のユーザーを作成します。ADDUSER関数と類似していますが、こちらの関数は、AdministrationPersonオブジェクトの配列を渡すよう要求します。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「ADDUSERS」に設定します。

Person

AdministrationPerson[]

一度に追加されるユーザーの詳細を含むオブジェクト配列です。以下の表を参照してください。一度に追加されるユーザーの詳細を含むオブジェクト配列です。以下のを参照してください。

OrgRefString

クライアント組織内部参照IDです(こちらの設定はオプションです)。こちらは、参照されるクライアント組織に新規ユーザーを作成します。こちらを設定しない場合、新規ユーザーはデフォルト(プライマリー)組織内に作成されます。

Anchor
以下の表2
以下の表2
以下は、新規ユーザーを作成するために、「AdministrationPerson」オブジェクトに設定しなくてはいけない必須のパラメーターです。

AdministrationPerson 要素データ型説明

UserId

String

新規ユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

Password

String

新規ユーザーのパスワードです。こちらは、Yellowfinのパスワードポリシーに準拠する必要があります。

FirstName

String

新規ユーザーの名です。

LastName

String

新規ユーザーの姓です。

RoleCode

String

新規ユーザーのロールを設定します。例:YFREPORTCONSUMER

注意:リポジトリデータベースから、Yellowfinのロールコードの一覧を取得することができます。例:SQLクエリーを使用する場合:SELECT * FROM OrgRole

EmailAddress

String

新規ユーザーの電子メールアドレスです。

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • こちらは、Yellowfinの新規ユーザーを作成する基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

    Code Block
    themeEclipse
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
     
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
     
    rsr.setFunction("ADDUSERS");
  • 特定のクライアント組織に新規ユーザーを作成する場合は、こちらをコードに追加します。

    Code Block
    themeEclipse
    languagejava
    rsr.setOrgRef("org1");


    orgRefパラメーターを定義しない場合は、新規ユーザーはデフォルト(プライマリー)組織内に作成されます。

 

  • 新規Yellowfinユーザーの詳細を定義するために、AdministrationPersonオブジェクトを使用します。

    Code Block
    themeEclipse
    languagejava
    AdministrationPerson[] ap = new AdministrationPerson[2];
  • これらの必須パラメーターを提供することで、最初のユーザーの詳細を追加します。:UserId、FirstName、LastName、RoleCode、Password、EmailAddress

    Code Block
    themeEclipse
    languagejava
    ap[0] = new AdministrationPerson();
    ap[0].setUserId("user1@yellowfin.com.au");        
    ap[0].setFirstName("user1");
    ap[0].setLastName("Lastname1");
    ap[0].setRoleCode("YFREPORTCONSUMER");         
    ap[0].setPassword("test");                                
    ap[0].setEmailAddress("user1@yellowfin.com.au");

    AdministrationPersonオブジェクトのその他のパラメーターの設定はオプションです。

 

  • 同様に、他のユーザーの詳細を提供します。

     

    Code Block
    themeEclipse
    languagejava
    ap[1] = new AdministrationPerson();
    ap[1].setUserId("user2@yellowfin.com.au");        
    ap[1].setFirstName("user2");
    ap[1].setLastName("Lastname2");
    ap[1].setRoleCode("YFREPORTCONSUMER");         
    ap[1].setPassword("test");                                
    ap[1].setEmailAddress("user2@yellowfin.com.au");

    これを、必要なユーザー分繰り返します。

 

  • リクエストに「ap」オブジェクトを渡します。

    Code Block
    languagejava
    rsr.setPeople(ap);
  • リクエストを構成したら、呼び出しを実行します。

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

    管理サービスを初期化します。実行方法の詳細は、管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • 返される応答には、StatusCodeパラメーターが含まれます。詳細については、上記の応答パラメーターの表を参照してください。
 

 

完成例

以下は、ADDUSERS関数の完成例です。今回の例では、デフォルト組織に、user1@yellowfin.com.auとuser2@yellowfin.com.auという2つの新規ユーザーを追加します。

こちらを使用するには、以下の手順に従います。

  1. コードをコピーして、「ws_adduseraddusers.jsp」として保存します。
  2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
  4. インターネットブラウザから、「http://<host>:<port>/ws_adduseraddusers.jsp」を実行します。

 

Code Block
themeEclipse
languagejava
<%           
/*              ws_adduseraddusers.jsp                */
%>
 
 
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
 
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
 
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
 
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
 
 
rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web serviceservices admin account
rsr.setPassword("test");                           // change this to the password of the above account
rsr.setOrgId(1);
rsr.setFunction("ADDUSERADDUSERS");
 
AdministrationPerson[] ap = new AdministrationPerson[2];
 
ap[0] = new AdministrationPerson();
 
 
ap[0].setUserId("john.smith@yellowfinuser1@yellowfin.com.au");      // If Yellowfin authentication option is set to "email address"
ap[0].setFirstName("Johnuser1");
ap[0].setLastName("SmithLastname1");
ap[0].setRoleCode("YFREPORTCONSUMER");         
  ap[0].setPassword("test");    // Yellowfin role codes can be found performing this query against                  
ap[0].setEmailAddress("user1@yellowfin.com.au");
 
ap[1] = new AdministrationPerson();
ap[1].setUserId("user2@yellowfin.com.au");        
ap[1].setFirstName("user2");
                // Yellowfin configuration database: SELECT * FROM OrgRoleap[1].setLastName("Lastname2");
ap[1].setRoleCode("YFREPORTCONSUMER");         
ap[1].setPassword("test");                          // Password must comply with your Yellowfin password
policy
ap[1].setEmailAddress("john.smith@yellowfinuser2@yellowfin.com.au");
 
 
rsr.setPersonsetPeople(ap);
 
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if
("SUCCESS".equals(rs.getStatusCode() ) ) {
    out.write("Success");
} else {
    out.write("Failure");
   
out.write(" Code: " + rs.getErrorCode() );
}
%>
 

以下のコードは、ユーザーを削除するためのYellowfin Webサービスを呼び出します。

AdministrationServiceRequest rsr = new AdminstrationServiceRequest(); AdministrationServiceResponse rs = null; AdministrationPerson person = new AdministrationPerson(); person.setUserId("test@yellowfin
Expand
titleDELUSER / DELETEUSER
Code Block
ADDUSERSIGNOREDUPLICATES

こちらの関数は、重複を追加することなく、一度に複数のユーザーを作成します。ADDUSERS関数と同様に機能しますが、作成しようとしているユーザーのログインIDや電子メールアドレスが既に使用されていたり、パスワードが提供されない場合は、「例外なし」エラーが発生し、ユーザーは作成されません。応答には、追加されなかったユーザーとともに、AdministrationPersonオブジェクトが含まれます。

 

リクエストパラメーター

以下の要素は、こちらのリクエストとともに渡されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

Password

String

上記アカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

Function

String

Webサービス関数です。こちらは、「ADDUSERSIGNREDUPLICATES」に設定します。

Person

AdministrationPerson[]

一度に追加され、重複を検証されるユーザーの詳細を含むオブジェクト配列です。以下のを参照してください。

OrgRefString

クライアント組織内部参照IDです(こちらの設定はオプションです)。こちらは、参照されるクライアント組織に新規ユーザーを作成します。こちらを設定しない場合、新規ユーザーはデフォルト(プライマリー)組織内に作成されます。

Anchor
以下の表3
以下の表3
以下は、新規ユーザーを作成するために、「AdministrationPerson」オブジェクトに設定しなくてはいけない必須のパラメーターです。

AdministrationPerson 要素データ型説明

UserId

String

新規ユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

Password

String

新規ユーザーのパスワードです。こちらは、Yellowfinのパスワードポリシーに準拠する必要があります。

FirstName

String

新規ユーザーの名です。

LastName

String

新規ユーザーの姓です。

RoleCode

String

新規ユーザーのロールを設定します。例:YFREPORTCONSUMER

注意:リポジトリデータベースから、Yellowfinのロールコードの一覧を取得することができます。例:SQLクエリーを使用する場合:SELECT * FROM OrgRole

EmailAddress

String

新規ユーザーの電子メールアドレスです。

 

応答パラメーター

返される応答には、これらのパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE
PeopleAdministrationPerson[]アカウントが作成されなかったユーザーです。

 

手順

Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

Expand
title詳細手順
  • こちらは、Yellowfinの新規ユーザーを作成する基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

    Code Block
    themeEclipse
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
     
    rsr.setLoginId("admin@yellowfin.com.au");
  • 
    rsr.
setLoginId(this.username); rsr.setPassword(this.password
  • setPassword("test");
    rsr.setOrgId
(new Integer
  • (1
)
  • );
     
    rsr.setFunction("
DELUSER
  • ADDUSERSIGNOREDUPLICATES");
  • 特定のクライアント組織に新規ユーザーを作成する場合は、こちらをコードに追加します。

    Code Block
    themeEclipse
    languagejava
    rsr.
setPerson
  • setOrgRef(
person); rs = AdministrationService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); }

このコードは「rs.getStatusCode()で、「SUCCESSを返します。それ以外の場合は、ユーザー削除プロセスが失敗した理由を説明するエラーメッセージを返します。

この関数は、Yellowfinからユーザーを削除します。「AdministrationPerson」オブジェクト内の詳細が、ユーザー削除プロセスで使用されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスへの接続に使用されるアカウントのログインIDです(例:admin@yellowfin.com.au)。

Password

String

Yellowfin Webサービスへの接続に使用されるアカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト組織IDです。常に、「1」に設定します。

Function = “DELUSER”、または“DELETEUSER”

 

Webサービス関数です。

Person

AdministrationPerson

ユーザー削除プロセスに関するユーザー詳細のすべてを保持する、「AdministrationPerso」オブジェクトです。

AdministrationPerson」オブジェクトで設定が必要なパラメーターは、以下の通りです。

AdministrationPerson要素データ型説明

UserId

String

YellowfinユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

返される応答には、以下のパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE

ユーザー情報の取得とテスト

作成されたユーザーの詳細は、Webサービス呼び出しを使用して取得することができます。「AdministrationPerson」オブジェクトのUser IDフィールドは、ユーザーを識別するために使用されます。結果として、投入された「AdministrationPerson」オブジェクトが返されます。セキュリティ上の理由から、パスワードは返されず、「NULLとなります。また、こちらのセクションでは、ユーザー情報をアプリケーションに照らし合わせてテストすることもできます。

Expand
titleGETUSER

以下のコードは、ユーザー詳細を取得するためのYellowfin Webサービスを呼び出します。

Code Block
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETUSER");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
				
out.write("Success");
				
} else {
			
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
				
}

こちらのコードは、ユーザー詳細を含む「AdministrationPerson」オブジェクトを返し、「rs.getStatusCode()で、「SUCCESSを返します。それ以外の場合は、プロセスが失敗した理由を説明するエラーメッセージを返します。

この関数は、Yellowfinの特定ユーザー詳細を取得します。「AdministrationPerson」オブジェクト内の詳細が取得プロセスで使用されます。

リクエスト要素データ型説明

LoginId

String

Yellowfin Webサービスへの接続に使用されるアカウントのログインIDです(例:admin@yellowfin.com.au)。

Password

String

Yellowfin Webサービスへの接続に使用されるアカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト組織IDです。常に、「1」に設定します。

Function = “GETUSER”

 

Webサービス関数です。

Person

AdministrationPerson

取得プロセスに関するYellowfinユーザーのユーザーIDを保持する、「AdministrationPerson」オブジェクトです。

AdministrationPerson」オブジェクトで設定が必要なパラメーターは、以下の通りです。

AdministrationPerson要素データ型説明

UserId

String

YellowfinユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

返される応答には、以下のパラメーターが含まれます。

応答要素データ型説明

StatusCode

String

Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE

Person

AdministrationPerson

返されたユーザー詳細のすべてを保持する、「AdministrationPerson」オブジェクトです。

Expand
titleGETUSERBYIP

以下のコードは、内部IpIdを介してユーザー詳細を取得するための、Yellowfin Webサービスを呼び出します。

Code Block
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setIpId(5);

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETUSERBYIP");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
				
out.write("Success");
				
} else {
			
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
				
}

こちらのコードは、ユーザー詳細を含む「AdministrationPerson」オブジェクトを返し、「rs.getStatusCode()で、「SUCCESSを返します。それ以外の場合は、プロセスが失敗した理由を説明するエラーメッセージを返します。

この関数は、Yellowfinの特定ユーザーのIP IDを検索し、そのユーザーの詳細を取得します。「AdministrationPerson」オブジェクト内の詳細が取得プロセスで使用されます。

リクエスト要素データ型

説明

LoginId

String

Yellowfin Webサービスへの接続に使用されるアカウントのログインIDです(例:admin@yellowfin.com.au)。

Password

String

Yellowfin Webサービスへの接続に使用されるアカウントのパスワードです。

OrgId

Integer

Yellowfin内のデフォルト組織IDです。常に、「1」に設定します。

Function = “GETUSERBYIP”

 

Webサービス関数です。

Person

AdministrationPerson

取得プロセスに関するYellowfinユーザーのユーザーIDを保持する、「AdministrationPerson」オブジェクトです。

AdministrationPerson」オブジェクトで設定が必要なパラメーターは、以下の通りです。

AdministrationPerson要素データ型説明
IP IDInteger|YellowfinユーザーのIP ID

返される応答には、以下のパラメーターが含まれます。

  • "org1");


    orgRefパラメーターを定義しない場合は、新規ユーザーはデフォルト(プライマリー)組織内に作成されます。

 

  • 新規Yellowfinユーザーの詳細を定義するために、AdministrationPersonオブジェクトを使用します。

    Code Block
    themeEclipse
    languagejava
    AdministrationPerson[] ap = new AdministrationPerson[2];
  • これらの必須パラメーターを提供することで、最初のユーザーの詳細を追加します。:UserId、FirstName、LastName、RoleCode、Password、EmailAddress

    Code Block
    themeEclipse
    languagejava
    ap[0] = new AdministrationPerson();
    ap[0].setUserId("user1@yellowfin.com.au");        
    ap[0].setFirstName("user1");
    ap[0].setLastName("Lastname1");
    ap[0].setRoleCode("YFREPORTCONSUMER");         
    ap[0].setPassword("test");                                
    ap[0].setEmailAddress("user1@yellowfin.com.au");

    AdministrationPersonオブジェクトのその他のパラメーターの設定はオプションです。

 

  • 同様に、他のユーザーの詳細を提供します。

     

    Code Block
    themeEclipse
    languagejava
    ap[1] = new AdministrationPerson();
    ap[1].setUserId("user2@yellowfin.com.au");        
    ap[1].setFirstName("user2");
    ap[1].setLastName("Lastname2");
    ap[1].setRoleCode("YFREPORTCONSUMER");         
    ap[1].setPassword("test");                                
    ap[1].setEmailAddress("user2@yellowfin.com.au");

    これを、必要なユーザー分繰り返します。

 

  • リクエストに「ap」オブジェクトを渡します。

    Code Block
    languagejava
    rsr.setPeople(ap);
  • リクエストを構成したら、呼び出しを実行します。

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

    管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

 

  • 返される応答には、StatusCodeとPeopleパラメーターが含まれます。詳細については、上記の応答パラメーターの表を参照してください。

 

  • 追加されなかったユーザーを取得するには、こちらのコマンドを使用します。

    Code Block
    themeEclipse
    languagejava
    AdministrationPerson[] failed_users = rs.getPeople();
expandtitleGETUSERFROMSEARCH

Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

  • SUCCESS
  • FAILURE
    Expand
    titleDELUSER / DELETEUSER

    こちらの関数は、指定されたユーザーをYellowfinから削除します。注意:クライアント組織からユーザーを削除するには、「REMOVEUSERACCESS」の呼び出しを実行します。

     

    リクエスト要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「DELETEUSER」、または「DELUSER」に設定します。

    Person

    AdministrationPerson[]

    削除されるユーザーアカウントの詳細を含むオブジェクトです。以下のを参照してください。

    OrgRefString

    クライアント組織内部参照IDです(こちらの設定はオプションです)。指定したクライアント組織にユーザーをログインさせます。こちらを設定しない場合、ユーザーはログイン先を指定するために、クライアント組織選択ページへ移動します。

    Anchor
    以下の表4
    以下の表4
    以下は、「AdministrationPerson」オブジェクトに設定しなくてはいけないパラメーターです。

    AdministrationPerson 要素データ型説明

    UserId

    String

    削除するユーザーのユーザーIDです。こちらのユーザーは、既にYellowfinインスタンス内に存在していなくてはいけません。

    これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>DELETEUSER</function>       
                <person>
                    <userId>binish.sheikh@yellowfin.com.au</userId>
                </person>         
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE
    Person

     

    AdministrationPerson

    応答の例

    返されたユーザー詳細のすべてを保持する、「AdministrationPerson」オブジェクトです。

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    theme
    Eclipse
    この関数は、特定の検索文字列に基づいて、Yellowfinからユーザーを取得します。この文字列がユーザーの名、姓、および電子メールアドレスと比較されます。
    Expand
    titleCHANGEPASSWORD

    以下のコードは、Yellowfin Webサービスを呼び出し、指定されたYellowfinユーザーのパスワードを変更します。

    Code Block
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    AdministrationServiceResponse rs = null;
    AdministrationPerson person = new AdministrationPerson();
    
    person.setUserId("test@yellowfin.com.au");
    person.setPassword("testtest");
    
    rsr.setLoginId(this.username);
    rsr.setPassword(this.password);
    rsr.setOrgId(new Integer(1));
    rsr.setFunction("CHANGEPASSWORD");
    rsr.setPerson(person);
    
    rs = AdministrationService.remoteAdministrationCall(rsr);
    

    こちらのコードは、「rs.getStatusCode()で「SUCCESSを返します。それ以外の場合は、プロセスが失敗した理由を説明するエラーを返します。

    こちらの関数は、指定されたYellowfinユーザーのパスワードを変更します。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのログインIDです(例:admin@yellowfin.com.au)。

    Password

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト組織IDです。常に、「1」に設定します。

    Function = “CHANGEPASSWORD”

     

    Webサービス関数です。

    Person

    AdministrationPerson

    取得プロセスに関するYellowfinユーザーのユーザーIDを保持する「AdministrationPerson」オブジェクト。

    AdministrationPerson」オブジェクトで、設定が必要なパラメーターは、以下の通りです。

    AdministrationPerson要素データ型説明

    UserId

    String

    YellowfinユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    Password

    String

    Yellowfinユーザーの新規パスワードです。

    返される応答には、以下のパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    language
    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのログインIDです(例:admin@yellowfin.com.au)。

    Password

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト組織IDです。常に、「1」に設定します。

    Function = “GETUSERSFROMSEARCH”

     

    Webサービス関数です。

    Parameters

    Array(String)

    Yellowfinユーザーの名、姓、および電子メールアドレスと照合する検索文字列です。

    返される応答には、以下のパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    People

    Array(AdministrationPerson)

    AdministrationPerson」オブジェクトの配列です。これらのオブジェクトには、検索文字列に一致した、返されたユーザーの詳細が保持されます。

    Expand
    titleVALIDATEUSER

    以下のコードは、ユーザーをテストするためのYellowfin Webサービスを呼び出します。

    Code Block
    AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
    AdministrationServiceResponse rs = null;
    AdministrationPerson person = new AdministrationPerson();
    
    person.setUserId("admin@yellowfin.com.au");
    
    rsr.setLoginId(this.username);
    rsr.setPassword(this.password);
    rsr.setFunction("VALIDATEUSER");
    rsr.setPerson(person);
    
    rs = AdministrationService.remoteAdministrationCall(rsr);
    

    こちらのコードは、成功すると、特定ユーザーの「AdministrationPerson」オブジェクトを返します。それ以外の場合は、ユーザー検証プロセスが失敗した理由を説明するエラーメッセージを返します。

    こちらの関数は、指定されたYellowfinユーザーが、現在アプリケーション内に存在するかどうかを確認してテストします。「AdministrationPerson」オブジェクト内の詳細が、ユーザー検証プロセスで使用されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのログインIDです(例:admin@yellowfin.com.au)。

    Password

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト組織IDです。常に、「1」に設定します。

    Function = “VALIDATEUSER”

     

    Webサービス関数です。

    Person

    AdministrationPerson

    取得プロセスに関するYellowfinユーザーのユーザーIDを保持する、「AdministrationPerson」オブジェクトです。

    AdministrationPerson」オブジェクトで設定が必要なパラメーターは、以下の通りです。

    AdministrationPerson要素データ型説明

    UserId

    String

    YellowfinユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    返される応答には、以下のパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    Person

    AdministrationPerson

    返されたユーザーの詳細すべてを保持する、「AdministrationPerson」オブジェクトです。

    Expand
    titleVALIDATEPASSWORD

    以下のコードは、ユーザーのパスワードをテストするためのYellowfin Webサービスを呼び出します。

    Code Block
    AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
    AdministrationServiceResponse rs = null;
    AdministrationPerson person = new AdministrationPerson();
    
    person.setUserId("testuser@yellowfin.com.au");
    person.setPassword("test");
    
    rsr.setLoginId(this.username);
    rsr.setPassword(this.password);
    rsr.setOrgId(new Integer(1));
    rsr.setFunction("VALIDATEPASSWORD");
    rsr.setPerson(person);
    
    rs = AdministrationService.remoteAdministrationCall(rsr);
    

    こちらのコードは、パスワードの有効期限が切れているかどうかを確認し、有効期限が切れていない場合は、「rs.getStatusCode()で、「FAILUREを返します。それ以外の場合は、「SUCCESSを返します。

    こちらの関数は、Yellowfinユーザーのパスワードをテストします。「AdministrationPerson」オブジェクト内の詳細が、パスワード検証プロセスで使用されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのログインIDです(例:admin@yellowfin.com.au)。

    Password

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト組織IDです。常に、「1」に設定します。

    Function = “VALIDATEUSER”

     

    Webサービス関数です。

    Person

    AdministrationPerson

    取得プロセスに関するYellowfinユーザーのユーザーIDを保持する、「AdministrationPerson」オブジェクトです。

    AdministrationPerson」オブジェクトで設定が必要なパラメーターは、以下の通りです。

    AdministrationPerson要素データ型説明

    UserId

    String

    YellowfinユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    Password

    String

    Yellowfinユーザーのパスワードです。

    返される応答には、以下のパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    ユーザー情報の操作

    ユーザーの詳細は、Webサービスの呼び出しを使用して、後から変更することができます。「AdministrationPerson」オブジェクトの「User ID」フィールドは、ユーザーを識別するために使用されるため、変更することができません。「AdministrationPerson」オブジェクト内のその他のフィールドには、新しい変更内容が投入されます。セキュリティ上の理由から、このWebサービス呼び出しを使用してユーザーのパスワードを変更することはできませんが、個別の「CHANGEPASSWORD」関数(下記)を使用して変更することができます。

    Expand
    titleUPDATEUSER

    以下のコードは、ユーザーの詳細を編集するためのYellowfin Webサービスを呼び出します。

    Code Block
    AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
    AdministrationServiceResponse rs = null;
    AdministrationPerson person = new AdministrationPerson();
    
    person.setUserId("testuser");
    person.setFirstName("John");
    person.setLastName("Doe");
    person.setInitial("F");
    person.setSalutationCode("MR");
    person.setRoleCode("YFADMIN");
    person.setEmailAddress("testuser@yellowfin.com.au")
    
    rsr.setLoginId(this.username);
    rsr.setPassword(this.password);
    rsr.setOrgId(new Integer(1));
    rsr.setFunction("UPDATEUSER");
    rsr.setPerson(person);
    
    rs = AdministrationService.remoteAdministrationCall(rsr);
    

    こちらのコードは、ユーザー詳細を含む「AdministrationPerson」オブジェクトを返し、「rs.getStatusCode()で「SUCCESSを返します。それ以外の場合は、プロセスが失敗した理由を説明するエラーメッセージを返します。

    こちらの関数は、指定されたYellowfinユーザーの詳細を更新します。「AdministrationPerson」オブジェクト内の詳細が更新プロセスで使用されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのログインIDです(例:admin@yellowfin.com.au)。

    Password

    String

    Yellowfin Webサービスへの接続に使用されるアカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト組織IDです。常に、「1」に設定します。

    Function = “UPDATEUSER”

     

    Webサービス関数です。

    Person

    AdministrationPerson

    取得プロセスに関するYellowfinユーザーのユーザーIDを保持する、「AdministrationPerson」オブジェクトです。

    AdministrationPerson」オブジェクトで設定できるパラメーターは、以下の通りです。

    AdministrationPerson要素データ型説明

    UserId

    String

    YellowfinユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    Password

    String

    Yellowfinユーザーのパスワードです。

    FirstName

    String

    Yellowfinユーザーの名です。

    LastName

    String

    Yellowfinユーザーの姓です。

    Initial

    String

    Yellowfinユーザーのミドルネームです。

    SalutationCode

    String

    Yellowfinユーザーの敬称です。値の選択肢は、は以下の通りです。

    • DR
    • MISS
    • MR
    • MRS
    • MS

    RoleCode

    String

    Yellowfinのロールです。こちらで指定するロールは、「参照コード(YFADMIN)」、または「ロール(Yellowfin管理者)」の名前にすることができます。

    EmailAddress

    String

    Yellowfinユーザーの電子メールアドレスです。

    LanguageCode

    String

    優先言語を表す2文字のコードです。

    IpId

    Integer

    内部Yellowfin IP IDです。

    TimeZoneCode

    String

    YellowfinユーザーのTimeZoneCodeです。有効な値については、付録を参照してください。

    StatusString

    ユーザーのステータスを示します。値の選択肢は、以下の通りです。

    • ACTIVE
    • INACTIVE
    • INACTIVEWITHEMAIL

    返される応答には、以下のパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    Person

    AdministrationPerson

    更新されたユーザーの詳細すべてを保持する「AdministrationPerson」オブジェクトです。

    xml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>cc8c2b81d06485fdd20fe4cd24f5f70c</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、この呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("DELETEUSER");
    • 関数は、削除するユーザーの指定に使用するAdministrationPersonオブジェクトを要求するので、ID(例:電子メールアドレスや、その他タイプのIDなど、ログインID方法に応じたID)を提供します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
      
      ap.setUserId("test@yellowfin.com.au");                   // test@yellowfin.com.au should be an existing Yellowfin user.
      rsr.setPerson(ap);
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。


    • 応答には、StatusCodeパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

    完成例

    以下は、DELETEUSER関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_deleteuser.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_deleteuser.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_deleteuser.jsp              */
    %>
     
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
     
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
     
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // change to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("DELETEUSER");
     
     
    AdministrationPerson ap = new AdministrationPerson();
     
    ap.setUserId("test@yellowfin.com.au");
    rsr.setPerson(ap);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
     
    if ("SUCCESS".equals(rs.getStatusCode() ) ) {
        out.write("Success");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>

    ユーザー情報の取得と検証

    ユーザー作成後は、Webサービスの呼び出しを使用してユーザーの詳細を取得することができます。「AdministrationPerson」オブジェクトのUser IDフィールドは、ユーザーを識別するために使用されます。結果として、投入された「AdministrationPerson」オブジェクトが返されます。セキュリティ上の理由からパスワードは返されず、「NULL」になります。ユーザー情報は、こちらの項目内のアプリケーションに照らし合わせて検証することもできます。

     

    Expand
    titleGETUSER

    こちらの関数は、既存のYellowfinユーザーの詳細を取得します。これは、AdministrationPersonオブジェクトを、ユーザーの識別に使用できるパラメーターとして受け付けます。応答には、ユーザー詳細のすべてが含まれたAdministrationPersonオブジェクトが含まれます。

     

    リクエスト要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、GETUSER」に設定します。

    Person

    AdministrationPerson

    情報が取得されるユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    OrgRefString クライアント組織内部参照IDです(こちらの設定はオプションです)。指定したクライアント組織にユーザーをログインさせます。こちらを設定しない場合、ユーザーはログイン先を指定するために、クライアント組織選択ページへ移動します。

    Anchor
    以下の表5
    以下の表5
    以下は、こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明

    UserId

    String

    情報が取得されるユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>GETUSER</function>       
                <person>
                    <userId>admin@yellowfin.com.au</userId>
                </person>         
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    Person

    AdministrationPerson

    ユーザー詳細を含むオブジェクトです。

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Getting user information...</messages>
                <messages>Getting user information...</messages>
                <messages>Web Service Request Complete</messages>
                <person>
                   <emailAddress>admin@yellowfin.com.au</emailAddress>
                   <firstName>System</firstName>
                   <initial/>
                   <ipId>5</ipId>
                   <languageCode>EN</languageCode>
                   <lastName>Administrator</lastName>
                   <roleCode>YFADMIN</roleCode>
                   <salutationCode/>
                   <status>ACTIVE</status>
                   <timeZoneCode>AUSTRALIA/SYDNEY</timeZoneCode>
                   <userId>admin@yellowfin.com.au</userId>
                </person>
                <sessionId>70dc3c7158a340e19b590f0ed6ea6a8b</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、この呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("GETUSER");
    • AdministrationPersonオブジェクトを介して、ユーザーIDを提供します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
      ap.setUserId("john.smith@yellowfin.com.au");
      rsr.setPerson(ap);
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • 応答には、StatusCodeとPersonパラメーターが含まれます。より詳細な情報は、応答パラメーターの表を参照してください。

     

    • 取得したユーザーの詳細を表示するには、以下の例を使用します。

      Code Block
      themeEclipse
      languagejava
      if ("SUCCESS".equals(rs.getStatusCode()) ) {
          ap = rs.getPerson();
          out.write("UserId:" + ap.getUserId() + "<br>");
          out.write("Password:" + ap.getPassword() + "<br>");
          out.write("FirstName:" + ap.getFirstName() + "<br>");
          out.write("LastName:" + ap.getLastName() + "<br>");
          out.write("Initial:" + ap.getInitial() + "<br>");
          out.write("SalutationCode:" + ap.getSalutationCode() + "<br>");
          out.write("RoleCode:" + ap.getRoleCode() + "<br>");
          out.write("EmailAddress:" + ap.getEmailAddress() + "<br>");
          out.write("LanguageCode:" + ap.getLanguageCode() + "<br>");
          out.write("IpId:" + ap.getIpId() + "<br>");
          out.write("TimeZoneCode:" + ap.getTimeZoneCode() + "<br>");
          out.write("Status:" + ap.getStatus() + "<br>");
      } else {
          out.write("Failure");
          out.write(" Code: " + rs.getErrorCode());
      }

          

    完成例

    以下は、GETUSER関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_getuser.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_getuser.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_getuser.jsp              */
    %>
     
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // change to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("GETUSER");
     
    AdministrationPerson ap = new AdministrationPerson();
    ap.setUserId("john.smith@yellowfin.com.au");
    rsr.setPerson(ap);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        ap = rs.getPerson();
        out.write("User Id:" + ap.getUserId() + "<br>");
        out.write("Password:" + ap.getPassword() + "<br>");
        out.write("First Name:" + ap.getFirstName() + "<br>");
        out.write("Last Name:" + ap.getLastName() + "<br>");
        out.write("Initial:" + ap.getInitial() + "<br>");
        out.write("Salutation Code:" + ap.getSalutationCode() + "<br>");
        out.write("Role Code:" + ap.getRoleCode() + "<br>");
        out.write("Email Address:" + ap.getEmailAddress() + "<br>");
        out.write("Language Code:" + ap.getLanguageCode() + "<br>");
        out.write("IpId:" + ap.getIpId() + "<br>");
        out.write("Time Zone Code:" + ap.getTimeZoneCode() + "<br>");
        out.write("Status:" + ap.getStatus() + "<br>");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>
    Expand
    titleGETALLUSERS

    こちらの関数は、指定されたクライアント組織内の、すべてのユーザーの詳細を取得します。情報は、AdministrationPersonオブジェクトの配列で取得されます。クライアント組織を指定しない場合は、すべてのユーザーが取得されます。取得するユーザーの検索基準を指定するために、「setParameters()」メソッドを使用することができます。セキュリティ上の理由からパスワードは返されず、「NULL」になります。

     

    リクエスト要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「GETUSER」に設定します。

    OrgRefString クライアント組織内部参照IDです(こちらの設定はオプションです)。こちらを設定しない場合は、すべてのクライアント組織が検索されます。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>GETALLUSERS</function>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    People

    AdministrationPerson

    ユーザー詳細を含むオブジェクトの配列です。

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <people>
                   <firstName>System</firstName>
                   <ipId>5</ipId>
                   <lastName>Administrator</lastName>
                   <userId>admin@yellowfin.com.au</userId>
                </people>
                <sessionId>2c32528279baa26b730f9e3c8787880d</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、すべてのユーザーを取得するリクエストの例であり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("GETALLUSERS");
    • クライアント組織を指定しない場合は、すべてのクライアント組織が検索されます。

       

      Code Block
      themeEclipse
      languagejava
      rsr.setOrgRef("org1");
    • 検索基準:GETALLUSERS関数は、2つの文字列の配列を受け付けます。最初の配列(searchingCriteria[0])は、「%John%」のような条件を使用して、Yellowfinデータベースユーザーの名、姓、電子メールの@よりも左側、または右側と比較されます。次の配列(seachingCriteria[1])は、Yellowfinデータベースユーザーの電子メール右側(ドメイン)と比較されます。

       

      Code Block
      themeEclipse
      languagejava
      String[] searchingCriteria = new String[] {"John","yellowfin.com.au"};
      rsr.setParameters(searchingCriteria);
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • 応答には、StatusCodeとPeopleパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

    完成例

    以下は、GETALLUSERS関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_getallusers.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_getallusers.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_getallusers.jsp               */
    %>
     
     
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
     
    rsr.setFunction("GETALLUSERS");
     
    rsr.setOrgRef("org1");
     
    String[] searchingCriteria = new String[] {"John","yellowfin.com.au"};
    rsr.setParameters(searchingCriteria);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        out.write("Success. " + rs.getPeople().length + " people found.");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>
    Expand
    titleGETUSERBYIP

    こちらの関数は、IPを使用して、ユーザーの詳細を取得します。関数は、IPID(Yellowfinリポジトリデータベース内で、これはPersonテーブルのIpIdフィールドになります)を提供することで、ユーザー指定に使用するためのAdministrationPersonオブジェクトを、パラメーターとして受け付けます。応答には、すべてのユーザー詳細を含むAdministrationPersonオブジェクトが含まれます。

     

    リクエスト要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型

    説明

    LoginId

    String

    ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「GETUSERBYIP」に設定します。

    PersonAdministrationPerson情報が取得されるユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    Anchor
    以下の表6
    以下の表6
    以下は、こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明
    IpIdInteger情報が取得されるユーザーのIP IDです。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。

    Code Block
    themeEclipse
    languagexml
     <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>GETUSERBYIP</function>
              <person>
                    <ipId>5</ipId>
                </person>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらののパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    Person

    AdministrationPerson

    ユーザー詳細を含むオブジェクトです。

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Getting user information...</messages>
                <messages>Getting user information...</messages>
                <messages>Web Service Request Complete</messages>
                <person>
                   <emailAddress>admin@yellowfin.com.au</emailAddress>
                   <firstName>System</firstName>
                   <initial/>
                   <ipId>5</ipId>
                   <languageCode>EN</languageCode>
                   <lastName>Administrator</lastName>
                   <roleCode>YFADMIN</roleCode>
                   <salutationCode/>
                   <status>ACTIVE</status>
                   <timeZoneCode>AUSTRALIA/SYDNEY</timeZoneCode>
                   <userId>admin@yellowfin.com.au</userId>
                </person>
                <sessionId>81e76f1222d0dd12d9871efc7cbf0811</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、この呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("GETUSERBYIP");
    • IpIdを提供し、詳細を取得するユーザーを識別するために、AdministrationPersonオブジェクトを使用します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
       
      ap.setIpId(5);                  //IpId of the admin@yellowfin.com.au account
      rsr.setPerson(ap);
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • 応答には、StatusCodeとPersonパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

    • この呼び出しの結果を表示するには、以下の例を使用します。

      Code Block
      themeEclipse
      languagejava
      if ("SUCCESS".equals(rs.getStatusCode()) ) {
          ap = rs.getPerson();
          out.write("UserId: " + ap.getUserId() + "<br>");
          out.write("Password: " + ap.getPassword() + "<br>");
          out.write("FirstName: " + ap.getFirstName() + "<br>");
          out.write("LastName: " + ap.getLastName() + "<br>");
          out.write("Initial: " + ap.getInitial() + "<br>");
          out.write("SalutationCode: " + ap.getSalutationCode() + "<br>");
          out.write("RoleCode: " + ap.getRoleCode() + "<br>");
          out.write("EmailAddress: " + ap.getEmailAddress() + "<br>");
          out.write("LanguageCode: " + ap.getLanguageCode() + "<br>");
          out.write("IpId: " + ap.getIpId() + "<br>");
          out.write("TimeZoneCode: " + ap.getTimeZoneCode() + "<br>");
          out.write("Status: " + ap.getStatus() + "<br>");
      } else {
          out.write("Failure");
          out.write(" Code: " + rs.getErrorCode());
      }

    完成例

    以下は、GETUSERBYIP関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_getuserbyip.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_getuserbyip.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_getuserbyip.jsp                  */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
     
     
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // change to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("GETUSERBYIP");
     
    AdministrationPerson ap = new AdministrationPerson();
     
    ap.setIpId(5);
    rsr.setPerson(ap);
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        ap = rs.getPerson();
        out.write("User Id: " + ap.getUserId() + "<br>");
        out.write("Password: " + ap.getPassword() + "<br>");
        out.write("First Name: " + ap.getFirstName() + "<br>");
        out.write("Last Name: " + ap.getLastName() + "<br>");
        out.write("Initial: " + ap.getInitial() + "<br>");
        out.write("Salutation Code: " + ap.getSalutationCode() + "<br>");
        out.write("Role Code: " + ap.getRoleCode() + "<br>");
        out.write("Email Address: " + ap.getEmailAddress() + "<br>");
        out.write("Language Code: " + ap.getLanguageCode() + "<br>");
        out.write("IpId: " + ap.getIpId() + "<br>");
        out.write("Time Zone Code: " + ap.getTimeZoneCode() + "<br>");
        out.write("Status: " + ap.getStatus() + "<br>");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>
    Expand
    titleGETAVATARS

    こちらのWebサービスは、ユーザーのプロフィール画像を取得するために使用されます。ユーザーがYellowfinにプロフィール画像を設定していない場合は、画像は取得されません。こちらのサービスは、ユーザーの内部ID(IP ID)を要求します。

     

    リクエストパラメーター

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型

    説明

    LoginId

    String

    Yellowfin Webサービスに接続する管理者アカウントです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「GETAVATARS」に設定します。

    ParametersString[]プロフィール画像を取得するYellowfinユーザーの内部ID(または、IpId)が含まれる配列です。各IDは、Integerのものもすべて、Stringとして渡されなくてはいけません。

     

    リクエストの例

    以下は、こちらのリクエストのSOAP XMLの例です。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
               <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>GETAVATARS</function>
                <parameters>5</parameters>
             </arg0>
        </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答のパラメーター

    返される応答には、これらののパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    binaryAttachments

    ReportBinaryObject[]

    指定したユーザーのプロフィール画像を含みます。

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <binaryAttachments>
                   <data>iVBORw0KGgoAAAANSUhEUgAAA ... your image string</data>
                </binaryAttachments>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>5547ebe153fd0fc7fcf63014ffe61b5c</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • 管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("GETAVATARS");
    • ユーザーのIP IDを指定することができます。

       

      Code Block
      themeEclipse
      languagejava
      rsr.setParameters(new String[] {"5","13073"});
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • 応答には、StatusCode要素と、BinaryAttachment配列が含まれます。

     

    • 最初の画像を取得するためには、以下を使用します。

      Code Block
      themeEclipse
      languagejava
      byte[] data = response.getBinaryAttachments[0].getData();

    完成例

    以下は、Webサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_getavatar.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_getavatar.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_getavatars.jsp              */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <html>
    <body>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // set to the password of the above account
    rsr.setOrgId(1);
     
    rsr.setFunction("GETAVATARS");
    rsr.setParameters(new String[] {"5","13073"});
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        ReportBinaryObject[] objects = rs.getBinaryAttachments();
        if (objects != null) {
            byte[] data,encodeBase64;
            String base64Encoded;
     
            for(ReportBinaryObject o: objects){
                data = o.getData();
                if (data != null){
     
                    encodeBase64 = java.util.Base64.getEncoder().encode(data);
                    base64Encoded = new String(encodeBase64, "UTF-8");
                    if (base64Encoded != null) 
                        out.write("<br>");
                    %>
                    <img src="data:image/jpg;base64,<%=base64Encoded%>" alt="No image">
                    <%
                }
            }
        }
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode());
    }
    %>
    </body>
    </html> 
    Expand
    titleVALIDATEUSER

    こちらの関数は、Yellowfinのユーザーを検証します。AdministrationPersonオブジェクトをパラメーターに使用して、ユーザーを指定することができます。

    提供された詳細を持つユーザーが存在する場合、応答はSUCCESSを返します。ユーザーが有効でない場合は、コード25(COULD_NOT_AUTHENTICATE_USER)が応答に返されます。

     

    リクエストの要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    ログインをして、こちらの関数を実行するWebサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「VALIDATEUSER」に設定します。

    PersonAdministrationPerson検証されるユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    OrgRef

    String

    クライアント組織参照IDです(こちらの設定はオプションです)。特定の組織のユーザーの検証が必要な場合は、こちらを設定します。

    Anchor
    以下の表7
    以下の表7
    以下は、こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明

    User ID

    String

    検証するユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    PasswordString上記アカウントのパスワードです。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>VALIDATEUSER</function>
              <person>
                    <userId>admin@yellowfin.com.au</userId>
                    <password>test</password>
                </person>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>


    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

    Person

    AdministrationPerson

    ユーザー詳細を含むオブジェクトです。

     

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <person>
                   <ipId>5</ipId>
                   <userId>admin@yellowfin.com.au</userId>
                </person>
                <sessionId>0ee8ae23d21ff01f365d1e03ea49c47a</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、この呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("VALIDATEUSER");
    • AdministrationPersonオブジェクトを介して、ユーザーIDを提供します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
      
      ap.setUserId("john.smith@yellowfin.com.au");
      ap.setPassword("test");
      
      rsr.setPerson(ap);
    • 特定の組織のユーザーの検証が必要な場合は、クライアント組織参照IDを提供します。

       

      Code Block
      themeEclipse
      languagejava
      rsr.setOrgRef("org1");

      OrgRefパラメーターが省略された場合、ユーザーはデフォルト(プライマリー)組織に対して検証されます。

     

    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • 応答には、StatusCodeパラメーターが含まれます。

     

     

    完成例

    以下は、VALIDATEUSER関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_validateuser.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_validateuser.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_validateuser.jsp                */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // change to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("VALIDATEUSER");
     
    AdministrationPerson ap = new AdministrationPerson();
     
    ap.setUserId("john.smith@yellowfin.com.au");
    ap.setPassword("test");
     
    rsr.setPerson(ap);
    rsr.setOrgRef("org1");
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        out.write("User is authenticated");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>
    Expand
    titleVALIDATEPASSWORD

    こちらの呼び出しは、ユーザーのパスワードを検証します。パスワードの有効期限が切れている場合、StatusCodeとしてSUCCESSを返します。それ以外の場合は、FAILUREを返します。

    Yellowfinにログインをしていない新規ユーザーの場合は、パスワードの有効期限が切れているため、呼び出しはSUCCESSを取得します。これは、新規ユーザーの初回ログイン時に、Yellowfinはパスワードのリセットを要求するからです。

     

    リクエストの要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「VALIDATE PASSWORD」に設定します。

    PersonAdministrationPersonパスワードが検証されるユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    Anchor
    以下の表8
    以下の表8
    以下は、こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明

    UserId

    String

    パスワードが検証されるユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    Password

    String

    上記アカウントのパスワードです。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>VALIDATEPASSWORD</function>
                <person>
                    <userId>admin@yellowfin.com.au</userId>
                    <password>test</password>
                </person>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>fb024963bdc94034557f95b01f53a138</sessionId>
                <statusCode>FAILURE</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、この呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("VALIDATEPASSWORD");
    • AdministrationPersonオブジェクトを介して、ユーザーIDを提供します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
      ap.setUserId("john.smith@yellowfin.com.au");
      ap.setPassword("test");
       
      rsr.setPerson(ap);
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • 応答には、StatusCodeパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

     

    完成例

    以下は、VALIDATEPASSWORD関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_validatepassword.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_validatepassword.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_validatepwd.jsp                */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // change to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("VALIDATEPASSWORD");
     
    AdministrationPerson ap = new AdministrationPerson();
     
    ap.setUserId("john.smith@yellowfin.com.au");
    ap.setPassword("test");
    rsr.setPerson(ap);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        out.write("Password is expired");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>

    ユーザー情報の操作

    ユーザーの詳細は、Webサービスの呼び出しを使用して、後から変更することができます。AdministrationPersonオブジェクトのUser IDフィールドは、ユーザーを識別するために使用されるため、変更することができません。AdministrationPersonオブジェクトのその他のフィールドには、新しい変更内容が投入されます。

    Anchor
    CHANGEPASSWORD
    CHANGEPASSWORD

    Expand
    titleCHANGEPASSWORD

    こちらの関数は、指定したYellowfinユーザーのパスワードを変更します。パスワードは、ユーザーID(ログインIDの方法に応じて、電子メールアドレス、またはその他のタイプのIDになります。)をもとに、AdministrationPersonパラメーターを通してリセットされます。

     

    リクエストの要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「CHANGEPASSWORD」に設定します。

    PersonAdministrationPerson

    パスワードを変更するユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    Anchor
    以下の表9
    以下の表9
    以下は、こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明

    UserId

    String

    パスワードを変更するユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    Password

    String

    ユーザーの新規パスワードです。これは、Yellowfinのパスワードポリシーに準拠していなくてはいけません。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>CHANGEPASSWORD</function>
                <person>
                    <userId>admin@yellowfin.com.au</userId>
                    <password>test321</password>
                </person>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>f6bdc33348cd76d7898f3bed3e54ff31</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、この呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("CHANGEPASSWORD");
    • AdministrationPersonオブジェクトを使用して、ユーザーを指定します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
       
      ap.setUserId("john.smith@yellowfin.com.au");
      ap.setPassword("test123");
      rsr.setPerson(ap);
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • 応答には、StatusCodeパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

     

    完成例

    以下は、CHANGEPASSWORD関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_changepassword.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_changepassword.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_changepwd.jsp              */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // change to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("CHANGEPASSWORD");
     
    AdministrationPerson ap = new AdministrationPerson();
     
    ap.setUserId("john.smith@yellowfin.com.au");
    ap.setPassword("test123");
     
    rsr.setPerson(ap);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        out.write("Password is reset");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>
    Expand
    titleRESETPASSWORD

    こちらの関数は、ユーザーのYellowfinアカウントをリセットし、パスワードを変更するよう要求します。この呼び出しがアカウントのパスワードを変更するのではありません。パスワードを変更するには、CHANGEPASSWORD関数を使用します。

     

    リクエストの要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「RESETPASSWORD」に設定します。

    PersonAdministrationPerson

    パスワードをリセットしなくてはいけないユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    Anchor
    以下の表10
    以下の表10
    以下は、こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明

    UserId

    String

    パスワードをリセットするユーザーのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    Password

    String

    上記アカウントのパスワードです。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test321</password>
                <orgId>1</orgId>
                <function>RESETPASSWD</function>
                <person>
                    <userId>admin@yellowfin.com.au</userId>
                    <password>test321</password>
                </person>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>beabd94a9ffaa562a8b9ba823fc291a0</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、この呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("RESETPASSWD");
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • この呼び出しの応答には、StatusCodeパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

     

    完成例

    以下は、RESETPASSWORD関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_resetpassword.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_resetpassword.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              ws_ resetpwd.jsp                  */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
     
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // change to the password of the account above
    rsr.setOrgId(1);
    rsr.setFunction("RESETPASSWD");
     
    AdministrationPerson ap = new AdministrationPerson();
     
    ap.setUserId("john.smith@yellowfin.com.au");
    rsr.setPerson(ap);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        out.write("Account is reset");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>
    Expand
    titleUPDATEUSER

    こちら呼び出しは、ユーザーの詳細を編集します。これは、ユーザーID(例:ログインID方法に応じて、電子メールアドレス、または他のタイプのIDになります)を提供することで、ユーザーの識別に使用することのできるAdministrationPersonオブジェクトをパラメーターとして受け付けます。

    応答には、すべてのユーザー詳細を含むAdministrationPersonオブジェクトが含まれます。

    注意:この呼び出しがアカウントのパスワードを変更するのではありません。パスワードを変更するには、CHANGEPASSWORD関数を使用します。

     

    リクエストの要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「UPDATEUSER」に設定します。

    PersonAdministrationPerson

    更新しなくてはいけないユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    Anchor
    以下の表11
    以下の表11
    以下は、こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明

    UserId

    String

    詳細を変更するユーザーを識別するためのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスにすることができます。

    更新しなくてはいけないユーザーの詳細に関連する任意のパラメーターを提供することができます。例えば、新しい名や、更新が必要なステータスなどです。

     

    リクエストの例

    以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。今回は、ユーザーのステータスを「無効(Inactive)」にする例を示しています。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>UPDATEUSER</function>
                <person>
                    <userId>binish.sheikh@yellowfin.com.au</userId>
                    <status>ACTIVE</status>
                </person>      
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE
    PersonAdministrationPerson更新されたユーザーの詳細を含むオブジェクトです。

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Getting user information...</messages>
                <messages>Getting user information...</messages>
                <messages>Web Service Request Complete</messages>
                <person>
                   <emailAddress>binish.sheikh@yellowfin.com.au</emailAddress>
                   <firstName>Binish</firstName>
                   <ipId>13000</ipId>
                   <lastName>Sheikh</lastName>
                   <roleCode>YFADMIN</roleCode>
                   <status>ACTIVE</status>
                   <timeZoneCode>AUSTRALIA/BRISBANE</timeZoneCode>
                   <userId>binish.sheikh@yellowfin.com.au</userId>
                </person>
                <sessionId>586e172a7c4850bb3edbaaf5264a312d</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • こちらは、この呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("UPDATEUSER");
    • 詳細が更新されるユーザーを識別するために、AdministrationPersonオブジェクトを使用します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
       
      ap.setUserId("john.smith@yellowfin.com.au");
    • 変更する詳細を指定します。例えば、ユーザーアカウントを無効(Inactive)にすることができます。

       

      Code Block
      themeEclipse
      languagejava
      ap.setStatus("INACTIVE");               // This shows that the user "john.smith@yellowfin.com.au" will not be able to log in
       
      rsr.setPerson(ap);
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • この呼び出しの応答には、StatusCodeとPersonパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

     

    完成例

    以下は、UPDATEUSER関数の完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_updateuser.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_updateuser.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*             ws_updateuser.jsp           */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
     
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
    rsr.setPassword("test");                           // change to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("UPDATEUSER");
     
     
    AdministrationPerson ap = new AdministrationPerson();
    ap.setUserId("john.smith@yellowfin.com.au");
    ap.setStutus("INACTIVE");
    rsr.setPerson(ap);
     
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
        ap = rs.getPerson();
        out.write("User Id: " + ap.getUserId() + "<br>");
        out.write("Password: " + ap.getPassword() + "<br>");
        out.write("First Name: " + ap.getFirstName() + "<br>");
        out.write("Last Name: " + ap.getLastName() + "<br>");
        out.write("Initial: " + ap.getInitial() + "<br>");
        out.write("Salutation Code: " + ap.getSalutationCode() + "<br>");
        out.write("Role Code: " + ap.getRoleCode() + "<br>");
        out.write("Email Address: " + ap.getEmailAddress() + "<br>");
        out.write("Language Code: " + ap.getLanguageCode() + "<br>");
        out.write("IpId: " + ap.getIpId() + "<br>");
        out.write("Time Zone Code: " + ap.getTimeZoneCode() + "<br>");
        out.write("Status: " + ap.getStatus() + "<br>");
    } else {
        out.write("Failure");
        out.write(" Code: " + rs.getErrorCode() );
    }
    %>
    Expand
    titleSETAVATARIMAGE

    こちらのWebサービスは、指定したユーザーのプロフィール画像をアップロードするために使用されます。画像は、文字列値に変換可能な、UTF-8のバイト配列でなければいけません。

     

    リクエストの要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「SETAVATARIMAGE」に設定します。

    PersonAdministrationPerson

    プロフィール画像を変更するユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    ParametersString[]アップロードされるプロフィールど画像を表示する単一要素を含む配列です。画像は、文字列に変換可能な、UTF-8形式のバイト配列でなければいけません。

    Anchor
    以下の表12
    以下の表12
    以下は、こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明

    IpId

    Integer

    ユーザーの内部Yellowfin IP IDを提供します。値は、YellowfinのデータベースのPersonパラメーターのIpIdフィールドに保存されます。

     

    リクエストの例

    以下は、こちらのリクエストのSOAP XMLの例です。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
            <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>       
                <function>SETAVATARIMAGE</function>
                <person>
                    <ipId>5</ipId>
                </person>          
                <parameters>
                   <string>iVBORw0KGgoAAAANSUhEUgAAAdsAAA ... your image string</string>
                </parameters>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答のパラメーター

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

     

    応答の例

    サービスは、今回のSOAPの例に基づき、以下の応答を返します。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>5fbbf0f2d8a6f4902adde5bfb659fed7</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • 管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("SETAVATARIMAGE");
    • IP IDを提供することで、ユーザーを指定することができます。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
      ap.setIpId(5);
       
      rsr.setPerson(ap);
    • java.nio.fileライブラリを使用して画像ファイルを選択します。

       

      Code Block
      themeEclipse
      languagejava
      Path path = Paths.get("D:/TMP/fish.jpg"); // existing image file
      byte[] data = Files.readAllBytes(path);
      byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data);
      String img = new String(encodeBase64, "UTF-8");
       
      rsr.setParameters(new String[] {img});
    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • 応答には、StatusCodeパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

     

    完成例

    以下は、こちらのWebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。

    1. コードをコピーして、「ws_setavatarimage.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/ws_setavatarimage.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%          
    /*              ws_setavatarimage.jsp                               */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%@ page import="java.nio.file.Files" %>
    <%@ page import="java.nio.file.Paths" %>
    <%@ page import="java.nio.file.Path" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);       // adjust host and port number
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
      
    rsr.setLoginId("admin@yellowfin.com.au");                     // provide your Yellowfin web services admin account
    rsr.setPassword("test");                                    // change to the password of the above account
    rsr.setOrgId(1);
    rsr.setFunction("SETAVATARIMAGE");
      
    AdministrationPerson ap = new AdministrationPerson();
    ap.setIpId(5);
      
    rsr.setPerson(ap);
      
    Path path = Paths.get("D:/TMP/fish.jpg"); // existing image file
    byte[] data = Files.readAllBytes(path);
    byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data);
    String img = new String(encodeBase64, "UTF-8");
      
    rsr.setParameters(new String[] {img});
      
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
      
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
                    out.write("<br>Success");
    } else {
                    out.write("Failure");
                    out.write(" Code: " + rs.getErrorCode());
    }
    %>

     

     

    ユーザーセッションの終了

    これらのサービスは、Yellowfinユーザーのセッションを終了することができます。

     

    Expand
    titleLOGOUTUSER

    こちらのサービスは、Yellowfinのセッションを終了しますが、ユーザーをログアウトさせるために「LoginSessionId」を要求します。これはユーザーを識別するに十分であるため、ユーザーIDは要求されません。LOGINUSER、またはLOGINUSERNOPASSWORD関数とともにシングルサインオンが実行されている場合、以下を介してLoginSessionIdを取得することができます。

    Code Block
    languagejava
    String token = response.getLoginSessionId();

     

     こちらの値を保存することで、後ほどLOGOUTUSERリクエストに渡すことができます。

    Code Block
    languagejava
    request.setLoginSessionId(token);

     

    リクエストの要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「LOGOUTUSER」に設定します。

    PersonAdministrationPerson

    プロフィール画像を変更するユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

    LoginSessionIdString終了しなくてはいけないYellowfinインスタンスのセッショントークンです。これは、ユーザーを識別するに十分です。

    Anchor
    以下の表13
    以下の表13
    こちらの関数のために「AdministrationPerson」オブジェクトに設定しなくてはいけない主要なパラメーターです。

    AdministrationPerson要素データ型説明

    UserId

    String

    詳細を変更するユーザーを識別するためのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    PasswordString上記アカウントのパスワードです。

     

    リクエストの例

    以下は、上記のパラメーターを使用して、こちらの関数のリクエストを示すSOAP XMLの例です。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>LOGOUTUSER</function>
                <person>           
                   <userId>admin@yellowfin.com.au</userId>
                   <password>test</password>
                </person>
                <loginSessionId>39fb11047affb98c9d081fb48bed0093</loginSessionId>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

     

    応答の例

    以下は、上記のSOAP XMLの呼び出しの応答です。

    Code Block
    themeEclipse
    languagexml
     <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>9cad6c76734e329c298e7b15c57a19db</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • 以下は、こちらの呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("LOGOUTUSER");
    • ログインセッションIDを渡します。

       

      Code Block
      themeEclipse
      languagejava
      rsr.setLoginSessionId(token);
    • ユーザーが複数のTomcatセッションに同時にログインしている場合は、パラメーターを設定することで、どのセッションを終了するのかを指定することができます。例:

       

      Code Block
      themeEclipse
      languagejava
      String[] _sessionId = new String[]{sessionId}; // log out by Tomcat session Id (cookies JSESSIONID)
      rsr.setParameters(_sessionId);

      終了のリクエストごとに、ひとつのセッションを提供します。TomcatセッションIDはオプションです。こちらを省略する場合、Yellowfinはすべてのユーザーのセッションを終了します。

       

    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • この呼び出しの応答には、StatusCodeパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

     

    完成例

    以下は、LOGOUTUSER関数の完成例です。スクリプトは、以下の手順を実行するために設計されています。

      • LoginSessionIdを取得するLOGINUSERサービスの呼び出し。
      • ログインリンクの構成。指定したユーザーのYellowfinセッションを初期化するために、まずはこちらのリンクをクリックしなくてはいけません。(今回の例では、john.smith@yellowfin.com.auをログインユーザーに使用します。指定するユーザーは、既にYellowfinインスタンスに存在していなくてはいけません。または、userIdを変更することもできます。)
      • ログアウトするためのリンクを構成。セッションを開始したら、こちらをクリックしなくてはいけません。

     

    こちらのスクリプトを使用するには、以下の手順に従います。

    1. コードをコピーして、「logoutuser.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じて、ホスト、ポート番号、管理ユーザー、ログイン/ログアウトするユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/logoutuser.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              logoutuser.jsp                */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
    String token = request.getParameter("token");
     
    if (token == null) {
         
        //login the admin user:
     
        rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
        rsr.setPassword("test");                           // change to the password of the above account
        rsr.setOrgId(1);
        rsr.setFunction("LOGINUSER");
     
        AdministrationPerson ap = new AdministrationPerson();
     
        String userId = "john.smith@yellowfin.com.au";
     
        ap.setUserId(userId);
        ap.setPassword("test");
     
        rsr.setPerson(ap);
     
        AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
        if ("SUCCESS".equals(rs.getStatusCode()) ) {
            String token_ = rs.getLoginSessionId();
            out.write("Login by opening the link in a new subtab prior to Logout. The tomcat session must be initialized...");
            out.write("<BR>Login: <A href='http://localhost:8080/logon.i4?LoginWebserviceId=" + token_ + "'>");
            out.write("http://localhost:8080/logon.i4?LoginWebserviceId=" + token_ + "</a><br>");
            out.write("<BR>Logout: <A href='http://localhost:8080/test.jsp?token=" + token_ + "&userId=" + userId + "'>");
            out.write("http://localhost:8080/test.jsp?token=" + token_ + "&userId=" + userId + "</a><br>");
        } else {
            out.write("Failure");
            out.write(" Code: " + rs.getErrorCode() );
            return;
        }
    } else {
     
        //logout the user:
     
        out.write("Trying to logout " + token + " session...<br>");
     
        rsr = new AdministrationServiceRequest();
     
        rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
        rsr.setPassword("test");                           // set the password of the above account
        rsr.setOrgId(1);
     
        rsr.setFunction("LOGOUTUSER");
     
        rsr.setLoginSessionId(token);
     
        AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
        if ("SUCCESS".equals(rs.getStatusCode()) ) {
            out.write("Logout: Success");
        } else {
            out.write("Failure");
            out.write("Code: " + rs.getErrorCode() );
        }
    }
    %>
    Expand
    titleLOGOUTBYUSERID

    こちらのサービスは、指定したユーザーをログアウトすることで、LOGOUTUSER関数と類似していますが、こちらは、ユーザーを識別するためにログインセッションIDではなく、ユーザーID(例:ログインIDの方法に応じて、電子メールアドレス、または他のタイプのIDになります)、またはユーザーのIP ID(YellowfinデータベースのPersonテーブルのIpIdフィールドの値)のいずれかを要求します。

    こちらの呼び出しは、ユーザーID、またはIpIdの提供に使用されるAdministrationPersonオブジェクトを使用します。

     

    リクエストの要素

    以下の要素は、こちらのリクエストとともに渡されます。

    リクエスト要素データ型説明

    LoginId

    String

    Yellowfin Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。

    Password

    String

    上記アカウントのパスワードです。

    OrgId

    Integer

    Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。

    Function

    String

    Webサービス関数です。こちらは、「LOGOUTBYUSERID」に設定します。

    PersonAdministrationPerson

    ログアウトするユーザーの詳細を含むオブジェクトです。注意:以下のを参照してください。

     

    Anchor
    以下の表14
    以下の表14
    AdministrationPersonオブジェクトに、以下のいずれかを設定します。

    AdministrationPerson要素データ型説明

    UserId

    String

    Yellowfinのセッションを終了するユーザーを識別するためのユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。

    IpIdStringセッションを終了するユーザーのIp IDです。

     

    リクエストの例

    以下は、関数に渡されるリクエストを示すXML SOAPの例です。

    Code Block
    themeEclipse
    languagexml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
       <soapenv:Header/>
       <soapenv:Body>
         <web:remoteAdministrationCall>
             <arg0>
                <loginId>admin@yellowfin.com.au</loginId>
                <password>test</password>
                <orgId>1</orgId>
                <function>LOGOUTBYUSERID</function>
                <person>           
                   <userId>admin@yellowfin.com.au</userId>
                   <password>test</password>
                </person>
             </arg0>
          </web:remoteAdministrationCall>
       </soapenv:Body>
    </soapenv:Envelope>

     

    応答の要素

    返される応答には、これらのパラメーターが含まれます。

    応答要素データ型説明

    StatusCode

    String

    Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。

    • SUCCESS
    • FAILURE

     

    応答の例

    以下は、上記のSOAPの呼び出しの応答です。

    Code Block
    themeEclipse
    languagexml
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
             <return>
                <errorCode>0</errorCode>
                <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
                <messages>Web Service Request Complete</messages>
                <sessionId>f8a04d7c9530ff18f65f95048e6a4500</sessionId>
                <statusCode>SUCCESS</statusCode>
             </return>
          </ns2:remoteAdministrationCallResponse>
       </S:Body>
    </S:Envelope>

     

    手順

    Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。

    Expand
    title詳細手順
    • 以下は、こちらの呼び出しの基礎的なリクエストであり、管理ユーザーとしてのログインと、実行するWebサービスの呼び出しの指定を含みます。

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceRequest rsr = new AdministrationServiceRequest();
       
      rsr.setLoginId("admin@yellowfin.com.au");
      rsr.setPassword("test");
      rsr.setOrgId(1);
       
      rsr.setFunction("LOGOUTBYUSERID");
    • ユーザーID、またはIpIdを渡すことで、ログアウトをするユーザーを識別します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationPerson ap = new AdministrationPerson();
      ap.setUserId(userId);
             
      rsr.setPerson(ap);
    • ユーザーが複数のTomcatセッションに同時にログインしている場合は、パラメーターを設定することで、どのセッションを終了するのかを指定することができます。例:

       

      Code Block
      themeEclipse
      languagejava
      String[] _sessionId = new String[]{sessionId}; // log out by Tomcat session Id (cookies JSESSIONID)
      rsr.setParameters(_sessionId);

      終了のリクエストごとに、ひとつのセッションを提供します。TomcatセッションIDはオプションです。こちらを省略する場合、Yellowfinはすべてのユーザーのセッションを終了します。

       

    • リクエストの構成が完了したら、呼び出しを実行します。

       

      Code Block
      themeEclipse
      languagejava
      AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

      管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。

     

    • この呼び出しの応答には、StatusCodeパラメーターが含まれます。より詳細な情報は、上記の応答パラメーターの表を参照してください。

     

     

    完成例

    以下は、こちらの関数の完成例です。スクリプトは、以下の手順を実行するために設計されています。

      • ログインリンクの構成。指定したユーザーのYellowfinセッションを初期化するために、まずはこちらのリンクをクリックしなくてはいけません。(今回の例では、john.smith@yellowfin.com.auをログインユーザーに使用します。指定するユーザーは、既にYellowfinインスタンスに存在していなくてはいけません。または、userIdを変更することもできます。)
      • ログアウトするためのリンクを構成。セッションが設定されたら、こちらをクリックしなくてはいけません。

     

    こちらのスクリプトを使用するには、以下の手順に従います。

    1. コードをコピーして、「test.jsp」として保存します。
    2. root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
    3. 環境に応じて、ホスト、ポート番号、管理ユーザー、ログイン/ログアウトするユーザーを調整します。
    4. インターネットブラウザから、「http://<host>:<port>/test.jsp」を実行します。

     

    Code Block
    themeEclipse
    languagejava
    <%           
    /*              test.jsp                */
    %>
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
    <%@ page import="com.hof.web.form.*" %>
    <%@ page import="com.hof.mi.web.service.*" %>
    <%
    AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
     
    AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
     
     
    String userId = request.getParameter("userId");
     
    if (userId == null) {
     
        //login the admin user:
     
        rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
        rsr.setPassword("test");                           // set the password of the above account
        rsr.setOrgId(1);
        rsr.setFunction("LOGINUSER");
     
     
        AdministrationPerson ap = new AdministrationPerson();
     
        userId = "john.smith@yellowfin.com.au";
     
        ap.setUserId(userId);
        ap.setPassword("test");
     
     
        rsr.setPerson(ap);
         
        AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
     
        if ("SUCCESS".equals(rs.getStatusCode()) ) {
            String token_ = rs.getLoginSessionId();
            out.write("Login by opening the link in a new subtab prior to Logout. The tomcat session must be initialized...");
            out.write("<BR>Login: <A href='http://localhost:8080/logon.i4?LoginWebserviceId=" + token_ + "'>");
            out.write("http://localhost:8080/logon.i4?LoginWebserviceId=" + token_ + "</a><br>");
     
            out.write("<BR>Logout: <A href='http://localhost:8080/test.jsp?token=" + token_ + "&userId=" + userId + "'>");
            out.write("http://localhost:8080/test.jsp?token=" + token_ + "&userId=" + userId + "</a><br>");
     
        }else {
            out.write("Failure");
            out.write(" Code: " + rs.getErrorCode() );
            return;
        }
    } else {
     
        //logout the user:
         
        out.write("Trying to logout " + userId + " session...<br>");
     
        rsr = new AdministrationServiceRequest();
     
        rsr.setLoginId("admin@yellowfin.com.au");          // provide your Yellowfin web services admin account
        rsr.setPassword("test");                           // change to the password of the above account
        rsr.setOrgId(1);
         
        rsr.setFunction("LOGOUTBYUSERID");
     
        AdministrationPerson ap = new AdministrationPerson();
        ap.setUserId(userId);
         
        rsr.setPerson(ap);
     
        AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
     
     
        if ("SUCCESS".equals(rs.getStatusCode()) ) {
            out.write("Logout: Success");
        } else {
            out.write("Failure");
            out.write(" Code: " + rs.getErrorCode() );
        }
    }
    %>