30日間の無料評価版をお試しいただけます。

Versions Compared

Key

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

...

Expand
titleGETDRAFTCATEGORIES

こちらのwebサービスは、Yellowfinの閲覧ページのすべてのカテゴリー・サブカテゴリー(現在は、フォルダー・サブフォルダ―)で、(有効化されていない)ドラフト(編集中)モードのものを返します。

注意:この機能は、Yellowfin 注意:Yellowfin 7.3よりも古いバージョンのYellowfinにのみ関連します。カテゴリー・サブカテゴリーは、ドラフト(編集中)として保存することはできません。3からカテゴリー・サブカテゴリーは、ドラフト(編集中)として保存することができないため、これは古いバージョンのYellowfinにのみ関連する機能です。

 

リクエストパラメーター

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

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

LoginId

String

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

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

Password

String

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

OrgId

Integer

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

Function

String

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

OrgRefString特定のクライアント組織上でこのサービスを使用するためのクライアント組織参照IDです。こちらを指定しない場合はデフォルト組織が選択されます。

リクエストの例

以下は、こちらのリクエストの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>
            <orgRef>org1</orgRef>
            <function>GETDRAFTCATEGORIES</function>
        </arg0>
    </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

応答パラメーター

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

応答要素データ型説明

StatusCode

String

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

  • SUCCESS
  • FAILURE
ContentResourcesContentResource[]ドラフト(編集中)のフォルダー・サブフォルダーの詳細を含むオブジェクト配列です。

応答の例

サービスは今回の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>
            <contentResources>
            <resourceCode>REPORTS</resourceCode>
               <resourceDescription>Reports</resourceDescription>
               <resourceId>73674</resourceId>
               <resourceName>Reports</resourceName>
               <resourceOrgId>13004</resourceOrgId>
               <resourceType>RPTCATEGORY</resourceType>
               <resourceUUID>3bc780d7-6638-4520-b233-77ad6e24ae3d</resourceUUID>
            </contentResources>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>3f09ab77656b3632ab05786aa0fa4570</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("GETDRAFTCATEGORIES");
  • リクエストを構成したら、呼び出しを実行してサーバをテストします。

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

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

 

  • フォルダー・サブフォルダーの詳細を含む応答を取得するために、以下のコードを追加します。(詳細は、上記応答パラメーターの表を参照してください)

     

    Code Block
    themeEclipse
    languagejava
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
                    out.write("<br>Success");
                    ContentResource[] cr = rs.getContentResources();
                    for (ContentResource x: cr){
                                        out.write("resourceCode: " + x.getResourceCode() + "<br>");
                                        out.write("resourceDescription: " + x.getResourceDescription() + "<br>");
                                        out.write("resourceId: " + x.getResourceId() + "<br>");
                                        out.write("resourceName: " + x.getResourceName() + "<br>");
                                        out.write("resourceOrgId: " + x.getResourceOrgId() + "<br>");
                                        out.write("resourceType: " + x.getResourceType() + "<br>");
                                        out.write("resourceUUID: " + x.getResourceUUID() + "<br><br>");
                    }
    }
    else {
                    out.write("<br>Failure");
                    out.write(" Code: " + rs.getErrorCode());
    }

 

完成例

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

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

