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

Anchor
top
top

...

Expand
titleAPPROVEREPORT

こちらのwebサービスは、レポートを承認するために使用します。レポート承認者は、(このアカウントが承認者として一覧化されていないとしても)LonginIdパラメーターを使用して指定されたアカウントのユーザーです。

 

リクエストパラメーター

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

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

LoginId

String

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

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

Password

String

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

OrgId

Integer

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

Function

String

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

ReportIdInteger承認が必要なレポートの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>
            <function>APPROVEREPORT</function>
            <reportId>73740</reportId>
        </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>4e375028ec457bba4985965d5d71e64e</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("APPROVEREPORT");
  • そのIDを提供することで、承認が必要なレポートを指定します。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setReportId(73740);
  • リクエストを構成したら、呼び出しを実行してサーバをテストします。

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

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

 

  • webサービスの応答であるStatusCodeを取得します。

     

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

 

完成例

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

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

Code Block
themeEclipse
languagejava
<%          
/*              ws_approvereport.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 account above
rsr.setOrgId(1);
rsr.setFunction("APPROVEREPORT");
rsr.setReportId(73740);
  
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
  
if ("SUCCESS".equals(rs.getStatusCode()) ) {
                out.write("<br>Success");
                 
}
else {
                out.write("<br>Failure");
                out.write(" Code: " + rs.getErrorCode());
}              
%>
Expand
titleREJECTREPORT

こちらのwebサービスは、ドラフト(編集中)モードに変更することで、レポートを却下します。レポート承認者は、(このアカウントが承認者として一覧化されていないとしても)LonginIdパラメーターを使用して指定されたアカウントのユーザーです。

 

リクエストパラメーター

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

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

LoginId

String

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

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

Password

String

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

OrgId

Integer

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

Function

String

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

ReportIdInteger却下が必要なレポートの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>
            <function>REJECTREPORT</function>
            <reportId>73740</reportId>
        </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>4e375028ec457bba4985965d5d71e64e</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("REJECTREPORT");
  • そのIDを提供することで、却下するレポートを指定します。

     

    Code Block
    themeEclipse
    languagejava
    rsr.setReportId(73740);
  • リクエストを構成したら、呼び出しを実行してサーバをテストします。

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

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

 

  • webサービスの応答であるStatusCodeを取得します。

     

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

 

完成例

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

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

Code Block
themeEclipse
languagejava
<%          
/*              ws_rejectreport.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 account above
rsr.setOrgId(1);
rsr.setFunction("REJECTREPORT");
rsr.setReportId(73740);
  
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
  
if ("SUCCESS".equals(rs.getStatusCode()) ) {
                out.write("<br>Success");
                 
}
else {
                out.write("<br>Failure");
                out.write(" Code: " + rs.getErrorCode());
}              
%>

...