こちらの項目では、その他のwebサービスについて紹介します。
テスト関数
以下のwebサービスはテストや、その他基礎的な関数に使用することができます。
Expand |
---|
|
こちらの関数は、Yellowfinサーバが有効かどうかを確認するテスト呼び出しの実行に使用します。サーバとの接続が確立されるとSuccessメッセージを返し、失敗した場合はFailureメッセージを返します。 リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスに接続する管理者アカウントです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「TEST」に設定します。 |
リクエストの例以下は、こちらのリクエストの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>
<orgRef>org1</orgRef>
<function>TEST</function>
</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>0c411f82a9f04ddc6c3336a6da294761</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("TEST"); |
リクエストを構成したら、呼び出しを実行してサーバをテストします。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_test.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_test.jsp」を実行します。
Code Block |
---|
| <%
/* ws_test.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 according to your setting
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("TEST");
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 |
---|
|
こちらのwebサービスも、Yellowfinサーバが有効かどうかをテストするために使用することができます。サーバとの接続を試行し、Success、またはFailureの応答を返します。 リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスに接続する管理者アカウントです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「INFO」に設定します。 |
リクエストの例以下は、こちらのリクエストの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>
<orgRef>org1</orgRef>
<function>INFO</function>
</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>45a10389d35349476efd2c8246d72b69</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("INFO"); |
リクエストを構成したら、呼び出しを実行してサーバをテストします。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_info.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_info.jsp」を実行します。
Code Block |
---|
| <%
/* ws_info.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 according to your setting
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("INFO");
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("<br>Success");
}
else {
out.write("<br>Failure");
out.write(" Code: " + rs.getErrorCode());
}
*/
%> |
|
SQLクエリー関数
Expand |
---|
|
こちらの関数は、SQLクエリーを使用してYellowfinデータベースを管理するために使用します。例えば、SELECTコマンドを使用してデータベースから情報を取得したり、DELETEやINSERTを使用してデータベーステーブルを管理することもできます。この関数は、データベースのパスワードを要求しますが、これは以下に示す設定を変更することで無効にすることもできます。 ご利用の環境でこの機能を有効化し、設定を変更する方法は、以下をクリックして確認してください。 Expand |
---|
| - WEB-INFディレクトリから「web.xml」ファイルを開きます(appserver\webapp\ROOT\WEB-INF\web.xml)。
ファイルに以下のコードを追加します。
Code Block |
---|
| <init-param>
<param-name>EnableQueryWebservice</param-name>
<param-value>TRUE</param-value>
</init-param> |
この関数はデフォルトでデータベースパスワードを要求しますが、以下のコードを同様のファイルに追加することで、これを無効にすることができます。必要ない場合は、この手順をスキップしてください。
Code Block |
---|
| <init-param>
<param-name>DisableQueryWebservicePassword</param-name>
<param-value>TRUE</param-value>
</init-param> |
- web.xmlファイルを保存し、実行していた場合はYellowfinを再起動します。
- こちらのwebサービスが有効化されていない場合は、METADATASQLQUERYの呼び出しを実行した後に、Yellowfinログに「Query Webservice not enabled(クエリーwebサービスが有効化されていません)」というエラーが表示されます。
|
リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスに接続する管理者アカウントです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「METADATASQLQUERY」に設定します。 | Query | String | Yellowfinデータベース上で実行するSQLクエリーです。 | Parameter | String[] | Yellowfinデータベースのパスワードを渡すために使用します。(パスワードとして設定することのできる)配列の最初の要素のみ要求されますが、(上記手順で明記しているように)こちらの要件を無効にする場合は、このパラメーターは要求されません。 |
リクエストの例以下は、こちらのリクエストの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>METADATASQLQUERY</function>
<query>SELECT * FROM person</query>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | QueryResults | ReportRow | SELECTがリクエストクエリーだった場合の結果セットのロウ(行)の配列です。 |
応答の例サービスは今回の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>
<queryResults>
<dataValue>5</dataValue>
<dataValue>Administrator</dataValue>
<dataValue>System</dataValue>
<dataValue/>
<dataValue/>
<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<dataValue>ATMN SSTM</dataValue>
<dataValue/>
<dataValue>System Administrator</dataValue>
<dataValue>System Administrator</dataValue>
<dataValue>EN</dataValue>
<dataValue>PRIVATE</dataValue>
<dataValue>4</dataValue>
<dataValue>EMAIL</dataValue>
<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<dataValue>AUSTRALIA/SYDNEY</dataValue>
<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<dataValue>ACTIVE</dataValue>
</queryResults>
<sessionId>804451ca30ad4a3065e4b67a9293440c</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("METADATASQLQUERY"); |
実行するSQLクエリーを提供します。 Code Block |
---|
| rsr.setQuery("SELECT * FROM configuration WHERE ConfigTypeCode = 'SYSTEM'"); |
リクエストを構成したら、呼び出しを実行してサーバをテストします。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_metadatasqlquery.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_metadatasqlquery.jsp」を実行します。
Code Block |
---|
| <%
/* ws_metadatasqlquery.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("METADATASQLQUERY");
rsr.setQuery("SELECT * FROM configuration WHERE ConfigTypeCode = 'SYSTEM'");
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("<br>Success");
ReportRow[] rows = rs.getQueryResults();
if (rows != null)
for (ReportRow rr: rows){
String[] str = rr.getDataValue();
out.write("<br>");
for (String s: str)
out.write("<br>" + s);
}
}
else {
out.write("<br>Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
フォルダー管理関数
以下のwebサービスは(以前までカテゴリー・サブカテゴリーと表記していた)レポート、ダッシュボード、その他コンテンツを保存するYellowfinのフォルダー・サブフォルダーを管理するために使用します。
Expand |
---|
|
こちらのwebサービスは、Yellowfinの閲覧ページのすべてのカテゴリー・サブカテゴリー(現在は、フォルダー・サブフォルダー)を返します。 リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスに接続する管理者アカウントです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「GETCATEGORIES」に設定します。 | OrgRef | String | 特定のクライアント組織上でこのサービスを使用するためのクライアント組織参照IDです。こちらを指定しない場合は、デフォルト組織が選択されます。 |
リクエストの例以下は、こちらのリクエストの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>
<orgRef>org1</orgRef>
<function>GETCATEGORIES</function>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | ContentResources | ContentResource[] | フォルダー・サブフォルダ―の詳細を含むオブジェクト配列です。 |
応答の例サービスは今回の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>
<contentResources>
<resourceCode>AUDITREPORTS</resourceCode>
<resourceDescription>Audit Reports</resourceDescription>
<resourceId>56339</resourceId>
<resourceName>Audit Reports</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTCATEGORY</resourceType>
<resourceUUID>a6bdc6b5-a832-42a2-98c7-18273900d0aa</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>ADMINREPORTS</resourceCode>
<resourceDescription>Admin Reports</resourceDescription>
<resourceId>56340</resourceId>
<resourceName>Admin Reports</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTSUBCATEGORY</resourceType>
<resourceUUID>f7fb32b7-1573-4899-916f-c34afb9a865d</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>CONTENTUSAGE</resourceCode>
<resourceDescription>Content Usage</resourceDescription>
<resourceId>56341</resourceId>
<resourceName>Content Usage</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTSUBCATEGORY</resourceType>
<resourceUUID>6bae5230-c1f9-4491-8a8b-f14b1ae660d7</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>USERACCESS</resourceCode>
<resourceDescription>User Access</resourceDescription>
<resourceId>56342</resourceId>
<resourceName>User Access</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTSUBCATEGORY</resourceType>
<resourceUUID>0c7ddde4-fa03-4e88-b37b-7b5e4aad5e1d</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>TUTORIAL</resourceCode>
<resourceDescription>Tutorial</resourceDescription>
<resourceId>60706</resourceId>
<resourceName>Tutorial</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTCATEGORY</resourceType>
<resourceUUID>a23c2ec6-a2fa-45c7-b5da-dcf3f02e6633</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>ATHLETES</resourceCode>
<resourceDescription>Athletes</resourceDescription>
<resourceId>60707</resourceId>
<resourceName>Athletes</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTSUBCATEGORY</resourceType>
<resourceUUID>72e4b4bd-a482-4a01-a031-c6ab76dbb3a5</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>CAMP</resourceCode>
<resourceDescription>Camp</resourceDescription>
<resourceId>60708</resourceId>
<resourceName>Camp</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTSUBCATEGORY</resourceType>
<resourceUUID>465411e5-594b-478e-af64-c0f59fc4546f</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>KPIS</resourceCode>
<resourceDescription>KPIs</resourceDescription>
<resourceId>60709</resourceId>
<resourceName>KPIs</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTSUBCATEGORY</resourceType>
<resourceUUID>d514c643-dc01-4781-8905-d34e761ccd19</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>MARKETINGBOOKING</resourceCode>
<resourceDescription>Marketing & Booking</resourceDescription>
<resourceId>60710</resourceId>
<resourceName>Marketing & Booking</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTSUBCATEGORY</resourceType>
<resourceUUID>dbe6d0a3-c088-4d71-b65a-f383aaa54be9</resourceUUID>
</contentResources>
<contentResources>
<resourceCode>TRAINING</resourceCode>
<resourceDescription>Training</resourceDescription>
<resourceId>60711</resourceId>
<resourceName>Training</resourceName>
<resourceOrgId>1</resourceOrgId>
<resourceType>RPTSUBCATEGORY</resourceType>
<resourceUUID>c503ea57-cc69-43a9-98bc-a90ebbe1c864</resourceUUID>
</contentResources>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>fd3afecb73fe48578501f29e4d00065b</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("GETCATEGORIES"); |
リクエストを構成したら、呼び出しを実行してサーバをテストします。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_getcategories.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_getcategories.jsp」を実行します。
Code Block |
---|
| <%
/* ws_getcategories.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("GETCATEGORIES");
//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());
}
%> |
|
Expand |
---|
|
こちらのwebサービスは、Yellowfinの閲覧ページのすべてのカテゴリー・サブカテゴリー(現在は、フォルダー・サブフォルダ―)で、(有効化されていない)ドラフト(編集中)モードのものを返します。 注意:Yellowfin 7.3からカテゴリー・サブカテゴリーは、ドラフト(編集中)として保存することができないため、これは古いバージョンのYellowfinにのみ関連する機能です。 リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスに接続する管理者アカウントです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「GETDRAFTCATEGORIES」に設定します。 | OrgRef | String | 特定のクライアント組織上でこのサービスを使用するためのクライアント組織参照IDです。こちらを指定しない場合はデフォルト組織が選択されます。 |
リクエストの例以下は、こちらのリクエストの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>
<orgRef>org1</orgRef>
<function>GETDRAFTCATEGORIES</function>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | ContentResources | ContentResource[] | ドラフト(編集中)のフォルダー・サブフォルダーの詳細を含むオブジェクト配列です。 |
応答の例サービスは今回の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>
<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 |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数のリクエストを定義します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("GETDRAFTCATEGORIES"); |
リクエストを構成したら、呼び出しを実行してサーバをテストします。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_getdraftcategories.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_getdraftcategories.jsp」を実行します。
Code Block |
---|
| <%
/* 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());
}
%> |
|
Expand |
---|
|
こちらのwebサービスは、Yellowfinの閲覧ページから特定のカテゴリー・サブカテゴリー(現在は、フォルダー・サブフォルダー)を削除します。 リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスに接続する管理者アカウントです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「DELETECATEGORY」に設定します。 | ContentResources | ContentResource[] | 削除するカテゴリー(フォルダー)の説明を含むContent Resourcesのオブジェクト配列です。以下の表を参照してください。 | OrgRef | String | 特定のクライアント組織上でこのサービスを使用するためのクライアント組織参照IDです。こちらを指定しない場合はデフォルト組織が選択されます。 |
以下はContentResourceオブジェクト内で提供される必須パラメーターです。 ContetType | FavouriteType | CreationCode | ResourceType | String | コンテンツのタイプを指定します。これはRPTCATEGORY、またはRPTSUBCATEGORYのいずれかを設定します。 | ResourceCode | String | コンテンツタイプに固有のコードです。 ヒント:ResourceCodeが不明の場合は、GETCATEGORIESの呼び出しを実行するか、Yellowfinのデータベースを直接検索することで見つけることができます。 以下の場合は、RefTypeCode IN(「RPTCATEGORY」、「RPTSUBCATEGORY」)を使用して、orgReferenceCodeDesデータベーステーブルにフィルターを適用します。 - ShortDescriptionがフォルダー・サブフォルダー名
- RefTypeCodeがresourceType
- RefCodeがresourceCode
|
リクエストの例以下は、こちらのリクエストの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>
<orgRef>org1</orgRef>
<function>DELETECATEGORY</function>
<contentResources>
<resourceTyp>RPTSUBCATEGORY</resourceTyp>
<resourceCode>SUBCAT2ORG1</resourceCode>
</contentResources>
</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>359f5fce5ce26028acb2432720995a62</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("DELETECATEGORY"); |
削除するカテゴリー、またはフォルダーの詳細を渡します。 Code Block |
---|
| 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 |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_deletecategory.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_deletecategory.jsp」を実行します。
Code Block |
---|
| <%
/* ws_deletecategory.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("DELETECATEGORY");
rsr.setOrgRef("org1");
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);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("<br>Success");
}
else {
out.write("<br>Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|