- Created by Yellowfin Admin , last modified on Mar 27, 2018
You are viewing an old version of this page. View the current version.
Compare with Current View Version History
« Previous Version 2 Next »
ユーザーグループとロールは、こちらの項目で紹介するwebサービスの呼び出しを使用して、作成、または変更をすることができます。
注意:「システム構成」ページで「クライアント組織」機能が有効になっている場合で、特定のタイプの呼び出しが適用可能な場合は、クライアント組織を指定することもできます。
ユーザーロール関数
これらの webサービスは、Yellowfinのユーザーロールに特化しています。
こちらの関数は、Yellowfinで利用可能なすべてのユーザーロールを返します。応答は、利用可能なロールを表示するAdministrationRoleオブジェクトの配列が含まれます。
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「LISTROLES」に設定します。 |
リクエストの例
以下のSOAP XMLの例は、この呼び出しに渡すことのできるパラメーターを表示しています。
<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>LISTROLES</function> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答要素
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
Roles | AdministrationRole[] | ロールの一覧です。 |
応答の例
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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> <roles> <functions> <accessLevelCode>CRUD</accessLevelCode> <functionCode>ACTIVITYSTREAM</functionCode> <functionDescription>Allows users to access the activity stream.</functionDescription> <functionName>Activity Stream</functionName> </functions> <functions> <accessLevelCode>CRUD</accessLevelCode> <functionCode>TIMELINE</functionCode> <functionDescription>Allows users to access their timeline.</functionDescription> <functionName>Timeline</functionName> </functions> <functions> <accessLevelCode>CRUD</accessLevelCode> <functionCode>BROADCASTSUBSCRIBE</functionCode> <functionDescription>Allows users to subscribe to report broadcasts.</functionDescription> <functionName>Subscribe to Broadcast</functionName> </functions> <functions> <accessLevelCode>R</accessLevelCode> <functionCode>STORYBOARD</functionCode> <functionDescription>Allows users to view, create, edit or delete Storyboards.</functionDescription> <functionName>Storyboard</functionName> </functions> <functions> <accessLevelCode>R</accessLevelCode> <functionCode>DASHPUBLIC</functionCode> <functionDescription>Allows users to create and edit Public dashboards.</functionDescription> <functionName>Public Dashboards</functionName> </functions> <functions> <accessLevelCode>CRUD</accessLevelCode> <functionCode>TASKPERSONAL</functionCode> <functionDescription>Allow users to create and assign tasks to themselves.</functionDescription> <functionName>Personal Tasks</functionName> </functions> . . . <roleCode>YFADMIN</roleCode> <roleDescription>This user has the widest range of access to the system, and as such you should have a very limited number of people assigned this role. They can do everything from create content through to managing system tasks.</roleDescription> <roleName>System Administrator</roleName> </roles> <sessionId>4f86f0e30e30bf4b07dea21267de0a74</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストです。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("LISTROLES");
リクエストを構成したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
Roles AdministrationRole[] ロールの一覧です。
完成例
以下は、LISTROLES関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_listrole.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_listroles.jsp」を実行します。
<% /* ws_listroles.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 webservices admin account rsr.setPassword("test"); // change to be the password of the account above rsr.setOrgId(1); rsr.setFunction("LISTROLES"); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success.<br>Available Roles:"); AdministrationRole[] roles = rs.getRoles(); for (AdministrationRole role: roles){ out.write("<br>"); out.write("<br>Role Name: " + role.getRoleName()); out.write("<br>Role Code: " + role.getRoleCode()); out.write("<br>Role Description: " + role.getRoleDescription()); // uncomment to display all the security functions: /* out.write("<br>Function Name | Code | Description | TypeCode | AccessLevelCode"); for (AdministrationFunction f: role.getFunctions()){ out.write("<br>" + f.getFunctionName() + " | " + f.getFunctionCode() + " | " + f.getFunctionDescription() + " | " + f.getFunctionTypeCode() + " | " + f.getAccessLevelCode()); } */ } } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
こちらの関数は、新規ロールを作成し、ロール機能を更新します。リクエストは、ロール詳細を指定するためのAdministrationRoleオブジェクトと、ロールのためのAdministrationFunctionの配列を含まなくてはいけません。こちらの関数が、ロールの更新、または新規ロール作成に使用されるか同課に関わらず、すべてのYellowfinロールは、必須関数であるレポートアクセス(関数コード:MIREPORT)を要求することに注意してください。MIREPORTには、アクセスレベルコードとして、最低でもR(読み取り)を設定 しなくてはいけません。こちらの関数が呼び出される度に、セキュリティ関数は上書きされます。
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「SAVEROLE」に設定します。 |
Role | AdministrationRole | こちらのオブジェクトは追加、または更新されるロールの詳細を含みます。詳細は、以下の表を参照してください。 |
以下は、こちらの関数のために、「AdministrationRole」オブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationRole 要素 | データ型 | 説明 |
RoleCode | String | 既存のロールの内部コードを指定します。こちらのパラメーターは、既存のロールを更新したい場合には、必ず含めなくてはいけません。こちらを指定しない場合は、既に同名のロールが存在するとしても、新規ロールとして作成されます。 |
RoleName | String
| 新規、または既存のロールの名前です。こちらは、既存のロールの変更時にも必須です。こちらを設定しない場合、呼び出しはロール名空白に設定します。 |
RoleDescription | String | ロールの説明です。 |
Function | AdministrationFunction | こちらのオブジェクトは、セキュリティ関数の一覧を含みます。これらは、SAVEROLE関数を呼び出す度に上書きされます。レポートアクセス関数は必須です。より詳細な情報は、以下の表を参照してください。 |
以下は、こちらのwebサービスのためにAdministrationFunctionオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationFunction要素 | データ型 | 説明 |
FunctionCode | String | セキュリティ関数のコードを指定します。例えば、レポートアクセス関数を含める場合は、MIREPORTと設定します。 |
AccessLevelCode | String | 関数のアクセスレベルです。例えば、Rは読み取りを意味します。 |
以下のSOAP XMLの例は、この呼び出しに渡すことのできるパラメーターを表示しています。
<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>SAVEROLE</function> <role> <roleCode>REPORTWRITER</roleCode> <roleName>Report Content Writer</roleName> <roleDescription>This role can generate reports.</roleDescription> <functions> <functionCode>MIREPORT</functionCode> <accessLevelCode>R</accessLevelCode> </functions> </role> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答要素
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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> <roles> <functions> <accessLevelCode>R</accessLevelCode> <functionCode>MIREPORT</functionCode> </functions> <roleCode>REPORTCONTENTWRITER</roleCode> <roleDescription>This role can generate reports.</roleDescription> <roleName>Report Content Writer</roleName> </roles> <sessionId>ceaa85d0ca1eb6057dc4facb0a7a5aa9</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストです。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("SAVEROLE");
ロールを指定します。
AdministrationRole role = new AdministrationRole();
既存のロールを変更する場合は、ロールコードが必須になります。
role.setRoleCode("NEWROLE"); // If you want to create a new role, comment this out.
ロールコードを指定しない場合は、同名のロールが既に存在しているとしても、新規ロールとして作成されます。
YellowfinデータベースのOrgRoleテーブルから、ロールコードを取得することができます。(通常これはロール名に基づき、すべて大文字のスペースなしで表現されます)
既存のロールを変更する場合でもロール名は必須です。ロール名を指定しない場合、呼び出しはこれを空白に設定します。
role.setRoleName("New Role"); role.setRoleDescription("testing");
SAVEROLE関数の呼び出し時には、セキュリティ機能の一覧を提供しなくてはいけません。この呼び出しは、ロール機能を上書きます。例えば、ロールに2つの機能を割り当てます。レポートアクセス(必須)、アクティビティストリーム(オプション)
AdministrationFunction[] f = new AdministrationFunction[1]; f[0] = new AdministrationFunction(); f[0].setFunctionCode("MIREPORT"); f[0].setAccessLevelCode("R"); f[1] = new AdministrationFunction(); f[1].setFunctionCode("ACTIVITYSTREAM"); f[1].setAccessLevelCode("CRUD");
セキュリティ機能を省略することはできません。呼び出しはエラーを生成します。
ロールにセキュリティ機能を割り当てます。
role.setFunctions(f); rsr.setRole(role);
リクエストを構成したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
完成例
以下は、SAVEROLE関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_saverole.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_saverole.jsp」を実行します。
<% /* ws_saverole.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("SAVEROLE"); //define a role: AdministrationRole role = new AdministrationRole(); role.setRoleCode("NEWROLE"); role.setRoleName("New Role"); role.setRoleDescription("testing"); AdministrationFunction[] f = new AdministrationFunction[2]; f[0] = new AdministrationFunction(); f[0].setFunctionCode("MIREPORT"); // mandatory f[0].setAccessLevelCode("R"); f[1] = new AdministrationFunction(); f[1].setFunctionCode("ACTIVITYSTREAM"); f[1].setAccessLevelCode("CRUD"); //Feed the security functions to the role: role.setFunctions(f); rsr.setRole(role); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
こちらの関数は、指定したユーザーロールを削除します。AdministrationRoleオブジェクトのロールコードを提供することで、対象のロールを指定することができます。
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「DELETEROLE」に設定します。 |
Role | AdministrationRole | 削除するロールの詳細を含むオブジェクトです。以下の表を参照してください。 |
以下は、「AdministrationRole」オブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationRole 要素 | データ型 | 説明 |
RoleCode | String | 削除される既存のロールの内部コードを指定します。 |
以下のSOAP XMLの例は、この呼び出しに渡すことのできるパラメーターを表示しています。
<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>DELETEROLE</function> <role> <roleCode>REPORTWRITER</roleCode> </role> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答要素
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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> <roles> <roleCode>REPORTWRITER</roleCode> </roles> <sessionId>6c494a263bb684c1082317d0e1d695eb</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストです。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("DELETEROLE");
削除するロールを定義します。
AdministrationRole role = new AdministrationRole(); role.setRoleCode("NEWROLE"); // existing role. Role Codes can be found by calling LISTROLES // or retrieved from the Yellowfin database table OrgRole. rsr.setRole(role);
リクエストを構成したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、StatusCodeとPeopleパラメーターが含まれます。詳細については、上記の応答パラメーターの表を参照してください。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
完成例
以下は、DELETEROLE関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_deleterole.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
インターネットブラウザから、「http://<host>:<port>/ws_deleterole.jsp」を実行します。
<% /* ws_deleterole.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 webservices admin account rsr.setPassword("test"); // change to the password of the above account above rsr.setOrgId(1); rsr.setFunction("DELETEROLE"); AdministrationRole role = new AdministrationRole(); role.setRoleCode("NEWROLE"); rsr.setRole(role); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
ユーザーグループ関数
ユーザーグループに関連するwebサービスは、以下のように定義されます。
LISTGROUPS関数は、Yellowfin内の利用可能なすべてのグループを返します。応答には、利用可能なグループを示すAdministrationGroupオブジェクトの配列が含まれます。特定のクライアントに所属するグループの一覧を取得する場合は、呼び出しにクライアント組織参照IDを渡します。
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「LISTGROUPS」に設定します。 |
OrgRef | String | 特定のクライアントに所属するグループの一覧を取得する場合は、クライアント組織IDを含めます。こちらが指定されない場合は、デフォルト組織のグループが返されます。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。
<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>LISTGROUPS</function> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答要素
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。
|
Groups | AdministrationGroup[] | グループの一覧です。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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> <groups> <groupDescription>This group contains all users with the Admin role.</groupDescription> <groupId>11950</groupId> <groupMembers> <internalId>5</internalId> <loginId>admin@yellowfin.com.au</loginId> </groupMembers> <groupMembers> <internalId>13000</internalId> <loginId>binish.sheikh@yellowfin.com.au</loginId> </groupMembers> <groupName>Administrators</groupName> </groups> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Web Service Request Complete</messages> <sessionId>79d937ead121745d93289f287d55b0ac</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的な呼び出しです。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("LISTGROUPS");
特定のクライアントのグループの一覧を取得する場合は、クライアント組織IDを含めます。(こちらを指定しない場合は、デフォルト(プライマリー組織)のグループが表示されます)
rsr.setOrgRef("org1");
リクエストの構成が完了したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
Groups AdministrationGroup[] グループの一覧です。
- AdministrationGroup.getGroupMembers()を使用することで、各グループのメンバーを取得することができます。これは、AdministrationGroupMemberの配列を取得します。グループにメンバーとしてのユーザーロールが含まれる場合、これは取得されません。getGroupMembers()を介して、ユーザーアカウントのみが取得されます。
完成例
以下は、LISTGROUPS関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_listgroups.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_listgroups.jsp」を実行します。
<% /* ws_listgroups.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("LISTGROUPS"); //rsr.setOrgRef("org1"); // provide org reference if required. Default org groups will be retrieved otherwise AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success.<br>Available Groups:"); AdministrationGroup[] groups = rs.getGroups(); for (AdministrationGroup group: groups){ out.write("<br>"); out.write("<br>Group Name: " + group.getGroupName()); out.write("<br>Group Id: " + group.getGroupId()); out.write("<br>Group Description: " + group.getGroupDescription()); out.write("<br>Group Status: " + group.getGroupStatus()); out.write("<br>Group Internal Reference: " + group.getGroupInternalReference()); // uncomment to display the members: /* out.write("<br>Members:<br>Login Id | Internal Id "); for (AdministrationGroupMember member: group.getGroupMembers()){ out.write("<br>" + member.getLoginId() + " | " + member.getInternalId() ); } */ } } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
特定のユーザーグループを、そのメンバーとともに取得する場合は、こちらの関数を使用します。リクエストには、必ずグループ名を提供しなくてはいけません。
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「GETGROUP」に設定します。 |
Group | AdministrationGroup | 取得するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 |
OrgRef | String | 特定のクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織のグループが検索されます。 |
以下は、こちらの関数のためにAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationGroup要素 | データ型 | 説明 |
GroupName | String | 詳細とメンバーの一覧を取得するユーザーグループの名前を指定します。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。
<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>GETGROUP</function> <group> <groupName>Administrators</groupName> </group> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答の要素
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
Group | AdministrationGroup[] | メンバーの一覧を含むグループの詳細です。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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> <group> <groupDescription>This group contains all users with the Admin role.</groupDescription> <groupId>11950</groupId> <groupMembers> <internalId>5</internalId> <loginId>admin@yellowfin.com.au</loginId> </groupMembers> <groupMembers> <internalId>13000</internalId> <loginId>binish.sheikh@yellowfin.com.au</loginId> </groupMembers> <groupName>Administrators</groupName> <groupStatus>OPEN</groupStatus> </group> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Web Service Request Complete</messages> <sessionId>54c5cf263f323b439c5834d1f6d8b645</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストです。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("GETGROUP");
特定のクライアント組織のグループ一覧を取得する場合は、クライアント組織IDを含めます。(こちらを指定しない場合は、デフォルト(プライマリー組織)組織のグループが表示されます)
rsr.setOrgRef("org1");
メンバーを取得するためにユーザーグループの名前を提供します。
AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Administrators"); rsr.setGroup(group);
リクエストの構成が完了したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
Group
AdministrationGroup[]
メンバーの一覧を含むグループの詳細です。
メンバーを取得するためには、以下を使用します。
AdministrationGroupMember[] members = rs.getGroup().getGroupMembers();
YellowfinアカウントのIpIdを取得するために、AdministrationGroupMember.getInternalId()を使用することができます。これを、GETUSERBYIPの呼び出しに渡すことで、ユーザーのAdministrationPersonオブジェクトが取得されます。
完成例
以下は、GETGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_getgroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_getgroup.jsp」を実行します。
<% /* ws_getgroup.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("GETGROUP"); //rsr.setOrgRef("org1"); // provide org reference ID if required. Default org will be searched otherwise AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Administrators"); rsr.setGroup(group); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success.<br>"); group = rs.getGroup(); out.write("<br>"); out.write("<br>Group Name: " + group.getGroupName()); out.write("<br>Group Id: " + group.getGroupId()); out.write("<br>Group Description: " + group.getGroupDescription()); out.write("<br>Group Status: " + group.getGroupStatus()); out.write("<br>Group Internal Reference: " + group.getGroupInternalReference()); // display the members: out.write("<br>Members:<br>Login Id | Internal Id "); for (AdministrationGroupMember member: group.getGroupMembers()){ out.write("<br>" + member.getLoginId() + " | " + member.getInternalId() ); } } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
こちらの関数は、特定のクライアント組織(参照IDが提供される場合)、またはデフォルト(プライマリー)組織のいずれかに新規ユーザーグループを作成します。新規グループの詳細は、AdministrationGroupオブジェクトを使用して渡されます。新規グループにメンバーを追加する場合は、AdministrationGroupMemberを介して、グループメンバーの詳細を提供します。(追加するメンバーは、既存のYellowfinユーザーでなくてはいけません)
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「CREATEGROUP」に設定します。 |
Group | AdministrationGroup | 追加するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 |
OrgRef | String | 特定のクライアント組織に新規グループを追加する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織にグループが作成されます。 |
以下は、こちらの関数のために、AdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationGroup要素 | データ型 | 説明 |
GroupName | String | 新規グループの名前です。 |
GroupMembers | AdministrationGroupMember | グループメンバーの詳細を提供するために使用されるオブジェクトです。以下の表を参照してください。 |
以下は、こちらの関数のために、AdministrationGroupMemberオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationGroupMember要素 | データ型 | 説明 |
LoginId | String | 既存のYellowfinユーザーのユーザーIDです。グループに追加するために必要です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。
<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>CREATEGROUP</function> <group> <groupName>Supervisors</groupName> <groupMembers> <loginId>admin@yellowfin.com.au</loginId> <loginId>binish.sheikh@yellowfin.com.au</loginId> </groupMembers> </group> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答の要素
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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>b1f1b17d503e1e11c05b72e674bc80ec</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストです。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("CREATEGROUP");
特定のクライアントに新規グループを追加する場合は、クライアント組織IDを含めます。(こちらを指定しない場合は、デフォルト(プライマリー)組織にグループが作成されます。)
rsr.setOrgRef("org1");
追加する新規グループのパラメーターを設定します。
AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Test Group");
グループにメンバーを含めます。例:
AdministrationGroupMember[] member = new AdministrationGroupMember[2]; member[0] = new AdministrationGroupMember(); member[0].setLoginId("admin@yellowfin.com.au"); member[1] = new AdministrationGroupMember(); member[1].setLoginId("john.smith@yellowfin.com.au"); group.setGroupMembers(member); rsr.setGroup(group);
リクエストの構成が完了したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
完成例
以下は、CREATEGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_creategroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じた詳細を追加するために、ホスト、ポート番号、管理ユーザー、ユーザーを調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_creategroup.jsp」を実行します。
<% /* ws_creategroup.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); AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService(); AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("CREATEGROUP"); //Specify client org (if omitted, the group will be created in the default (primary) org): rsr.setOrgRef("org1"); //Set parameters of the new group: AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Test Group"); // mandatory. Other parameters are optional. //Add members: AdministrationGroupMember[] member = new AdministrationGroupMember[2]; member[0] = new AdministrationGroupMember(); member[0].setLoginId("admin@yellowfin.com.au"); member[1] = new AdministrationGroupMember(); member[1].setLoginId("john.smith@yellowfin.com.au"); group.setGroupMembers(member); rsr.setGroup(group); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode() ); } %>
こちらの関数は、グループのメンバーを更新するために使用されます。このリクエストともにメンバーの一覧が提供される場合、既存のメンバー一覧は上書きされます。そのため、サービスは既存のメンバーをすべて削除し、新しいメンバーを追加します。メンバー一覧が提供されない場合は、グループ内の既存のユーザーすべてが削除されます。
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「MODIFYGROUP」に設定します。 |
Group | AdministrationGroup | 追加するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 |
OrgRef | String | 特定のクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが検索されます。 |
以下は、こちらの関数のために、AdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationGroup要素 | データ型 | 説明 |
GroupName | String | 新規グループの名前です。 |
GroupMembers | AdministrationGroupMember | グループメンバーの詳細を提供するために使用されるオブジェクトです。以下の表を参照してください。 |
以下は、こちらの関数のために、AdministrationGroupMemberオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationGroupMember要素 | データ型 | 説明 |
LoginId | String | 既存のYellowfinユーザーのユーザーIDです。グループに追加するために必要です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。
<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>MODIFYGROUP</function> <group> <groupName>Supervisors</groupName> <groupMembers> <loginId>admin@yellowfin.com.au</loginId> </groupMembers> </group> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答の要素
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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>6589bf668504fd3468e0b43844550a22</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストです。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("MODIFYGROUP");
特定のクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。(こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが検索されます。)
rsr.setOrgRef("org1");
新規グループのパラメーターを設定します。
AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Test Group");
グループにメンバーを含めます。例:
AdministrationGroupMember[] member = new AdministrationGroupMember[1]; member[0] = new AdministrationGroupMember(); member[0].setLoginId("admin@yellowfin.com.au"); group.setGroupMembers(member); rsr.setGroup(group);
リクエストの構成が完了したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
完成例
以下は、MODIFYGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_modifygroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループメンバー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_modifygroup.jsp」を実行します。
<% /* ws_modifygroup.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); AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService(); AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("MODIFYGROUP"); //Specify client org (if omitted, default (primary) org will be searched): rsr.setOrgRef("org1"); //Set parameters of the new group: AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Test Group"); // mandatory. Other parameters are optional. //Add members: AdministrationGroupMember[] member = new AdministrationGroupMember[1]; member[0] = new AdministrationGroupMember(); member[0].setLoginId("admin@yellowfin.com.au"); group.setGroupMembers(member); rsr.setGroup(group); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode() ); } %>
こちらの関数は、グループの名前を変更するために使用されます。AdministrationGroupオブジェクトと、グループのIDを使用して対象のグループを指定します。グループIDは、Yellowfinのデータベース(AccessGroupテーブルのAccessGroupIdフィールド)、またはグループ名とresponse.getGroup().getGroupId()を取得してGETGROUPを呼び出すことで取得することができます。
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「RENANEGROUP」に設定します。 |
Group | AdministrationGroup | 名前を変更するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 |
OrgRef | String | 特定のクライアント組織に新規グループを追加する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが作成されます。 |
以下は、こちらの関数のために、AdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationGroup要素 | データ型 | 説明 |
GroupId | Integer | グループを識別するための内部IDです。 |
GroupName | String | グループの新しい名前です。 |
GroupDescription | String | グループの説明です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。
<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>RENAMEGROUP</function> <group> <groupId>13001</groupId> <groupName>Report Creators</groupName> <groupDescription>Users of this group will create reports.</groupDescription> </group> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答の要素
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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>2ca79b1696913aa7a4f8b601ac1641a4</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストです。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("RENAMEGROUP");
特定のクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。(こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが検索されます。)
rsr.setOrgRef("org1");
名前を変更するグループを定義します。
AdministrationGroup group = new AdministrationGroup();
グループIDを使用して、グループを識別します。
group.setGroupId(13002);
新しいグループ名と説明を提供します。
group.setGroupName("Org 1"); group.setGroupDescription("Organization 1 user group"); rsr.setGroup(group);
リクエストの構成が完了したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
完成例
以下は、RENAMEGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_renamegroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループメンバー、グループIDを調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_renamegroup.jsp」を実行します。
<% /* ws_renamegroup.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"); //password of the account above rsr.setOrgId(1); rsr.setFunction("RENAMEGROUP"); rsr.setOrgRef("org1"); // provide org reference if required. Default org will be searched otherwise AdministrationGroup group = new AdministrationGroup(); group.setGroupId(13002); // identify the group to rename group.setGroupName("Org1"); // new group name group.setGroupDescription("Organization 1 user group"); // new description rsr.setGroup(group); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success.<br>"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
こちらの関数は、特定のYellowfinユーザーを特定のユーザーグループに追加する場合に使用されます。
リクエストパラメーター
以下のパラメーターは、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「DELETEGROUP」に設定します。 |
Group | AdministrationGroup | 削除するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 |
OrgRef | String | 特定のクライアント組織に新規グループを追加する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが検索されます。 |
以下は、こちらの関数のために、AdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationGroup要素 | データ型 | 説明 |
GroupName | String | 削除するグループの名前です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。
<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>DELETEGROUP</function> <group> <groupName>Admin</groupName> </group> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答のパラメーター
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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>db18f2503e80ca02a9d37da13fc540a5</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストから開始します。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("DELETEGROUP");
特定のクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが検索されます。
rsr.setOrgRef("org1");
削除するグループのパラメーターを設定します。
AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Test Group"); rsr.setGroup(group);
リクエストの構成が完了したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
完成例
以下は、DELETEGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_deletegroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_deletegroup.jsp」を実行します。
<% /* ws_deletegroup.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"); // set the password of the above account rsr.setOrgId(1); rsr.setFunction("DELETEGROUP"); rsr.setOrgRef("org1"); // specify a client org reference if required. Or skip this to search through the default org AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Test Group"); // this group must exist in the specified client org rsr.setGroup(group); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success.<br>"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
Yellowfinから既存のユーザーグループを削除するには、グループ名を提供し、こちらのwebサービスを呼び出します。
リクエストパラメーター
以下のパラメーターは、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「DELETEGROUP」に設定します。 |
Group | AdministrationGroup | 削除するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 |
OrgRef | String | 特定のクライアント組織に新規グループを追加する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが検索されます。 |
以下は、こちらの関数のために、AdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。
AdministrationGroup要素 | データ型 | 説明 |
GroupName | String | 削除するグループの名前です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。
<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>DELETEGROUP</function> <group> <groupName>Admin</groupName> </group> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
応答のパラメーター
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
|
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
<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>db18f2503e80ca02a9d37da13fc540a5</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
以下は、こちらの関数の基礎的なリクエストから開始します。
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("DELETEGROUP");
特定のクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが検索されます。
rsr.setOrgRef("org1");
削除するグループのパラメーターを設定します。
AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Test Group"); rsr.setGroup(group);
リクエストの構成が完了したら、呼び出しを実行します。
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 データ型 説明 StatusCode
String
Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。
- SUCCESS
- FAILURE
完成例
以下は、DELETEGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_deletegroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_deletegroup.jsp」を実行します。
<% /* ws_deletegroup.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"); // set the password of the above account rsr.setOrgId(1); rsr.setFunction("DELETEGROUP"); rsr.setOrgRef("org1"); // specify a client org reference if required. Or skip this to search through the default org AdministrationGroup group = new AdministrationGroup(); group.setGroupName("Test Group"); // this group must exist in the specified client org rsr.setGroup(group); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success.<br>"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
- No labels