Code Block
themeEclipse
languagejava
<%          
/*              ws_getdraftcategories.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("GETDRAFTCATEGORIES");
//rsr.setOrgRef("org1");
  
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
  
if ("SUCCESS".equals(rs.getStatusCode()) ) {
                out.write("<br>Success");
                ContentResource[] cr = rs.getContentResources();
                for (ContentResource x: cr){
                                    out.write("resourceCode: " + x.getResourceCode() + "<br>");
                                    out.write("resourceDescription: " + x.getResourceDescription() + "<br>");
                                    out.write("resourceId: " + x.getResourceId() + "<br>");
                                    out.write("resourceName: " + x.getResourceName() + "<br>");
                                    out.write("resourceOrgId: " + x.getResourceOrgId() + "<br>");
                                    out.write("resourceType: " + x.getResourceType() + "<br>");
                                    out.write("resourceUUID: " + x.getResourceUUID() + "<br><br>");
                }
}
else {
                out.write("<br>Failure");
                out.write(" Code: " + rs.getErrorCode());
}              
%>

応答の例

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

管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数のリクエストを定義します。

Expand
titleDELETECATEGORY

こちらのwebサービスは、Yellowfinの閲覧ページから特定のカテゴリー・サブカテゴリー(現在は、フォルダー・サブフォルダ―)を削除します。こちらのwebサービスは、Yellowfinの閲覧ページから特定のカテゴリー・サブカテゴリー(現在は、フォルダー・サブフォルダー)を削除します。

 

リクエストパラメーター

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

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

LoginId

String

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

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

Password

String

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

OrgId

Integer

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

Function

String

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

ContentResourcesContentResource[] 削除するカテゴリー(フォルダー)の説明を含むContent Resourcesのオブジェクト配列です。以下の表を参照してください。
OrgRefString特定のクライアント組織上でこのサービスを使用するためのクライアント組織参照IDです。こちらを指定しない場合はデフォルト組織が選択されます。

 

以下はContentResourceオブジェクト内で提供される必須パラメーターです。

ContetTypeFavouriteTypeCreationCode

ResourceType

String

コンテンツのタイプを指定します。これはRPTCATEGORY、またはRPTSUBCATEGORYのいずれかを設定します。

ResourceCode

String

コンテンツタイプに固有のコードです。

ヒント:ResourceCodeが不明の場合は、GETCATEGORIESの呼び出しを実行するか、Yellowfinのデータベースを直接検索することで見つけることができます。

以下の場合は、RefTypeCode IN(「RPTCATEGORY」、「RPTSUBCATEGORY」)を使用して、orgReferenceCodeDesデータベーステーブルにフィルターを適用します。

  • ShortDescriptionがフォルダー・サブフォルダー名
  • RefTypeCoderesourceType
  • RefCoderesourceCode

リクエストの例

以下は、こちらのリクエストの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>
            <orgRef>org1</orgRef>
            <function>GETCATEGORIES<<function>DELETECATEGORY</function>
            <contentResources>
             </arg0>   <resourceTyp>RPTSUBCATEGORY</resourceTyp>
    </web:remoteAdministrationCall>
            <resourceCode>SUBCAT2ORG1</resourceCode>
            </soapenv:contentResources>
        </arg0>
    </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>

 

応答パラメーター

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

応答要素データ型説明

StatusCode

String

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

  • SUCCESS
  • FAILURE
BinaryDataString(Yellowfinリポジトリデータベースから)指定したConfiguration.configCode要素のconfigDataの値を含みます。構成テーブル内に指定したConfigCodeが見つからない場合は、Null値が返されます。

手順

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

Expand
title詳細手順
java
Code Block
themeEclipse
language
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>359f5fce5ce26028acb2432720995a62</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");
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
      
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");  
    rsr.setOrgId(1);
    rsr.setFunction("LOADCUSTOMPARAMETERDELETECATEGORY");
  • パラメーターオブジェクト内で更新するシステム構成設定を渡します。以下のコード例では、Yellowfinの認証方法を「Simple」に設定しています。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setParameters(new String[]{"SIMPLE_AUTHENTICATION"});
  • 削除するカテゴリー、またはフォルダーの詳細を渡します。

     

    Code Block
    themeEclipse
    languagejava
    ContentResource[] cr = new ContentResource[1];
    cr[0] = new ContentResource();
    cr[0].setResourceType("RPTSUBCATEGORY");
    cr[0].setResourceCode("SUBCAT2ORG1");           // my sub category or subcategory code
      
    rsr.setContentResources(cr);
  • リクエストを構成したら、呼び出しを実行してサーバをテストします。リクエストを構成したら、呼び出しを実行します。

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

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

 

  • 応答を取得するために以下のコードを追加します。(返される応答については、上記応答パラメーターの表を参照してください)StatusCodeを含む応答を取得するために、以下のコードを追加します。(詳細は、上記応答パラメーターの表を参照してください)

     

    Code Block
    themeEclipse
    languagejava
    if ("SUCCESS".equals(rs.getStatusCode()) )if ("SUCCESS".equals(rs.getStatusCode()) ) {
                    out.write("<br>Success");
                    }
                    else {
                    out.write("<br>Success<br>Failure");
                    String data =out.write(" Code: " + rs.getBinaryDatagetErrorCode());
                    out.write("<br>ConfigData: " + data);
    }

 

完成例

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

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

Code Block
themeEclipse
languagejava
Code Block
themeEclipse
languagejava
<%          
/*         
} else
 
{
    ws_deletecategory.jsp          
out.write("<br>Failure");
             */
%>
<%@ page language="java" 
out.write(" Code: " + rs.getErrorCode()); }

 

完成例

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

  • コードをコピーして、「ws_loadcustomparameter.jsp」として保存します。
  • root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
  • 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
  • インターネットブラウザから、「http://<host>:<port>/ws_loadcustomparameter.jsp」を実行します。
    /*              ws_loadcustomparameter.jsp               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");       */
    %>
    <%@ 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); provide your Yellowfin webservices admin account
    rsr.setPassword("test");                        // adjustchange hostto andthe portpassword number
    AdministrationServiceSoapBindingStubof adminServicethe = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService(account above
    rsr.setOrgId(1);
    AdministrationServiceRequest rsr = new AdministrationServiceRequest(rsr.setFunction("DELETECATEGORY");
      
    rsr.setLoginIdsetOrgRef("admin@yellowfin.com.auorg1");
      
    ContentResource[] cr = new  // provide your Yellowfin web services admin account
    rsr.setPassword("test");             ContentResource[1];
    cr[0] = new ContentResource();
    cr[0].setResourceType("RPTSUBCATEGORY");
    cr[0].setResourceCode("SUBCAT2ORG1");           // setmy tosub thecategory passwordor ofsubcategory thecode
     account above
    rsr.setOrgId(1);
    rsr.setFunction("LOADCUSTOMPARAMETER"setContentResources(cr);
      
    rsr.setParameters(new String[]{"SIMPLE_AUTHENTICATION"});
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
      
    if ("SUCCESS".equals(rs.getStatusCode()) ) {
                    out.write("<br>Success");
    String data = rs.getBinaryData();
                    out.write("<br>ConfigData: " + data);}
                    }
    else {
                    out.write("<br>Failure");
                    out.write(" Code: " + rs.getErrorCode());
                    }              
    %>

     

    horizontalrule
    Styleclass
    ClasstopLink

    ページトップ