こちらの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」を実行します。
Code Block |
---|
| /*
* 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() );
} |
|