指定したユーザーのクライアント組織へのアクセスを削除する場合は、こちらのwebサービスの呼び出しを使用します。AdministrationPersonとAdministrationClientOrgオブジェクトを使用して、それぞれユーザーとクライアント組織を識別することができます。 削除されたユーザーは、どのクライアント組織に属さないとして、システム内には残ります。システムからユーザーアカウントを削除するためには、DELETEUSERの呼び出しを実行します。または、ADDUSERACCESSの呼び出しを使用して、ユーザーをデフォルト組織に追加することもできます。 リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「REMOVEUSERACCESS」に設定します。 | Person | AdministrationPerson | ユーザーの詳細を含むオブジェクトです。以下の表を参照してください。 | Client | AdministrationClientOrg | クライアント組織の詳細を含むオブジェクトです。以下の表を参照してください。 |
以下は、こちらのwebサービスの呼び出しのAdministrationPersonオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationPerson要素 | データ型 | 説明 | UserID | String | 所属するクライアント組織へのアクセスを削除するユーザーを識別します。これは、ログインID方法に応じて、ユーザーID、または電子メールアドレスになります。 |
以下は、こちらのwebサービスの呼び出しのAdministrationClientOrgオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationClientOrg要素 | データ型 | 説明 | ClientReferenceID | String | ユーザーを削除する既存のクライアント組織を識別します。 |
リクエストの例以下は、こちらのリクエストのSOAP XMLの例です。 Code Block |
---|
| <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>REMOVEUSERACCESS</function>
<person>
<userId>binish.sheikh@yellowfin.com.au</userId>
</person>
<client>
<clientReferenceId>org2</clientReferenceId>
</client>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <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>a30aafab603330389d2bfb5a3e0faae7</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("REMOVEUSERACCESS"); |
クライアント組織から削除するユーザーを定義します。
Code Block |
---|
| AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("admin@yellowfin.com.au");
rsr.setPerson(ap); |
対象のクライアント組織を指定します。
Code Block |
---|
| AdministrationClientOrg ac = new AdministrationClientOrg();
ac.setClientReferenceId("org3"); // must be an existing client org
rsr.setClient(ac); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_removeuseraccess.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、削除するユーザー、クライアント組織参照IDの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_removeuseraccess.jsp」を実行します。
Code Block |
---|
| <%
/* ws_removeuseraccess.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 to the password of the above account
rsr.setOrgId(1);
rsr.setFunction("REMOVEUSERACCESS");
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("admin@yellowfin.com.au");
rsr.setPerson(ap);
AdministrationClientOrg ac = new AdministrationClientOrg();
ac.setClientReferenceId("org3"); // must be an existing client org
rsr.setClient(ac);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|