Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleGETUSERACCESS

指定したユーザーが所属するすべてのクライアント組織の一覧を取得する場合は、こちらのwebサービスの呼び出しを使用します。AdministrationPersonオブジェクトを使用して、ユーザーを識別することができます。


リクエストパラメーター

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

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

LoginId

String

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

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

Password

String

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

OrgId

Integer

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

Function

String

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

PersonAdministrationPersonユーザーの詳細を含むオブジェクトです。以下の表を参照してください。


以下は、こちらのwebサービスの呼び出しのAdministrationPersonオブジェクトに設定しなくてはいけない主要なパラメーターです。

AdministrationPerson要素データ型説明
UserIDString所属するクライアント組織を取得するユーザーを識別します。


リクエストの例

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

Code Block
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>GETUSERACCESS</function>
            <person>
                <userId>admin@yellowfin.com.au</userId>
            </person>
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>


応答パラメーター

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

応答要素データ型説明

StatusCode

String

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

  • SUCCESS
  • FAILURE
PersonAdministrationPerson[]ユーザーが所属するすべてのクライアント組織を含むオブジェクト配列です。

応答の例

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

Code Block
languagexml
themeEclipse
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <clients>
               <clientId>1</clientId>
               <clientName>Default</clientName>
               <defaultOrg>true</defaultOrg>
               <timeZoneCode>AUSTRALIA/BRISBANE</timeZoneCode>
            </clients>
            <clients>
               <clientId>13004</clientId>
               <clientName>Organization 2</clientName>
               <clientReferenceId>org2</clientReferenceId>
               <defaultOrg>false</defaultOrg>
            </clients>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>fa52a1be31b08a3c44cfeb5198f42164</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>


手順

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

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

  • SUCCESS
  • FAILURE

Clients

: AdministrationClientOrg[]

ユーザーが所属するクライアントの一覧です。

- ユーザーが所属するクライアントの一覧です。

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

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


  • 所属するクライアントの一覧を取得するユーザーを定義します。


    Code Block
    languagejava
    themeEclipse
    AdministrationPerson ap = new AdministrationPerson();
    ap.setUserId("admin@yellowfin.com.au");
     
    rsr.setPerson(ap);


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

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

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


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

応答要素データ型説明

StatusCode

String

応答要素データ型説明








完成例

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

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

Code Block
languagejava
themeEclipse
<%           
/*              ws_getuseraccess.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("GETUSERACCESS");
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("admin@yellowfin.com.au");           // get user access to admin user's client list
 
rsr.setPerson(ap);
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
    out.write("Success");      
    AdministrationClientOrg[] orgs = rs.getClients();
    out.write("<br>Number of Orgs: " + orgs.length + "<br>");
    out.write("<br>Org Name (Org Reference Id):");
 
 
    for (AdministrationClientOrg ac: orgs){
 
        out.write("<br>" + ac.getClientName() + " (" + ac.getClientReferenceId() + ")");
 
    }
} else {
    out.write("Failure");
    out.write(" Code: " + rs.getErrorCode());
}
%>


...