...
Expand |
---|
|
こちらのwebサービスは、OrgIdパラメーターで指定された組織内で、利用可能なすべてのスケジュールを読み込みます。
リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「LISTSCHEDULES」に設定します。 |
リクエストの例以下は、こちらのリクエストの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>LISTSCHEDULES</function>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Schedules | AdministrationSchedule[] | こちらは、利用可能なすべてのスケジュールを表示するAdministrationScheduleオブジェクトの配列を含みます。 |
応答の例サービスは、今回の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>
<schedules xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<schedules>
<frequency>
<frequencyCode>MONDAY</frequencyCode>
<frequencyUnit>1</frequencyUnit>
<localRunTime>0</localRunTime>
<localTimezoneCode>AUSTRALIA/SYDNEY</localTimezoneCode>
</frequency>
<lastRunDateTimeGMT>2018-02-25T00:00:00+11:00</lastRunDateTimeGMT>
<lastRunStatus>SUCCESS</lastRunStatus>
<nextRunDateTimeGMT>2018-03-12T00:00:00+11:00</nextRunDateTimeGMT>
<scheduleActive>true</scheduleActive>
<scheduleDescription>Athlete</scheduleDescription>
<scheduleUUID>75a2f5b5-162b-49b5-b197-53643f7dc0de</scheduleUUID>
</schedules>
<schedules xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<schedules>
<frequency>
<frequencyCode>SATURDAY</frequencyCode>
<frequencyUnit>6</frequencyUnit>
<localRunTime>0</localRunTime>
<localTimezoneCode>AUSTRALIA/SYDNEY</localTimezoneCode>
</frequency>
<nextRunDateTimeGMT>2018-03-10T00:00:00+11:00</nextRunDateTimeGMT>
<scheduleActive>false</scheduleActive>
<scheduleDescription>Common Filters</scheduleDescription>
<scheduleUUID>fa757330-b4a8-4047-9b96-745a48b1d1b7</scheduleUUID>
</schedules>
<schedules xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<schedules>
<frequency>
<frequencyCode>SATURDAY</frequencyCode>
<frequencyUnit>6</frequencyUnit>
<localRunTime>0</localRunTime>
<localTimezoneCode>AUSTRALIA/SYDNEY</localTimezoneCode>
</frequency>
<lastRunDateTimeGMT>2018-02-19T00:00:00+11:00</lastRunDateTimeGMT>
<lastRunError>com.hof.util.ActionErrorsException: java.lang.NullPointerException</lastRunError>
<lastRunStatus>FAILURE</lastRunStatus>
<nextRunDateTimeGMT>2018-03-10T00:00:00+11:00</nextRunDateTimeGMT>
<scheduleActive>false</scheduleActive>
<scheduleDescription>Common Filters</scheduleDescription>
<scheduleUUID>f732c7a4-b81a-4788-8038-6771229596c1</scheduleUUID>
</schedules>
<sessionId>ba906c4149a72b2f3c750467a31adf72</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_listschedules.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_listschedules.jsp」を実行します。
|
インターネットブラウザから、「http://<host>:<port>/ws_loadschedule.jsp」を実行します。
Code Block |
---|
|
Expand |
---|
|
こちらのwebサービスは、単一のスケジュールを保存します。AdministrationScheduleオブジェクトを使用して、保存するスケジュールの詳細を渡します。応答は、新しい詳細とともにこちらのオブジェクトを返します。これは、新規スケジュールの作成は行いませんが、既存のスケジュールの詳細を更新する点に注意してください。
リクエストパラメーター
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「SAVESCHEDULE」に設定します。 |
Schedules | AdministrationSchedule | 保存するスケジュールの詳細を含むオブジェクトです。以下の表を参照してください。 |
Anchor |
---|
以下の表 | 以下の表 | 以下のパラメーターは、こちらの関数のAdministrationScheduleオブジェクトに含める必要があります。AdministrationSchedule要素 | データ型 | 説明 |
ScheduleUUID | String | 追加するスケジュールのUUIDです。 |
Frequency | ScheduleFrequency | こちらのスケジュールの編集可能な頻度オプションを定義するScheduleFrequencyオブジェクトです。以下の表を参照してください。 |
Anchor |
---|
以下の表2 | 以下の表2 | 頻度オブジェクトでは、各ScheduleFrequencyタイプに応じて、必要な値は異なりますが、すべて頻度タイプが以下のフィールドを含みます。パラメーター | データ型 | 説明 |
FrequencyTypeCode | String | 頻度情報の解釈方法を説明します。 |
FrequencyCode | String | 頻度タイプコードに応じて、異なる意味合いを持ちます。 |
FrequencyUnit | Integer | 頻度タイプコードに応じて、異なる意味合いを持ちます。 |
LocalRunTime | Integer | このスケジュールを指定された日に実行する午前0時からの秒数です。 |
LocalTimezoneCode | String | 実行するスケジュールのJavaタイムゾーンオフセットコードです。 |
応答パラメーター
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
Schedules | AdministrationSchedule | こちらのオブジェクトは、スケジュールの更新詳細を含みます。 |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
Expand |
---|
|
管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
|
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("SAVESCHEDULE"); |
スケジュールを更新する場合、通常はまずスケジュールを読み込んでから更新をしますが、書き込み可能なアイテムは、FrequencyとisActiveパラメーターのみのため、スケジュールのUUIDが既に明確な場合は、最初に読み込みをしなくても構いません。
Code Block |
---|
|
// This is the AdministrationSchedule which should be saved
AdministrationSchedule s = new AdministrationSchedule();
s.setScheduleUUID("SOME_KNOWN_EXISTING_UUID");
s.setActive(true);
// define the frequency information
ScheduleFrequency f = new MinutesFrequency();
f.setMinutes(5);
s.setFrequency(f);
// set the schedule in the request
rsr.setSchedule(s); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
|
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、次のパラメーターが含まれます:StatusCodeとSchedules。(より詳細な情報は、上記応答パラメーターの表を参照してください)
完成例
以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。
コードをコピーして、「ws_saveschedule.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。インターネットブラウザから、「http://<host>:<port>/ws_ saveschedule.jsp」を実行します。
Code Block |
---|
|
Expand |
---|
|
こちらのwebサービスは、指定したスケジュルを削除するために使用します。 リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 | リクエスト要素 |
Expand |
---|
|
こちらのwebサービスは、指定したスケジュールを読み込むために使用します。
リクエストパラメーター
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「LOADCHEDULE」に設定します。 |
Parameters | String[] | 読み込まれるスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素に設定しなくてはいけません。また、既存のUUIDである必要があります。 |
応答パラメーター
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
Schedules | AdministrationSchedule[] | こちらは、指定したスケジュールを表示するAdministrationScheduleオブジェクトの配列を含みます。 |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
Expand |
---|
|
管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
|
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("LOADSCHEDULE"); |
スケジュールのUUIDを渡すために、パラメーター属性を使用します。
Code Block |
---|
|
// This is the Yellowfin Schedule UUID. Adjust this value
String[] parameters ={
"SOME_UUID"
};
rsr.setParameters(parameters); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
|
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、次のパラメーターが含まれます:StatusCodeとSchedules。(より詳細な情報は、上記応答パラメーターの表を参照してください)
完成例
以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。
コードをコピーして、「ws_loadschedule.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。<%
/*
* LISTSCHEDULES Example. ws_listschedules.jsp
* A more complete example can be found in ws_admin_schedule_management.jsp
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="com.hof.mi.web.service.schedule.*" %>
<%@ page import="com.hof.web.form.*" %>
<%
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 above account
rsr.setOrgId(1);
rsr.setFunction("LISTSCHEDULES");
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
AdministrationSchedule[] schedules = rs.getSchedules();
out.write("Loaded " + schedules.length + " schedules: <br>");
for (AdministrationSchedule as: schedules) {
out.write("Schedule " + as.getScheduleUUID() + "<br>");
}
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
Expand |
---|
|
こちらのwebサービスは、指定したスケジュールを読み込むために使用します。
リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 <function>DELETESCHEDULE</function>
<parameters>
<string>75a2f5b5-162b-49b5-b197-53643f7dc0de</string>
リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「DELETESCHEDULELOADCHEDULE」に設定します。 | Parameters | String[] | 削除するスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。 |
リクエストの例以下は、こちらのリクエストの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>
読み込まれるスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素に設定しなくてはいけません。また、既存のUUIDである必要があります。 |
応答パラメーター
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
Schedules | AdministrationSchedule[] | こちらは、指定したスケジュールを表示するAdministrationScheduleオブジェクトの配列を含みます。 |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
Expand |
---|
|
管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("LOADSCHEDULE"); |
スケジュールのUUIDを渡すために、パラメーター属性を使用します。
Code Block |
---|
| // This is the Yellowfin Schedule UUID. Adjust this value
String[] parameters ={
"SOME_UUID"
};
rsr.setParameters(parameters); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例
以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_loadschedule.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_loadschedule.jsp」を実行します。
Code Block |
---|
|
<%
/*
* LOADSCHEDULE Example. ws_loadschedule.jsp.
* A more complete example can be found in ws_admin_schedule_management.jsp
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="com.hof.mi.web.service.schedule.*" %>
<%@ page import="com.hof.web.form.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host </parameters>and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); </arg0>// provide your Yellowfin web services admin account
rsr.setPassword("test"); </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>
change to the password of the above account
rsr.setOrgId(1);
rsr.setFunction("LOADSCHEDULE");
// existing Schedule UUID to load. Adjust this value
String[] parameters = {
"SOME_UUID"
};
rsr.setParameters(parameters);
<messages>SuccessfullyAdministrationServiceResponse Authenticatedrs User:= admin@yellowfin.com.au</messages>adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
AdministrationSchedule schedule <messages>Web Service Request Complete</messages>= rs.getSchedule();
out.write("Loaded schedule: " + schedule.getScheduleUUID() + "<br>");
<sessionId>7b8e70f20d25079f86cf26f5712d15f9</sessionId>
out.write("Schedule Type: " + schedule.getScheduleTypeCode() <statusCode>SUCCESS</statusCode>+ "<br>");
out.write("Description: " + schedule.getScheduleDescription() </return>+ "<br>");
out.write("Is </ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
Expand |
---|
|
管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
|
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("DELETESCHEDULE"); |
削除する既存のスケジュールを指定します。
Code Block |
---|
|
// This is the Yellowfin Schedule UUID
String[] parameters ={
"SOME_UUID"
};
rsr.setParameters(parameters); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
|
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、StatusCodeパラメーターが含まれます。(より詳細な情報は、上記応答パラメーターの表を参照してください)
完成例
以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。
コードをコピーして、「ws_deleteschedule.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。インターネットブラウザから、「http://<host>:<port>/ws_deleteschedule.jsp」を実行します。
Code Block |
---|
|
Expand |
---|
|
こちらのwebサービスは、実行するスケジュールを送信します。
リクエストパラメーター
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
Function | String | Webサービス関数です。こちらは、「RUNSCHEDULENOW」に設定します。 |
Parameters | String[] | 実行するスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。 |
応答パラメーター
返される応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
Schedules | AdministrationSchedule | こちらのオブジェクトは、実行をリクエストするスケジュールの詳細を含みます。 |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
Expand |
---|
|
管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
|
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("RUNSCHEDULENOW"); |
実行する既存のスケジュールを指定します。
Code Block |
---|
|
// This is the Yellowfin Schedule UUID
String[] parameters ={
"SOME_UUID"
};
rsr.setParameters(parameters); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
|
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、次のパラメーターが含まれます。:StatusCodeとSchedules(より詳細な情報は、上記応答パラメーターの表を参照してください)
完成例
以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。
コードをコピーして、「ws_runschedulenow.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。インターネットブラウザから、「http://<host>:<port>/ws_runschedulenow.jsp」を実行します。
Code Block |
---|
|
Expand |
---|
|
こちらのwebサービスは、スケジュールを中断します。ここでの「中断」とは、定期スケジュールを中断しますが、現在実行中や実行待ちのスケジュールには影響を与えず、将来的に実行される予定のスケジュールを停止することを意味します。 注意:これは、スケジュールを中断する簡潔な方法です。これは、スケジュールを読み込み、ステータスをfalseに更新し、保存することでも達成できます。Active: " + schedule.isScheduleActive() + "<br>");
out.write("Last Run Status: " + schedule.getLastRunStatus() + "<br>");
out.write("Last Run Error: " + schedule.getLastRunError() + "<br>");
out.write("Last Run Date: " + schedule.getLastRunDateTimeGMT() + "<br>");
out.write("Next Run Date: " + schedule.getNextRunDateTimeGMT() + "<br>");
// Some schedule types have extra information that you can access, see reference for details
if (schedule instanceof ReportRefreshSchedule) {
ReportRefreshSchedule rrs = (ReportRefreshSchedule)schedule;
out.write("Report To Refresh: " + rrs.getReportId() + "<br>");
}
// these values all have different meanings depending on FrequencyType, see reference for details
out.write("Frequency Type: " + schedule.getFrequency().getFrequencyTypeCode() + "<br>");
out.write("Frequency Code: " + schedule.getFrequency().getFrequencyCode() + "<br>");
out.write("Frequency Unit: " + schedule.getFrequency().getFrequencyUnit() + "<br>");
out.write("Frequency Local Time: " + schedule.getFrequency().getLocalRunTime() + "<br>");
out.write("Frequency Local Timezone: " + schedule.getFrequency().getLocalTimezoneCode() + "<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
Expand |
---|
|
こちらのwebサービスは、単一のスケジュールを保存します。AdministrationScheduleオブジェクトを使用して、保存するスケジュールの詳細を渡します。応答は、新しい詳細とともにこちらのオブジェクトを返します。これは、新規スケジュールの作成は行いませんが、既存のスケジュールの詳細を更新する点に注意してください。
リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「PAUSESCHEDULESAVESCHEDULE」に設定します。 | Parameters | String[] | 中断するスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。 |
応答パラメーター返される応答には、これらのパラメーターが含まれます。
以下のパラメーターは、こちらの関数のAdministrationScheduleオブジェクトに含める必要があります。AdministrationSchedule要素 | データ型 | 説明 | StatusCodeScheduleUUID | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。追加するスケジュールのUUIDです。 | SUCCESSFrequency | FAILUREScheduleFrequency | Schedulesこちらのスケジュールの編集可能な頻度オプションを定義するScheduleFrequencyオブジェクトです。以下の表を参照してください。 | AdministrationSchedule | こちらのオブジェクトは、中断をリクエストするスケジュールの詳細を含みます。
頻度オブジェクトでは、各ScheduleFrequencyタイプに応じて、必要な値は異なりますが、すべて頻度タイプが以下のフィールドを含みます。パラメーター | データ型 | 説明 | FrequencyTypeCode | String | 頻度情報の解釈方法を説明します。 | FrequencyCode | String | 頻度タイプコードに応じて、異なる意味合いを持ちます。 | FrequencyUnit | Integer | 頻度タイプコードに応じて、異なる意味合いを持ちます。 | LocalRunTime | Integer | このスケジュールを指定された日に実行する午前0時からの秒数です。 | LocalTimezoneCode | String | 実行するスケジュールのJavaタイムゾーンオフセットコードです。 |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Schedules | AdministrationSchedule | こちらのオブジェクトは、スケジュールの更新詳細を含みます。 |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 インターネットブラウザから、「http://<host>:<port>/ws_pauseschedule.jsp」を実行します。
Code Block |
---|
|
language | java |
---|
theme | Eclipse管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("PAUSESCHEDULE"); |
定期スケジュールを中断する既存のスケジュールを指定します。 Code Block |
---|
| // This is the Yellowfin Schedule UUID
String[] parameters ={
"SOME_UUID"
};
rsr.setParameters(parameters); | リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。 返される応答には、次のパラメーターが含まれます。:StatusCodeとSchedules(より詳細な情報は、上記応答パラメーターの表を参照してください)
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 コードをコピーして、「ws_pauseschedule.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_saveschedule.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_ saveschedule.jsp」を実行します。
Code Block |
---|
| <%
/*
* SAVESCHEDULE Example. ws_saveschedule.jsp.
* A more complete example can be found in ws_admin_schedule_management.jsp
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="com.hof.mi.web.service.schedule.*" %>
<%@ page import="com.hof.web.form.*" %>
<%
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 above account
rsr.setOrgId(1);
// normally you would load a schedule first and do some sort of modification
rsr.setFunction("LOADSCHEDULE");
// existing Schedule UUID to load. Adjust this value
String[] parameters = {
"SOME_UUID"
};
rsr.setParameters(parameters);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
AdministrationSchedule editingSchedule = null;
if ("SUCCESS".equals(rs.getStatusCode()) ) {
editingSchedule = rs.getSchedule();
} else {
out.write("LOADSCHEDULE Failure");
out.write(" Code: " + rs.getErrorCode() );
return;
}
editingSchedule.setScheduleActive(true);
WeeklyFrequency newFreq = new WeeklyFrequency();
newFreq.setDayOfWeek(ScheduleFrequency.MONDAY);
newFreq.setLocalRunTime(3 * 60 * 60); // 9am
newFreq.setLocalTimezoneCode("AUSTRALIA/SYDNEY");
editingSchedule.setFrequency(newFreq);
rsr.setSchedule(editingSchedule);
rsr.setParameters(null);
rsr.setFunction("SAVESCHEDULE");
rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
AdministrationSchedule updatedSchedule = rs.getSchedule();
out.write("Loaded schedule: " + updatedSchedule.getScheduleUUID() + "<br>");
out.write("Schedule Type: " + updatedSchedule.getScheduleTypeCode() + "<br>");
out.write("Description: " + updatedSchedule.getScheduleDescription() + "<br>");
out.write("Is Active: " + updatedSchedule.isScheduleActive() + "<br>");
out.write("Last Run Status: " + updatedSchedule.getLastRunStatus() + "<br>");
out.write("Last Run Error: " + updatedSchedule.getLastRunError() + "<br>");
out.write("Last Run Date: " + updatedSchedule.getLastRunDateTimeGMT() + "<br>");
out.write("Next Run Date: " + updatedSchedule.getNextRunDateTimeGMT() + "<br>");
// Some schedule types have extra information that you can access, see reference for details
if (updatedSchedule instanceof ReportRefreshSchedule) {
ReportRefreshSchedule rrs = (ReportRefreshSchedule)updatedSchedule;
out.write("Report To Refresh: " + rrs.getReportId() + "<br>");
}
// these values all have different meanings depending on FrequencyType, see reference for details
out.write("Frequency Type: " + updatedSchedule.getFrequency().getFrequencyTypeCode() + "<br>");
out.write("Frequency Code: " + updatedSchedule.getFrequency().getFrequencyCode() + "<br>");
out.write("Frequency Unit: " + updatedSchedule.getFrequency().getFrequencyUnit() + "<br>");
out.write("Frequency Local Time: " + updatedSchedule.getFrequency().getLocalRunTime() + "<br>");
out.write("Frequency Local Timezone: " + updatedSchedule.getFrequency().getLocalTimezoneCode() + "<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
Expand |
---|
|
こちらのwebサービスは、指定したスケジュルを削除するために使用します。
リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「DELETESCHEDULE」に設定します。 | Parameters | String[] | 削除するスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。 |
リクエストの例以下は、こちらのリクエストの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>DELETESCHEDULE</function>
<parameters>
<string>75a2f5b5-162b-49b5-b197-53643f7dc0de</string>
</parameters>
</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>7b8e70f20d25079f86cf26f5712d15f9</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_deleteschedule.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_deleteschedule.jsp」を実行します。
Code Block |
---|
| <%
/*
* DELETESCHEDULE Example. ws_deleteschedule.jsp
* A more complete example can be found in ws_admin_schedule_management.jsp
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="com.hof.mi.web.service.schedule.*" %>
<%@ page import="com.hof.web.form.*" %>
<%
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 above account
rsr.setOrgId(1);
rsr.setFunction("DELETESCHEDULE");
String scheduleUUID = "SOME_UUID";
// existing Schedule UUID to delete
String[] parameters = {
scheduleUUID
};
rsr.setParameters(parameters);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Successfully deleted schedule: " + scheduleUUID);
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
Expand |
---|
|
こちらのwebサービスは、実行するスケジュールを送信します。
リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「RUNSCHEDULENOW」に設定します。 | Parameters | String[] | 実行するスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。 |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Schedules | AdministrationSchedule | こちらのオブジェクトは、実行をリクエストするスケジュールの詳細を含みます。 |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_runschedulenow.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_runschedulenow.jsp」を実行します。
Code Block |
---|
| <%
/*
* RUNSCHEDULENOW Example. ws_runschedulenow.jsp
* A more complete example can be found in ws_admin_schedule_management.jsp
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="com.hof.mi.web.service.schedule.*" %>
<%@ page import="com.hof.web.form.*" %>
<%
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 above account
rsr.setOrgId(1);
rsr.setFunction("RUNSCHEDULENOW");
// existing Schedule UUID to submit for running
String scheduleUUID = "SOME_UUID";
String[] parameters = {
scheduleUUID
};
rsr.setParameters(parameters);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Successfully submitted schedule " + scheduleUUID + " to be run.");
// NOTE: some properties like last run status/date, etc will not yet be updated,
// since this call only submits the schedule for run and does not wait until it is complete.
AdministrationSchedule updatedSchedule = rs.getSchedule();
out.write("Loaded schedule: " + updatedSchedule.getScheduleUUID() + "<br>");
out.write("Schedule Type: " + updatedSchedule.getScheduleTypeCode() + "<br>");
out.write("Description: " + updatedSchedule.getScheduleDescription() + "<br>");
out.write("Is Active: " + updatedSchedule.isScheduleActive() + "<br>");
out.write("Last Run Status: " + updatedSchedule.getLastRunStatus() + "<br>");
out.write("Last Run Error: " + updatedSchedule.getLastRunError() + "<br>");
out.write("Last Run Date: " + updatedSchedule.getLastRunDateTimeGMT() + "<br>");
out.write("Next Run Date: " + updatedSchedule.getNextRunDateTimeGMT() + "<br>");
// Some schedule types have extra information that you can access, see reference for details
if (updatedSchedule instanceof ReportRefreshSchedule) {
ReportRefreshSchedule rrs = (ReportRefreshSchedule)updatedSchedule;
out.write("Report To Refresh: " + rrs.getReportId() + "<br>");
}
// these values all have different meanings depending on FrequencyType, see reference for details
out.write("Frequency Type: " + updatedSchedule.getFrequency().getFrequencyTypeCode() + "<br>");
out.write("Frequency Code: " + updatedSchedule.getFrequency().getFrequencyCode() + "<br>");
out.write("Frequency Unit: " + updatedSchedule.getFrequency().getFrequencyUnit() + "<br>");
out.write("Frequency Local Time: " + updatedSchedule.getFrequency().getLocalRunTime() + "<br>");
out.write("Frequency Local Timezone: " + updatedSchedule.getFrequency().getLocalTimezoneCode() + "<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
Expand |
---|
|
こちらのwebサービスは、スケジュールを中断します。ここでの「中断」とは、定期スケジュールを中断しますが、現在実行中や実行待ちのスケジュールには影響を与えず、将来的に実行される予定のスケジュールを停止することを意味します。 注意:これは、スケジュールを中断する簡潔な方法です。これは、スケジュールを読み込み、ステータスをfalseに更新し、保存することでも達成できます。
リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「PAUSESCHEDULE」に設定します。 | Parameters | String[] | 中断するスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。 |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Schedules | AdministrationSchedule | こちらのオブジェクトは、中断をリクエストするスケジュールの詳細を含みます。 |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("PAUSESCHEDULE"); |
定期スケジュールを中断する既存のスケジュールを指定します。
Code Block |
---|
| // This is the Yellowfin Schedule UUID
String[] parameters ={
"SOME_UUID"
};
rsr.setParameters(parameters); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_pauseschedule.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_pauseschedule.jsp」を実行します。
Code Block |
---|
| <%
/*
* PAUSESCHEDULE Example. ws_pauseschedule.jsp
* A more complete example can be found in ws_admin_schedule_management.jsp
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="com.hof.mi.web.service.schedule.*" %>
<%@ page import="com.hof.web.form.*" %>
<%
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 above account
rsr.setOrgId(1);
rsr.setFunction("PAUSESCHEDULE");
// existing Schedule UUID to submit for running
String scheduleUUID = "SOME_UUID";
String[] parameters = {
scheduleUUID
};
rsr.setParameters(parameters);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Successfully paused schedule " + scheduleUUID);
AdministrationSchedule updatedSchedule = rs.getSchedule();
out.write("Loaded schedule: " + updatedSchedule.getScheduleUUID() + "<br>");
out.write("Schedule Type: " + updatedSchedule.getScheduleTypeCode() + "<br>");
out.write("Description: " + updatedSchedule.getScheduleDescription() + "<br>");
out.write("Is Active: " + updatedSchedule.isScheduleActive() + "<br>");
out.write("Last Run Status: " + updatedSchedule.getLastRunStatus() + "<br>");
out.write("Last Run Error: " + updatedSchedule.getLastRunError() + "<br>");
out.write("Last Run Date: " + updatedSchedule.getLastRunDateTimeGMT() + "<br>");
out.write("Next Run Date: " + updatedSchedule.getNextRunDateTimeGMT() + "<br>");
// Some schedule types have extra information that you can access, see reference for details
if (updatedSchedule instanceof ReportRefreshSchedule) {
ReportRefreshSchedule rrs = (ReportRefreshSchedule)updatedSchedule;
out.write("Report To Refresh: " + rrs.getReportId() + "<br>");
}
// these values all have different meanings depending on FrequencyType, see reference for details
out.write("Frequency Type: " + updatedSchedule.getFrequency().getFrequencyTypeCode() + "<br>");
out.write("Frequency Code: " + updatedSchedule.getFrequency().getFrequencyCode() + "<br>");
out.write("Frequency Unit: " + updatedSchedule.getFrequency().getFrequencyUnit() + "<br>");
out.write("Frequency Local Time: " + updatedSchedule.getFrequency().getLocalRunTime() + "<br>");
out.write("Frequency Local Timezone: " + updatedSchedule.getFrequency().getLocalTimezoneCode() + "<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
Expand |
---|
|
こちらのwebサービスは、中断したスケジュールを再開します。ここでの「再開」とは、定期スケジュールを再開し、即座に実行待ちにはしませんが、次のスケジュールされた日時に再実行するために実行待ちにします。 注意:これは、スケジュールを再開する簡潔な方法です。これは、スケジュールを読み込み、ステータスをtrueに更新し、保存をすることでも達成できます。
リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「RESUMESCHEDULE」に設定します。 | Parameters | String[] | 再開するスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。 |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Schedules | AdministrationSchedule | こちらのオブジェクトは、再開をリクエストするスケジュールの詳細を含みます。 |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("RESUMESCHEDULE"); |
定期スケジュールを再開する既存のスケジュールを指定します。
Code Block |
---|
| // This is the Yellowfin Schedule UUID
String[] parameters ={
"SOME_UUID"
};
rsr.setParameters(parameters); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_resumeschedule.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_resumeschedule.jsp」を実行します。
Code Block |
---|
| <%
/*
* RESUMESCHEDULE Example. ws_resumeschedule.jsp
* A more complete example can be found in ws_admin_schedule_management.jsp
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="com.hof.mi.web.service.schedule.*" %>
<%@ page import="com.hof.web.form.*" %>
<%
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 above account
rsr.setOrgId(1);
rsr.setFunction("RESUMESCHEDULE");
// existing Schedule UUID to submit for running
String scheduleUUID = "SOME_UUID";
String[] parameters = {
scheduleUUID
};
rsr.setParameters(parameters);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Successfully resumed schedule " + scheduleUUID);
AdministrationSchedule updatedSchedule = rs.getSchedule();
out.write("Loaded schedule: " + updatedSchedule.getScheduleUUID() + "<br>");
out.write("Schedule Type: " + updatedSchedule.getScheduleTypeCode() + "<br>");
out.write("Description: " + updatedSchedule.getScheduleDescription() + "<br>");
out.write("Is Active: " + updatedSchedule.isScheduleActive() + "<br>");
out.write("Last Run Status: " + updatedSchedule.getLastRunStatus() + "<br>");
out.write("Last Run Error: " + updatedSchedule.getLastRunError() + "<br>");
out.write("Last Run Date: " + updatedSchedule.getLastRunDateTimeGMT() + "<br>");
out.write("Next Run Date: " + updatedSchedule.getNextRunDateTimeGMT() + "<br>");
// Some schedule types have extra information that you can access, see reference for details
if (updatedSchedule instanceof ReportRefreshSchedule) {
ReportRefreshSchedule rrs = (ReportRefreshSchedule)updatedSchedule;
out.write("Report To Refresh: " + rrs.getReportId() + "<br>");
}
// these values all have different meanings depending on FrequencyType, see reference for details
out.write("Frequency Type: " + updatedSchedule.getFrequency().getFrequencyTypeCode() + "<br>");
out.write("Frequency Code: " + updatedSchedule.getFrequency().getFrequencyCode() + "<br>");
out.write("Frequency Unit: " + updatedSchedule.getFrequency().getFrequencyUnit() + "<br>");
out.write("Frequency Local Time: " + updatedSchedule.getFrequency().getLocalRunTime() + "<br>");
out.write("Frequency Local Timezone: " + updatedSchedule.getFrequency().getLocalTimezoneCode() + "<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
...