こちらでは、全体的な管理レポートwebサービスについて紹介します。
こちらでは、全体的な管理レポートwebサービスについて紹介します。
基礎的な関数
Expand |
---|
|
こちらの関数は、webサービスが機能しているかどうかのテストに使用します。 こちらの関数は、レポートwebサービスが機能しているかをテストするために使用します。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「TEST」に設定します。 | OrgRef | String | クライアント組織内部参照IDです。(オプション設定) |
リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。 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:remoteReportCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<reportRequest>TEST</reportRequest>
</arg0>
</web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
language | xml |
---|
theme | Eclipse | language | xml |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<canDrill>false</canDrill>
<dashboardEnabled>false</dashboardEnabled>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Connection Tested Successfully</messages>
<messages>Unknown Or Unsupported Request: TEST</messages>
<messages>Web Service Request Complete</messages>
<private>false</private>
<sessionId>f78fe29edb19bbfe45626c2203249f4b</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
language | java |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("TEST"); |
特定のクライアント組織を指定する必要がある場合は、こちらのコードを追加します。
| codejava | theme | Eclipse | language | java |
---|
| rsr.setOrgRef("org1"); // search for the report in this client org |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_test_reportservices.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_test_reportservices.jsp」を実行します。
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
language | java |
---|
| <%
/* ws_test_reportservices.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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("TEST");
rsr.setOrgRef("1");
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
m.marshal(rootElement,out);
//out.write("Success");
} 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」に設定します。 | ReportRequest | String | webサービス関数です。「 XLSX」、または「XLSINFO」に設定します。 | OrgRef | String | クライアント組織内部参照IDです。(オプション設定) | ReportId | Integer | XLSX/XLS書式で返すレポートを指定するための内部IDです。 |
特定のレポートを検索するために、レポートIDを提供することができます。 |
リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。 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:remoteReportCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<reportRequest>XLSX<<reportRequest>INFO</reportRequest>
<reportId>56401<<reportId>60712</reportId>
</arg0>
</web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素応答には、これらの主要なパラメーターが含まれます。応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | webサービスのステータスです。選択肢は、以下の通りです。Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | ReportIdReportName | IntegerString | 指定したレポートのIDです。指定したレポートの名前です。 | ReportName ReportDescription | String | 指定したレポートの名前です。 | 指定したレポートの説明です。 | ReportUUID | Integer | 指定したレポートの一意のID(または、UUID)です。 | HitCount | Integer | 指定したレポートがアクセスされた回数です。レポートがアクセスされた回数です。 | FormatCode | String | 指定されたレポートの書式コードです。 | BinaryDataレポートの書式コードです。 | AverageRunTime | Integer | レポートの平均実行時間です。 | Category | String | Base64でエンコードされたXLSX、またはXLSのバイナリーチャンクです。レポートが保存されているカテゴリーです。 | ContentType | String | このオブジェクトのMIMEコンテンツタイプです。値は「application/vnd.openxmlformats-officedocument.spreadsheetml.sheet」になります。 |
SubCategory | String | レポートのサブカテゴリーです。 | ReportUsage | Integer | レポートが使用、またはアクセスされた回数です。 | ViewName | String | ビューの名前です。 | Datasource | String | データソースの名前です。 | Author | String | レポートを作成したユーザーです。 | AuthoringMode | String | レポートが作成されたモードです。 | ReportTemplate | String | レポートのテンプレートです。 | DataOutput | String | データ出力です。例:カラム(列) | DashboardEnabled | Boolean | ダッシュボードが有効化されている場合はTrueです。 | LastModifiedDate | Date | レポートが最後に変更された日付です。 |
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
language | xml |
---|
theme | Eclipse | language | xml |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<author>System Administrator</author>
<authoringMode>JAVA</authoringMode>
<averageRunTime>0</averageRunTime>
<binaryData>UEsDBBQACAgIAJUKa0wAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlb ...</binaryData><canDrill>false</canDrill>
<canDrill>false<<category>Tutorial</canDrill>category>
<category>Audit Reports<<dashboardEnabled>true</category>dashboardEnabled>
<contentType>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</contentType><dataOutput>COLUMN</dataOutput>
<datasource>Ski <dashboardEnabled>true<Team</dashboardEnabled>datasource>
<dataOutput>COLUMN<<errorCode>0</dataOutput>errorCode>
<datasource>Yellowfin Configuration Database</datasource><formatCode>REPORTANDCHART</formatCode>
<errorCode>0</errorCode>
<formatCode>REPORTANDCHART</formatCode>
<hitCount>25</<hitCount>0</hitCount>
<lastModifiedDate>2016<lastModifiedDate>2017-0306-29<26</lastModifiedDate>
<lastRunDuration>0</lastRunDuration> <lastRunStatus>RUN_NOERROR</lastRunStatus>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Loaded Report: 5640160712 Successfully</messages>
<messages>Generating<messages>Collating XLSReport Report<Information</messages>
<messages>Request<messages>Web ContainsService No ReportFilter Records.<Request Complete</messages>
<messages>Report Run Successfully</messages>
<messages>Web Service Request Complete</messages>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Active Session Start</span>
Is Not Null
<span class="rptFilterLogicIdentifier"></span>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Company Name</span>
In List
<span class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>]]></preRunFilterString>
<private>false</private>
<reportDescription>Top N <reportDescription/>Agencies compared to all other Agencies by demographic</reportDescription>
<reportId>56401<<reportId>60712</reportId>
<reportName>Active<reportName>Agency Sessions<Benchmark</reportName>
<reportTemplate>REPORTANDCHART</reportTemplate>
<reportUUID>594d4da4<reportUUID>c83357db-1b588aef-44d34ec7-bf4fab72-11456a42f68c<fce34de9ee77</reportUUID>
<reportUsage>26<<reportUsage>0</reportUsage>
<sessionId>18097e8275689f88876f004a07935a7c<<sessionId>900e9dfabd21bdef75410fa88fe501dd</sessionId>
<statusCode>SUCCESS</statusCode>
<subCategory>Marketing <subCategory>Admin& Reports<Booking</subCategory>
<tags>No tags</tags>
<viewName>NEW<viewName>New VIEW<View</viewName>
</return>
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
language | java |
---|
theme | Eclipse | language | java |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("XLSXINFO"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。
| codejava | theme | Eclipse | language | java |
---|
| rsr.setOrgRef("org1"); // search for the report in this client org |
どのレポートのコメントのステータスを変更するか指定することができます。XLSX書式に変換するレポートを指定します。
| code | rsr.setReportId(60712); |
レポートのクライアント参照ID、またはセッションIDを指定することもできます。 Code Block |
---|
| rsr.setReportId(60712setReportClientReferenceId("1");
rsr.setSessionId("18607a5670842650d512976b5d7ccddd"); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、StatusCode、ReportID、BinaryDataなどのパラメーターが含まれます。(より詳細な情報は、上記応答パラメーターの表を参照してください)
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_info_xlsxreportreport.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_xlsxreportinfo_report.jsp」を実行します。
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
language | java |
---|
| <%
/* ws_info_xlsxreportreport.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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
ReportService rsc /*= Create Group
Using Java generated stubs rather that using the Yellowfin webservices API..
*/
ReportService rsc = new new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("XLSXINFO");
rsr.setOrgRef("1");
rsr.setReportId(60712);
rsr.setReportClientReferenceId("1");
rsr.setSessionId("18607a5670842650d512976b5d7ccddd");
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
m.marshal(rootElement,out);
//out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
| こちらの関数は、指定したレポートをDOC、またはDOCX書式(Microsoft Word)で返します。
|
こちらのwebサービスは、レポートのカラム(列)やフィルターのメタデータを含む、指定したレポートのスキーマ情報を返します。レポートは、そのレポートID、またはwebサービス名を提供することで指定しなくてはいけません。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「DOCX」、または「DOCSCHEMA」に設定します。 | OrgRef | String | クライアント組織内部参照IDです。(オプション設定) | ReportId | Integer | DOCX/DOC書式で返すレポートを指定するための内部IDです。 |
| 特定のレポートを検索するための内部レポートIDです。レポートIDは、レポートが編集される度に変更されます。ヒント:関連するレポートIDを取得するために、GETIDFROMUUID関数を使用することができます。 | ObjectName | String | (オプション設定)レポートのwebサービス名です。レポートIDが提供されている場合、こちらは必要ありません。 |
リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。 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:remoteReportCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<reportRequest>DOCX<<reportRequest>SCHEMA</reportRequest>
<reportId>56401<<reportId>60712</reportId>
</arg0>
</web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素応答には、これらの主要なパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | webサービスのステータスです。選択肢は、以下の通りです。Webサービスリクエストのステータスです。値の選択肢は、以下の通りです。 | ReportIdColumns | Integer | 指定したレポートのIDです。 | ReportNameReportSchema[] | レポート結果セット内の各カラム(列)と、レポートにユーザープロンプトフィルターのデータを渡す必要があるかの情報(メタデータ)を含むReportSchemaオブジェクトの配列です。より詳細な情報は、以下の表を参照してください。 | Author | String指定したレポートの名前です。 | レポートを作成したユーザーの名前です。 | HitCountAuthoringMode | String |
| AverageRunTime | Integer指定したレポートがアクセスされた回数です。 |
| CanDrill | Boolean | レポートのドリル可否です。 | Category | String | レポートが保存されているフォルダーの名前です。 | SubCategory | String | レポートが保存されているサブフォルダーの名前です。 | DashboardEnabled | Boolean |
| DataOutput | String | 以下のいずれかになります。 | Datasource | String | レポートが依存するデータソースの名前です。 | DrillCode | String | レポートで利用可能な場合のドリルタイプです。以下のいずれかになります。 - DRILLDOWN
- DRILLTHROUGH
- DRILLANYWHERE
| FormatCode | String | 指定されたレポートの書式コードです。 | BinaryData | String | Base64でエンコードされたDOCX、またはDOCのバイナリーチャンクです。 | ContentType | String | このオブジェクトのMIMEコンテンツタイプです。値は「application/vnd.openxmlformats-officedocument.wordprocessingml.document」になります。 |
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
|
|
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<author>System Administrator</author>
<authoringMode>JAVA</authoringMode>
<averageRunTime>0</averageRunTime>
<binaryData>UEsDBBQACAgIAN0Ma0wAAAAAAAAAAAAAAAATAAAAW0 ...</binaryData>指定したレポートの書式コードです。以下のいずれかになります。 - REPORTANDCHART
- CHART
- REPORT
|
HitCount | Integer | 指定したレポートがアクセスされた回数です。 |
LastModifiedDate | String | レポートが最後に変更された日付です。 |
LastRunDuration | Integer |
|
PreRunFilterString | String |
|
Private | Boolean | レポートが非公開、または公開のどちらであるかを定義します。(レガシーサービスの場合は非公開です) |
ReportDescription | String | 指定したレポートの説明です。 |
ReportId | Integer | 指定したレポートのIDです。 |
ReportName | String | 指定したレポートの名前です。 |
ReportTemplate | String | レポートに適用するテンプレートです。以下のいずれかになります。 - REPORTANDCHART
- CHART
- REPORT
|
ReportUUID | String | レポートのUUIDです。 |
ReportUsage | Integer |
|
ViewName | String | レポートが依存するビューの名前です。 |
Tags | String |
|
ErrorCode | Integer | webサービスが失敗した場合のエラーのコード番号です。 |
Messages | String[] | レポートがサーバ上で実行されている時のデバッグ情報を示す文字列の配列です。デバッグとエラーのトレーシングに使用されます。 |
ReportSchemaオブジェクトは、レポートカラム(列)の情報を含む、以下のパラメーターを返します。
パラメーター | 型 | 説明 |
ColumnName | String | レポートカラム(列)の名前です。 |
DisplayName | String | カラム(列)の表示名です。 |
ColumnLength | String | レポートカラム(列)の長さです。 |
FieldId | Integer | カラム(列)のフィールドIDです。 |
DataType | String | レポートカラム(列)のデータ型です。 |
SortOrder | Integer | カラム(列)を並べかえる順序です。 |
Hidden | Boolean | レポートでのカラム(列)表示有無です。 |
NumberOfDecimals | Integer |
|
OutputLocation | String |
|
AllowPrompt | Boolean | フィルターのみの設定です。 |
CachedValues | Boolean | フィルターのみの設定です。フィルターのキャッシュ値使用有無です。 |
FilterDisplayType | String | フィルターのみの設定です。カラム(列)がフィルタの場合のフィルター表示タイプです。 |
FilterId | String | フィルターのみの設定です。カラム(列)がフィルターの場合のフィルターIDです。 |
FilterOmittable | Boolean | フィルターのみの設定です。 |
FilterType | String | フィルターのみの設定です。フィルタータイプと、プロンプトに投入する必要のあるデータを決定します。 |
DefaultValue1 | String | フィルターのみの設定です。フィルターが設定されている場合の最初のデフォルト値です。 |
DefaultValue2 | String | フィルターのみの設定です。フィルターが設定されている場合の二番目のデフォルト値です。 |
FilterTypeCode | String | フィルターのみの設定です。 |
FilterUUID | String | フィルターのみの設定です。フィルターのUUIDです。 |
MinimumValue | BigDecimal | フィルターのみの設定です。フィルターが設定されている場合の最小値です。 |
MaximumValue | BigDecimal | フィルターのみの設定です。フィルターが設定されている場合の最大値です。 |
ParentFilterId | Integer | フィルターのみの設定です。依存フィルターが設定されている場合の親フィルターのフィルターIDです。 |
Prompt | Boolean | フィルターのみの設定です。カラム(列)がプロンプトフィルターであるかどうかです。 |
ValueUnitCode | String | フィルターのみの設定です。フィルターが設定されている場合の時間単位です。 |
応答の例
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
Code Block |
---|
|
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<canDrill>false</canDrill> <category>Audit Reports</category><author>System Administrator</author>
<contentType>application/vnd.openxmlformats-officedocument.wordprocessingml.document</contentType><authoringMode>JAVA</authoringMode>
<dashboardEnabled>true<<averageRunTime>0</dashboardEnabled>averageRunTime>
<dataOutput>COLUMN<<canDrill>false</dataOutput>canDrill>
<category>Tutorial</category>
<datasource>Yellowfin Configuration Database</datasource> <columns>
<errorCode>0</errorCode> <formatCode>REPORTANDCHART</formatCode><columnName>Region</columnName>
<hitCount>26<<dataType>TEXT</hitCount>dataType>
<displayName>Athlete <lastModifiedDate>2016-03-29</lastModifiedDate>Region</displayName>
<lastRunDuration>0<<fieldId>1</lastRunDuration>fieldId>
<lastRunStatus>RUN_NOERROR<<hidden>false</lastRunStatus>hidden>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <numberOfDecimals>0</numberOfDecimals>
<messages>Loaded Report: 56401 Successfully<<outputLocation>COLUMN</messages>outputLocation>
<messages>Generating DOCX Report<<prompt>false</messages>prompt>
<messages>Request Contains No ReportFilter Records.</messages><sortOrder>0</sortOrder>
<messages>Report Run Successfully</messages></columns>
<messages>Web<columns>
Service Request Complete</messages> <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Active Session Start</span>
Is Not Null
<span class="rptFilterLogicIdentifier"></span>
</div>]]></preRunFilterString><allowPrompt>false</allowPrompt>
<cachedValues>true</cachedValues>
<private>false</private> <columnName>Region</columnName>
<reportDescription/> <reportId>56401<<dataType>TEXT</reportId>dataType>
<reportName>Active<displayName>Athlete Sessions<Region</reportName>displayName>
<reportTemplate>REPORTANDCHART<<filterDisplayType>DROPDOWN</reportTemplate>filterDisplayType>
<reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID> <filterId>74908</filterId>
<reportUsage>27</reportUsage> <filterOmittable>true</filterOmittable>
<sessionId>9b4a5e7182d359795d176d56378ac0f2</sessionId><filterType>INLIST</filterType>
<statusCode>SUCCESS<<filterTypeCode>FILTER</statusCode>filterTypeCode>
<subCategory>Admin Reports</subCategory> <filterUUID>d4ea61ab-247e-403a-b51b-8243aeea63db</filterUUID>
<tags>No tags<<numberOfDecimals>0</tags>numberOfDecimals>
<viewName>NEW VIEW</viewName><prompt>true</prompt>
<<sortOrder>0</return>sortOrder>
</ns2:remoteReportCallResponse> </S:Body>
</S:Envelope> |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
インターネットブラウザから、「http://<host>:<port>/ws_docxreport.jsp」を実行します。
Code Block |
---|
|
管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("DOCX"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。 Code Block |
---|
|
|
rsr.setOrgRef("org1");columns>
<dashboardEnabled>true</dashboardEnabled>
<dataOutput>COLUMN</dataOutput>
<datasource>Ski Team !!!</datasource>
search
for
the
report
in
this
client
orgDOCX書式に変換するレポートを指定します。
Code Block |
---|
|
rsr.setReportId(60712); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
|
ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、StatusCode、ReportID、BinaryDataなどのパラメーターが含まれます。(より詳細な情報は、上記応答パラメーターの表を参照してください)
完成例
以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。
コードをコピーして、「ws_docxreport.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。/* <drillCode>DRILLDOWN</drillCode>
<errorCode>0</errorCode>
ws_docxreport.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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("DOCX");
rsr.setOrgRef("1");
rsr.setReportId(60712);
rsr.setReportClientReferenceId("1");
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) { <formatCode>REPORTANDCHART</formatCode>
<hitCount>3</hitCount>
<lastModifiedDate>2018-06-07</lastModifiedDate>
<lastRunDuration>0</lastRunDuration>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Loaded Report: 74907 Successfully</messages>
<messages>Collating Schema Information</messages>
<messages>Web Service Request Complete</messages>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Athlete Region</span>
In List
<span class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>]]></preRunFilterString>
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);<private>false</private>
<reportDescription>Ski Marshaller m = context.createMarshaller();Team, 8/6/2018 9:36 AM</reportDescription>
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML<reportId>74907</reportId>
<reportName>cached filters</reportName>
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs); <reportTemplate>REPORTANDCHART</reportTemplate>
m.marshal(rootElement,out);<reportUUID>982500e8-7b33-476b-be47-6a1aab611349</reportUUID>
//out.write("Success");<reportUsage>100</reportUsage>
} else { <sessionId>7e9971ea99fff609387ac1c504abcc63</sessionId>
out.write("Failure"); out.write(" Code: " + rs.getErrorCode());<statusCode>SUCCESS</statusCode>
}
%> <subCategory>Training</subCategory>
<tags>No tags</tags>
<viewName>Ski Team</viewName>
</return>
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
PDFPDFリクエストは、指定されたレポートを実行し、PDF書式で返します。 リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。リクエスト要素 リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body> |
| データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
ReportRequest | String | webサービス関数です。「PDF」に設定します。 |
ReportId | Integer | PDF書式で返すレポートを指定するための内部IDです。 |
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("SCHEMA"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。
Code Block |
---|
| rsr.setOrgRef("org1"); // search for the report in this client org |
ステータスを変更するレポートのコメントを指定することができます。
Code Block |
---|
| rsr.setReportId(70045); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例
以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_reportschema.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_reportschema.jsp」を実行します。
Code Block |
---|
|
<%
<web:remoteReportCall>/* <arg0> ws_reportschema.jsp <loginId>admin@yellowfin.com.au</loginId> <password>test</password> */
%>
<%@ page <orgId>1</orgId>
<reportRequest>PDF</reportRequest>
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.*" %>
<%
ReportServiceResponse rs = null;
<reportId>56401</reportId> ReportServiceRequest rsr = new ReportServiceRequest();
</arg0>ReportServiceService ts = new ReportServiceServiceLocator("localhost", </web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素
応答には、これらの主要なパラメーターが含まれます。
応答要素 | データ型 | 説明 | 取得コード |
ReportId | Integer | 指定したレポートのIDです。 | getReportId() |
ReportName | String | 指定したレポートの名前です。 | getReportName()
|
HitCount | Integer | 指定したレポートがアクセスされた回数です。 | getHitCount()
|
FormatCode | String | 指定したレポートの書式コードです。 | getFormatCode()
|
BinaryData | String | Base64でエンコードされたPDFのバイナリーチャンクです。 | getBinaryData()
|
ContentType | String | このオブジェクトのMIMEコンテンツタイプです。値は「application/pdf」です。 | getContentType()
|
応答の例
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
Code Block |
---|
|
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>8080, "/services/ReportService", false);
ReportServiceSoapBindingStub rssbs = (ReportServiceSoapBindingStub) ts.getReportService();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setReportRequest("SCHEMA");
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">rsr.setReportId(70045);
<return> rs = rssbs.remoteReportCall(rsr);
if <author>System Administrator</author>("SUCCESS".equals(rs.getStatusCode())) {
out.write("Success </br>");
<authoringMode>JAVA</authoringMode> <averageRunTime>0</averageRunTime> <binaryData>JVBERi0xLjQKJeLjz9MKNCAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDI4OT4+ c3RyZWFtCnic7VNNSwMxEI1 . . .</binaryData> ReportSchema[] schema = rs.getColumns();
<canDrill>false</canDrill> <category>Audit Reports</category> <contentType>application/pdf</contentType> for (ReportSchema s: schema)
<dashboardEnabled>true</dashboardEnabled> <dataOutput>COLUMN</dataOutput> <datasource>Yellowfin Configuration Database</datasource> <errorCode>0</errorCode> //display filters:
<formatCode>REPORTANDCHART</formatCode> <hitCount>25</hitCount> <lastModifiedDate>2018-07-02</lastModifiedDate> <lastRunDuration>0</lastRunDuration> if (s.getFilterType() != null && s.getFilterTypeCode().equals("FILTER")){
<lastRunStatus>RUN_NOERROR</lastRunStatus> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 56401 Successfully</messages> <messages>Generating PDF Report</messages> <messages>Request Contains No ReportFilter Records.</messages> out.write("<br>Display Name: " + s.getDisplayName());
<messages>Report Run Successfully</messages> <messages>Web Service Request Complete</messages> <preRunFilterString><![CDATA[<div class="rptFilterLogicText"> <span class="rptFilterLogicIdentifier">Active Session Start</span> Is Not Null <span class="rptFilterLogicIdentifier"></span> </div>]]></preRunFilterString> <private>false</private> <reportDescription/> out.write("<br>Filter UUID:" + s.getFilterUUID());
<reportId>56401</reportId> <reportName>Active Sessions</reportName> <reportTemplate>REPORTANDCHART</reportTemplate> <reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID> <reportUsage>100</reportUsage> out.write("<br>Filter Id:" + s.getFilterId());
<sessionId>bb2175f6da398640f670ff666c40fcfa</sessionId> <statusCode>SUCCESS</statusCode> <subCategory>Admin Reports</subCategory> <tags>No tags</tags> }
} else {
<viewName>NEW VIEW</viewName> out.write(rs.getStatusCode());
</return> </ns2:remoteReportCallResponse>out.write(rs.toString());
</S:Body>
</S:Envelope> |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
Expand |
---|
| 詳細手順 |
管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("PDF"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。 Code Block |
---|
| rsr.setOrgRef("org1"); // search for the report in this client org |
PDF書式で参照するレポートを指定します。 Code Block |
---|
| rsr.setReportId(60712); | リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。 返される応答には、レポートに関連するパラメーターが含まれます。(より詳細な情報は、上記応答パラメーターの表を参照してください)
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 コードをコピーして、「ws_pdfreport.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。インターネットブラウザから、「http://<host>:<port>/ws_pdfreport.jsp」を実行します。
Code Block |
---|
|
|
/* webサービスは、指定したレポートのフィルター値を返します。
注意:現在、このリクエストにユーザー情報を渡す方法はありません。そのため、特定の値を制限するアクセスフィルターがレポートに適用されている場合、ログインしているユーザー(このwebサービスを呼び出しているユーザー)がアクセスできるフィルター値のみが返されます。
リクエスト要素
以下の要素は、こちらのリクエストとともに渡されます。
リクエスト要素 | データ型 | 説明 |
LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 |
Password | String | 上記アカウントのパスワードです。 |
OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 |
ReportRequest | String | webサービス関数です。「FILTEROPTIONS」に設定します。 |
OrgRef | String | (オプション設定)特定のクライアント組織を指定してレポートを検索する場合の、クライアント組織内部参照IDです。こちらが指定されてない場合、デフォルト組織から検索されます。 |
ReportClientReferenceId | String | (オプション設定)特定のクライアント組織を指定する、別のオプションです。 |
ReportId | Integer | 特定のレポートを検索するための内部レポートIDです。レポートIDは、レポートが編集される度に変更されます。ヒント:関連するレポートIDを取得するために、GETIDFROMUUID関数を使用することができます。 |
ObjectName | String | 内部フィルターIDです。ヒント:レポートが編集される度に変更されるため、SCHEMA関数を使用して有効なフィルターIDを取得します。 |
リクエストの例
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。
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:remoteReportCall>
ws_pdfreport.jsp <arg0>
*/ <%@ 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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
ReportService rsc = new ReportService();<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
//("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");<reportRequest>FILTEROPTIONS</reportRequest>
ReportServiceRequest rsr = new ReportServiceRequest(); <reportId>70066</reportId>
rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); <objectName>70081</objectName>
rsr.setReportRequest("PDF"); rsr.setOrgRef("1"); </arg0>
rsr.setReportId(60712); </web:remoteReportCall>
rsr.setReportClientReferenceId("1");
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);</soapenv:Body>
</soapenv:Envelope> |
応答要素
応答には、これらの主要なパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービスリクエストのステータスです。値の選択肢は、以下の通りです。 |
Results | ReportRow[] | 利用可能なフィルター値の配列です。より詳細な情報は、以下の表を参照してください。 |
Author | String | レポートを作成したユーザーの名前です。 |
AuthoringMode | String |
|
AverageRunTime | Integer |
|
CanDrill | Boolean | レポートのドリル可否です。 |
Category | String | レポートが保存されているフォルダーの名前です。 |
SubCategory | String | レポートが保存されているサブフォルダーの名前です。 |
DashboardEnabled | Boolean |
|
DataOutput | String | 以下のいずれかになります。 |
Datasource | String | このレポートに使用されているデータソースの名前です。 |
FormatCode | String | 指定したレポートの書式コードです。以下のいずれかになります。 - REPORTANDCHART
- CHART
- REPORT
|
HitCount | Integer | 指定したレポートがアクセスされた回数です。 |
LastModifiedDate | String | レポートが最後に変更された日付です。 |
LastRunDuration | Integer |
|
PreRunFilterString | String |
|
Private | Boolean | レポートが非公開、または公開のどちらであるかを定義します。(レガシーサービスの場合は非公開です) |
ReportDescription | String | 指定したレポートの説明です。 |
ReportId | Integer | 指定したレポートのIDです。 |
ReportName | String | 指定したレポートの名前です。 |
ReportTemplate | String | レポートに適用するテンプレートです。以下のいずれかになります。 - REPORTANDCHART
- CHART
- REPORT
|
ReportUUID | String | レポートのUUIDです。 |
ReportUsage | Integer |
|
ViewName | String | レポートが依存するビューの名前です。 |
Tags | String |
|
ErrorCode | Integer | webサービスが失敗した場合のエラーのコード番号です。 |
Messages | String[] | レポートがサーバ上で実行されている場合にデバッグ情報を示す文字列の配列です。デバッグとエラーのトレーシングに使用されます。 |
ReportRowオブジェクトは、以下のパラメーターを返します。
パラメーター | 型 | 説明 |
DataValue | String[] | レポート結果セット内の各カラム(列)データの文字列の配列です。 |
応答の例
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
Code Block |
---|
|
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<author>System m.marshal(rootElement,out);Administrator</author>
<authoringMode>JAVA<//out.write("Success");authoringMode>
<averageRunTime>0</averageRunTime>
} else { <canDrill>false</canDrill>
out.write("Failure"); <category>Tutorial</category>
out.write(" Code: " + rs.getErrorCode()); }
%> |
Expand |
---|
|
こちらのリクエストは、指定されたレポートを実行し、CSV書式(カンマ区切り値)で返します。 リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「CSV」に設定します。 | ReportId | Integer | CSV書式で返すレポートを指定するための内部IDです。 |
リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/"> <dashboardEnabled>true</dashboardEnabled>
<soapenv:Header/> <soapenv:Body> <dataOutput>COLUMN</dataOutput>
<web:remoteReportCall> <datasource>Ski <arg0>Team</datasource>
<loginId>admin@yellowfin.com.au</loginId><errorCode>0</errorCode>
<password>test<<formatCode>REPORTANDCHART</password>formatCode>
<orgId>1<<hitCount>2</orgId>hitCount>
<reportRequest>CSV</reportRequest><lastModifiedDate>2018-06-18</lastModifiedDate>
<reportId>56401</reportId><lastRunDuration>0</lastRunDuration>
<messages>Successfully Authenticated </arg0>User: admin@yellowfin.com.au</messages>
</web:remoteReportCall><messages>Loaded Report: 70080 Successfully</messages>
<messages>Retrieving </soapenv:Body>
</soapenv:Envelope> |
応答要素応答には、これらの主要なパラメーターが含まれます。 応答要素 | データ型 | 説明 | 取得コード | ReportId | Integer | 指定したレポートのIDです。 | getReportId() | ReportName | String | 指定したレポートの名前です。 | getReportName()
| HitCount | Integer | 指定したレポートがアクセスされた回数です。 | getHitCount()
| FormatCode | String | 指定したレポートの書式コードです。 | getFormatCode()
| BinaryData | String | Base64でエンコードされたCSVのバイナリーチャンクです。 | getBinaryData()
| ContentType | String | このオブジェクトのMIMEコンテンツタイプです。値は「text/comma-separated-values」です。 | getContentType()
|
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">Options</messages>
<messages>Request Contains No ReportFilter Records.</messages>
<messages>Region (FilterId: 70082 ) Requires User Prompt</messages>
<return> <messages>Ignoring Prompt Filter On Field: 70082</messages>
<author>System Administrator</author> <messages>DEMOGRAPHIC (FilterId: 70081 ) Requires User <authoringMode>JAVA<Prompt</authoringMode>messages>
<averageRunTime>0</averageRunTime><messages>Web Service Request Complete</messages>
<binaryData>Tm8gcmVzdWx0cyByZXR1cm5lZC4K</binaryData> <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Athlete Region</span>
In List
<span class="rptFilterLogicIdentifier">[User Prompt]</span>
<canDrill>false<</canDrill>div>
<div class="rptFilterLogicText">
AND
<category>Audit Reports</category><span class="rptFilterLogicIdentifier">Demographic</span>
In List
<span class="rptFilterLogicIdentifier">(Adventure, Relaxation, Family, Culture)</span>
</div>]]></preRunFilterString>
<contentType>text/comma-separated-values</contentType><private>false</private>
<reportDescription>Ski Team, <dashboardEnabled>true<18/6/dashboardEnabled>2018 2:49 PM</reportDescription>
<dataOutput>COLUMN</dataOutput> <reportId>70066</reportId>
<datasource>Yellowfin Configuration Database<<reportName>qwerty</datasource>reportName>
<errorCode>0<<reportTemplate>REPORTANDCHART</errorCode>reportTemplate>
<formatCode>REPORTANDCHART</formatCode><reportUUID>c105ab26-9744-434d-9c8c-9fb9e48d80c0</reportUUID>
<hitCount>26</hitCount><reportUsage>100</reportUsage>
<results>
<lastModifiedDate>2018-07-02</lastModifiedDate> <lastRunDuration>0<<dataValue>Asia</lastRunDuration>dataValue>
<lastRunStatus>RUN_NOERROR</lastRunStatus> <dataValue>Asia</dataValue>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> </results>
<messages>Loaded Report: 56401 Successfully</messages><sessionId>eb31d9392a25c8c40995237650837cd5</sessionId>
<messages>Generating CSV Report</messages><statusCode>SUCCESS</statusCode>
<messages>Request Contains No ReportFilter Records.</messages><subCategory>Training</subCategory>
<messages>Report<tags>No Run Successfully<tags</messages>tags>
<messages>Web Service Request Complete</messages><viewName>New View</viewName>
</return>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Active Session Start</span>
Is Not Null
<span class="rptFilterLogicIdentifier"></span>
</div>]]></preRunFilterString>
<private>false</private>
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("FILTEROPTIONS"); |
フィルターを取得するレポートを指定します。
Code Block |
---|
| rsr.setReportId(70066); |
特定のフィルターを取得する場合は、ObjectNameパラメーターにフィルターIDを提供します。
Code Block |
---|
| rsr.setObjectName("70081"); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_filteroptions.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_filteroptions.jsp」を実行します。
Code Block |
---|
| <% <reportDescription
/>* <reportId>56401</reportId>
ws_filteroptions.jsp <reportName>Active Sessions</reportName> <reportTemplate>REPORTANDCHART</reportTemplate> */
%>
<%
ReportServiceResponse rs = <reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID>null;
ReportServiceRequest rsr = new ReportServiceRequest();
<reportUsage>100</reportUsage>ReportServiceService ts = new ReportServiceServiceLocator("localhost", 8080, "/services/ReportService", false);
ReportServiceSoapBindingStub <sessionId>6f95db60d17d24138a5faf23190f5a6e</sessionId>rssbs = (ReportServiceSoapBindingStub) ts.getReportService();
rsr.setLoginId("admin@yellowfin.com.au");
<statusCode>SUCCESS</statusCode> rsr.setPassword("test");
rsr.setOrgId(1);
<subCategory>Admin Reports</subCategory>rsr.setReportRequest("FILTEROPTIONS");
rsr.setReportId(70066);
<tags>No tags</tags>rsr.setObjectName("70081");
<viewName>NEW VIEW</viewName>
</return> rs = rssbs.remoteReportCall(rsr);
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 インターネットブラウザから、「http://<host>:<port>/ws_csvreport.jsp」を実行します。
Code Block |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("CSV"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。 Code Block |
---|
| | rsr.setOrgRef("org1"); if ("SUCCESS".equals(rs.getStatusCode())) {
out.write("Success </br>");
// search for the report in this client orgCSV書式で参照するレポートを指定します。 Code Block |
---|
| rsr.setReportId(60712); | リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr);レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。 返される応答には、レポートに関連するパラメーターが含まれます。(より詳細な情報は、上記応答パラメーターの表を参照してください)
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 コードをコピーして、「ws_csvreport.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。/* ws_csvreport.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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
ReportService rsc = new ReportService();ReportRow[] rows = rs.getResults();
for (ReportRow r: rows) {
//("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService"); ReportServiceRequest rsr = new ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setReportRequest("CSV");
//display filter values: rsr.setOrgRef("1"); rsr.setReportId(60712); rsr.setReportClientReferenceId("1"); ReportServiceResponse rs=rsc.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) {
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs); out.write("<br>" + mr.marshal(rootElement,out);getDataValue()[0]);
//out.write("Success"); }
} else {
out.write("Failure"(rs.getStatusCode());
out.write(" Code: " + rs.getErrorCodetoString());
}
%> |
|
レポート結果セット関数
これらのwebサービスは、レポートにより生成される結果に固有のものです。
Expand |
---|
| リクエストは、指定されたレポートを実行し、テキスト書式で返します。
|
こちらのwebサービスは、指定したレポートの結果データと、レポートのメタデータを取得します。レポートの結果は、書式設定されていないそのままの形式になります。この結果は、ReportRowオブジェクトの配列に保存され、このオブジェクトは、各結果ロウ(行)を表します。そのため、各ロウ(行)に対して、結果データの各カラム(列)のデータを含む文字列の配列が存在します。 注意:このデータを、文字列表現から各特定のカラム(列)のデータ型に変換するのは、webサービスクライアント次第です。各カラム(列)のデータ型は、SCHEMA関数で取得することができます。 例えば、以下は2つのカラム(列)を含み、各ユーザーロールに割り当てられたユーザー数を特定するロール集計レポートを示しています。 ユーザーロール | 人数 | System Administrator | 1 | Consumer & Collaborator | 5 | Report Content Writer | 4 |
こちらのwebサービスは、各ユーザーロールのReportRowオブジェクトを返します。各オブジェクトは、2つのデータ文字列を含みます。ひとつはロール名であり、もうひとつはユーザー数を表示します。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「TEXT」に設定します。RESULTSET」に設定します。 | OrgRef | String | クライアント組織内部参照IDです。(オプション設定) | ReportId | Integer | TEXT書式で返すレポートを指定するための内部IDです。 |
リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。 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:remoteReportCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<reportRequest>TEXT<<reportRequest>RESULTSET</reportRequest>
<reportId>60712<<reportId>58511</reportId>
</arg0>
</web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素応答には、これらの主要なパラメーターが含まれます。応答には、これらの主要なパラメーターが含まれます。(より詳細な応答パラメーターの一覧は、ReportServiceResponseオブジェクトを参照してください) 応答要素 | データ型 | 説明 | 取得コード | ReportId | Integer | 指定したレポートのIDです。 | getReportId() | ReportName | StatusCode | String | 指定したレポートの名前です。Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。getReportName() HitCountInteger | Results | 指定したレポートがアクセスされた回数です。 | getHitCount()
| FormatCode | String | 指定したレポートの書式コードです。 | getFormatCode()
| BinaryData | String | Base64でエンコードされたTEXTのバイナリーチャンクです。 | getBinaryData()
| ContentType | String | このオブジェクトのMIMEコンテンツタイプです。値は「text/tab-separated-values」です。 | getContentType()
|
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
language | xml |
---|
theme | Eclipse | language | xml |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<author>System Administrator</author>
<authoringMode>JAVA</authoringMode>
<averageRunTime>0</averageRunTime>
<binaryData>Tm90IGZvciBSZS1TYWxlIExpY2VuY2UsLCwKVG9wIE4sQ29tcGFueSBOYW1lLERlbW9ncmFwaGlj<canDrill>false</canDrill>
LFN1bSBJbnZvaWNlZCAoUHJlZiBDdXJyZW5jeSkKIlRvcCBOIEFnZW5jaWVzICIsQmFyZ2FpbiBU cmlwcyxBZHZlbnR1cmUsIiQxMCw4NTYiCiJUb3AgTiBBZ2VuY2llcyAiLEJhcmdhaW4gVHJpcHMs RmFtaWx5LCIkMjk1LDgyNyIKIlRvcCBOIEFnZW5jaWVzICIsQmFyZ2FpbiBUcmlwcyxMdXh1cnks IiQxLDAzMiwwNTYiCiJUb3AgTiBBZ2VuY2llcyAiLEJhcmdhaW4gVHJpcHMsUmVsYXhhdGlvbiwi JDgwLDY2MCIKIlRvcCBOIEFnZW5jaWV . . .</binaryData> <category>Audit Reports</category>
<canDrill>false</canDrill> <category>Tutorial</category>
<contentType>text/tab-separeted-values</contentType>
<dashboardEnabled>true</<dashboardEnabled>true</dashboardEnabled>
<dataOutput>COLUMN</dataOutput>
<datasource>Yellowfin <datasource>SkiConfiguration Team<Database</datasource>
<errorCode>0</errorCode>
<formatCode>REPORTANDCHART</formatCode>
<hitCount>5<<hitCount>4</hitCount>
<lastModifiedDate>2017<lastModifiedDate>2016-0604-26<13</lastModifiedDate>
<lastRunDuration>0</lastRunDuration>
<lastRunStatus>RUN_NOERROR</lastRunStatus>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Loaded Report: 6071258511 Successfully</messages>
<messages>Generating<messages>Returning TEXTRAW Report<Resultset</messages>
<messages>Request Contains No ReportFilter Records.</messages>
<messages>AGENCYNAME<messages>Report (FilterId: 60723 ) Requires User Prompt<Run Successfully</messages>
<messages>Web <messages>ReportService RunRequest Successfully<Complete</messages>
<messages>Web<private>false</private>
Service Request Complete</messages> <reportDescription/>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText"> <span class="rptFilterLogicIdentifier">Company Name</span> In List <span class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>]]></preRunFilterString> <reportId>58511</reportId>
<reportName>Role <private>false<Population</private>reportName>
<reportDescription>Top<reportTemplate>REPORTANDCHART</reportTemplate>
N Agencies compared to all other Agencies by demographic</reportDescription> <reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID>
<reportId>60712</reportId> <reportUsage>7</reportUsage>
<reportName>Agency Benchmark</reportName> <results>
<reportTemplate>REPORTANDCHART</reportTemplate> <dataValue>System Administrator</dataValue>
<reportUUID>c83357db-8aef-4ec7-ab72-fce34de9ee77</reportUUID> <dataValue>1</dataValue>
<reportUsage>0</reportUsage> </results>
<sessionId>0b549fb1c8361edb2b83dee81227e460</sessionId> <results>
<statusCode>SUCCESS</statusCode> <subCategory>Marketing<dataValue>Consumer & Booking<Collaborator</subCategory>dataValue>
<tags>No tags<<dataValue>5</tags>dataValue>
<viewName>New View<</viewName>results>
</return> <sessionId>c958af74f677c4b1f575bd728d3b25d0</sessionId>
<statusCode>SUCCESS</statusCode>
<subCategory>User Access</subCategory>
<tags>No tags</tags>
<viewName>NEW VIEW</viewName>
</return>
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
language | java |
---|
theme | Eclipse | language | java |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("TEXTRESULTSET"); |
結果セットを取得するレポートを指定します。レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。
| code | rsr.setReportId(60712); |
レポートクライアント参照IDを指定することもできます。
Code Block |
---|
| rsr.setOrgRefsetReportClientReferenceId("org11"); // search for the report in this client org |
TEXT書式で参照するレポートを指定します。
Code Block |
---|
| rsr.setReportId(60712); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、レポートに関連するパラメーターが含まれます。(より詳細な情報は、上記応答パラメーターの表を参照してください)
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_textreportresultset.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_textreportresultset.jsp」を実行します。
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
language | java |
---|
| <%
/* ws_textreportresultset.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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("TEXTRESULTSET");
rsr.setOrgRef("1");
rsr.setReportId(60712);
rsr.setReportClientReferenceId("1");
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
m.marshal(rootElement,out);
//out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%>
%> |
|
Expand |
---|
title | PRINTFORMATTEDRESULTSET |
---|
|
webサービスは、デフォルトではなく、印刷可能な書式でレポートを返します。 こちらのwebサービスは、RESULTSET関数の呼び出しに類似していますが、結果セットをレポートのフォーマッターを使用して返します。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「PRINT」に設定します。FORMATTEDRESULTSET」に設定します。 | OrgRef | String | クライアント組織内部参照IDです。(オプション設定) | ReportId | Integer | 印刷可能な書式で返すレポートを指定するための内部IDです。 |
リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。 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:remoteReportCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<reportRequest>PRINT<<reportRequest>FORMATTEDRESULTSET</reportRequest>
<reportId>56401<<reportId>58511</reportId>
</arg0>
</web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素応答には、これらの主要なパラメーターが含まれます。応答には、これらの主要なパラメーターが含まれます。(より詳細な応答パラメーターの一覧は、ReportServiceResponseオブジェクトを参照してください) 応答要素 | データ型 | 説明 | 取得コード | Chart | ReportChart[] | HTMLレポート応答に付加される、複数のグラフビットマップを含むReportChartオブジェクトの配列です。 | getCharts()
| ReportBinaryObject | ReportBinaryObject[] | BLOB、およびCLOBを含む、ReportBinaryObjectオブジェクトの配列です。 | getBinaryObjects()
| ReportStyles | String | CSSスタイルです。 | getReportStyles()
| Breadcrumbs | Breadcrumb[] | Breadcrumbオブジェクトの配列です。 | getBreadcrumbs()
| SeriesSelection | SeriesSelection[] | SeriesSelectionオブジェクトの配列です。 | getSeriesSelections()
| TimeAggregationSelection | TimeAggregationSelection[] | TimeAggregationSelectionオブジェクトの配列です。 | getTimeAggregationSelection()
| ReportTabSelection | ReportTabSelection[] | ReportTabSelectionオブジェクトの配列です。 | getReportTabSelection()
| ReportPageSelection | ReportPageSelection[] | ReportPageSelectionオブジェクトの配列です。 | getReportPageSelection()
| TimeSliderSelection | TimeSliderSelection[] | TimeSliderSelectionオブジェクトの配列です。 | getTimeSliderSelection()
| SortableColumns | SortableTableColumn[] | SortableTableColumnオブジェクトの配列です。 | getSortableColumns()
| SelectedSortColumn | Integer | 並べかえに使用するカラム(列)です。このインデックスは、レポート内のカラム(列)インデックスに適用されます。 | getSelectedSortColumn()
| SelectedSortOrder | Integer | 並べかえに使用するカラム(列)の並べかえ順序です(0が昇順、1が降順です)。 | getSelectedSortOrder()
| DrillCode | String | レポートで使用可能な場合の、ドリルタイプです。 | getDrillCode()
| RelatedReports | RelatedReport[] | RelatedReportオブジェクトの配列です。これは、メインレポートにタブ化、またはマルチ表示されるレポートです。 | getRelatedReports()
| BinaryData | String | Base64でエンコードされた、HTMLドキュメントのバイナリーチャンクです。 | getBinaryData()
| Private | | レポートが非公開、または公開のどちらであるかを定義します。 | getPrivate()
| ContentType | String | 返されるオブジェクトのMIME ContentTypeです。値は「text / html」です。 | getContentType()
| CanDrill | Boolean | レポートのドリル可否です。 | getCanDrill()
| GoogleMaps | GMap | GMapオブジェクトの配列です。 | getGoogleMaps()
|
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
|
|
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
Results | ReportRow[] | レポートのデータセットの結果を含むオブジェクトの配列です。 |
応答の例
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
Code Block |
---|
|
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<author>System Administrator</author>
<authoringMode>JAVA</authoringMode>
<averageRunTime>0</averageRunTime>
<canDrill>false</canDrill>
<category>Audit Reports</category>
<dashboardEnabled>true</dashboardEnabled>
<dataOutput>COLUMN</dataOutput>
<datasource>Yellowfin Configuration Database</datasource>
<errorCode>0</errorCode>
<formatCode>REPORTANDCHART</formatCode>
<hitCount>5</hitCount>
<lastModifiedDate>2016-04-13</lastModifiedDate>
<lastRunDuration>0</lastRunDuration>
<lastRunStatus>RUN_NOERROR</lastRunStatus>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Loaded Report: 58511 Successfully</messages>
<messages>Returning RAW Resultset</messages>
<messages>Request Contains No ReportFilter Records.</messages>
<messages>Report Run Successfully</messages>
<messages>Web Service Request Complete</messages>
<private>false</private>
<reportDescription/>
<reportId>58511</reportId>
<reportName>Role Population</reportName>
<reportTemplate>REPORTANDCHART</reportTemplate>
<reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID>
<reportUsage>9</reportUsage>
<results>
<dataValue>System Administrator</dataValue>
<dataValue>1</dataValue>
</results>
<results>
<dataValue>Consumer & Collaborator</dataValue>
<dataValue>5</dataValue>
</results>
<sessionId>1e4f0c8ee07d24a5500f952a459b1652</sessionId>
<statusCode>SUCCESS</statusCode>
<subCategory>User Access</subCategory>
<tags>No tags</tags>
<viewName>NEW VIEW</viewName>
</return>
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
Expand |
---|
|
管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("FORMATTEDRESULTSET"); |
書式設定された結果セットを取得するレポートを指定します。
Code Block |
---|
| rsr.setReportId(60712); |
レポートクライアント参照IDを指定することができます。
Code Block |
---|
| rsr.setReportClientReferenceId("1"); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例
以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_resultset.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_resultset.jsp」を実行します。
Code Block |
---|
|
<%
/* ws_resultset.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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("FORMATTEDRESULTSET");
rsr.setOrgRef("1");
rsr.setReportId(60712);
rsr.setReportClientReferenceId("1");
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
m.marshal(rootElement,out);
//out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
その他
Expand |
---|
|
こちらの関数は、受信者の電子メールアドレスにレポートを送信します。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「SENDTOEMAIL」に設定します。 | OrgRef | String | クライアント組織の内部参照IDを指定するためのオプションパラメーターです。 | ReportId | Integer | 電子メール送信されるレポートの内部IDです。 | ReportsOption | String[] | レポート送信先となる電子メールアドレスの一覧です。 | AlterationCommand |
|
| SessionId | Integer | (オプション設定)IDを使用して以前のセッションを指定します。 | LanguageCode |
| (オプション設定)言語を指定します。 |
リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを示しています。 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:remoteReportCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<reportRequest>SENDTOEMAIL</reportRequest>
<reportId>70012</reportId>
<alterationCommand>drill-down|70012</alterationCommand>
<reportOptions>
<string>binish.sheikh@yellowfin.com.au</string>
</reportOptions>
</arg0>
</web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<author>System Administrator</author>
<authoringMode>JAVA</authoringMode>
<averageRunTime>0</averageRunTime>
<canDrill>false</canDrill>
<category>Tutorial</category>
<dashboardEnabled>true</dashboardEnabled>
<dataOutput>COLUMN</dataOutput>
<datasource>Ski Team</datasource>
<errorCode>0</errorCode>
<return> <formatCode>CHART</formatCode>
<author>System Administrator<<hitCount>3</author>hitCount>
<authoringMode>JAVA</authoringMode><lastModifiedDate>2018-03-07</lastModifiedDate>
<averageRunTime>0<<lastRunDuration>0</averageRunTime>lastRunDuration>
<messages>Successfully <binaryData>PHN0eWxlIHR5cGU9InRleHQvY3NzIj4KLm11bHRpV2lkZ2V0Q2FudmFzRWRpdG9yIHsKCXBvc2l0Authenticated aW9uOiByZWxhdGl2ZTsKfQoKLm11bHRpUser: admin@yellowfin.com. . .</binaryData>au</messages>
<messages>Loaded Report: 70012 Successfully</messages>
<messages>Web Service Request <canDrill>false<Complete</canDrill>messages>
<category>Audit Reports</category>
<contentType>text/html</contentType>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Invoiced Date</span>
Between
<span class="rptFilterLogicIdentifier">Current Date - 6 Years And Current Date</span>
</div>
.
.
.
]]></preRunFilterString>
<dashboardEnabled>true</dashboardEnabled> <private>false</private>
<dataOutput>COLUMN</dataOutput> <reportDescription>This report provides a high level summary <datasource>Yellowfin Configuration Database</datasource>of campaigns</reportDescription>
<drillCode>NODRILL<<reportId>70012</drillCode>reportId>
<reportName>Campaign <errorCode>0<Summary</errorCode>reportName>
<formatCode>REPORTANDCHART<<reportTemplate>CHART</formatCode>reportTemplate>
<hitCount>30</hitCount><reportUUID>3e842fae-02f7-4ad3-a632-ca267e0078da</reportUUID>
<lastModifiedDate>2018-07-02</lastModifiedDate><reportUsage>100</reportUsage>
<lastRunDuration>0<<sessionId>fa0cc79a9ea229bd5df85b4a7f50c878</lastRunDuration>sessionId>
<lastRunStatus>RUN_NOERROR<<statusCode>SUCCESS</lastRunStatus>statusCode>
<messages>Successfully<subCategory>Marketing Authenticated User: admin@yellowfin.com.au</messages>& Booking</subCategory>
<messages>Loaded Report: 56401 Successfully</messages><tags>No tags</tags>
<messages>Generating<viewName>New HTML Report<View</messages>viewName>
</return>
<messages>Request Contains No ReportFilter Records.</messages>ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| <messages>Report Run Successfully</messages>
<messages>Web Service Request Complete</messages>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Active Session Start</span>
Is Not Null
<span class="rptFilterLogicIdentifier"></span>
</div>]]></preRunFilterString>
<private>false</private>rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("SENDTOEMAIL"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。
Code Block |
---|
| rsr.setOrgRef("org1"); // search for the report in this client org |
電子メール送信するレポートと、その変更コマンドを指定します。
Code Block |
---|
| rsr.setReportId(60712);
rsr.setAlterationCommand("drill-down|60712"); |
レポートの送信先となる電子メールアドレスを提供します。
Code Block |
---|
| rsr.setReportOptions(new String[]{ "dummy@dummy.com"}); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_sendtoemail.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_sendtoemail.jsp」を実行します。
Code Block |
---|
| /* <relatedReports/>
ws_sendtoemail.jsp <reportDescription/>
<reportId>56401</reportId> */
<%@ page <reportName>Active Sessions</reportName>
<reportStyle>td.rpthdrcol {
position: relative;
}
img.rptcolmenu {
position: absolute;
right: 5px;
top: 0;
bottom: 0;
margin: auto 0;
cursor: pointer;
}
td.rpthdrcol div.rptdata {
padding-right: 20px;
}
td.reportChartCell {
vertical-align: top;
}
div.reportChart {
position: relative;
display: inline-block;
}
img.reportChart {
position: absolute;
left: 0;
top: 0;
}
.
.
.
table.rpt56401sectionsummary {
margin-bottom: 20px;
}
.printpagebreak {
PAGE-BREAK-BEFORE: always;
}</reportStyle>
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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("SENDTOEMAIL");
rsr.setOrgRef("1");
rsr.setReportId(60712);
rsr.setAlterationCommand("drill-down|60712");
rsr.setReportOptions(new String[]{ "dummy@dummy.com"});
rsr.setReportClientReferenceId("1");
rsr.setDashboardTabId(70080);
<reportTemplate>REPORTANDCHART</reportTemplate> ReportServiceResponse rs=rsc.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
<reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID>
<reportUsage>100</reportUsage>
<selectedSortColumn>-1</selectedSortColumn> JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
<selectedSortOrder>0</selectedSortOrder> Marshaller m = context.createMarshaller();
<sessionId>7fc9ad31786cfd1ca10605c301551534</sessionId> m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); <sortableColumns//> To format XML
<sortableColumns/> JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
<sortableColumns/> m.marshal(rootElement,out); <statusCode>SUCCESS</statusCode>
<subCategory>Admin
Reports</subCategory> //out.write("Success");
<tags>No} tags</tags>else {
out.write("Failure");
<viewName>NEW VIEW</viewName> out.write(" Code: " + </return>rs.getErrorCode());
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
|
Expand |
---|
|
webサービスレポートのレポートからのインタラクションを処理します。こちらの関数は、レポートページの変更、ドリルスルー、ドリルダウン、ドリルエニウェアの実行、シリーズ選択の変更など、レポートでのインタラクションに使用します。 AlterationCommandパラメーターは、レポートに組み込まれたテキストコードであり、レポートを変更するためにwebサービスに戻すことができます。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「COMMAND」に設定します。 | OrgRef | String | クライアント組織の内部参照IDです。(オプション設定) | ReportId | Integer | 処理をするレポートのIDです。 | AlterationCommand | String | レポートに適用するコマンドです。これは、レポートの変更方法を指定します。このパラメーターは、レポートに組み込まれたテキストコードです。レポート詳細取得時に、この値をwebサービスに渡すことでレポートを変更することができます。 | CommandHistory | String | (オプション設定)パイプされたコマンドの一覧です。(レポートがセッションから消去されている場合、コマンドを順番に適用します) | SessionID | String | (オプション設定)以前のセッションのIDです。 | LanguageCode | String | (オプション設定)言語を指定します。 |
応答要素応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
language | java |
---|
theme | Eclipse | language | java |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("PRINTCOMMAND"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。
| code | rsr.setReportClientReferenceId("1"); |
レポートに適用するコマンドを追加します。
Code Block |
---|
| rsr.setOrgRefsetAlterationCommand("org1DRILLDOWN|60712|53655|RXVyb3Bl"); // search for the report in this client org |
印刷可能な書式に変換するレポートを指定します。
必要に応じて、以前のリクエストからセッションIDを渡します。
Code Block |
---|
language | java |
---|
theme | Eclipse | language | java |
---|
| rsr.setReportIdsetSessionId(60712"ce509806176f6a0563767bfb0b2bb36f"); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_command_printreportreport.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_command_printreportreport.jsp」を実行します。
Code Block |
---|
language | java |
---|
theme | Eclipse |
---|
language | java |
---|
| /* ws_printreport.jsp */
<%@page import="com.thoughtworks.xstream.io.xml.StaxDriver"%>
<%@ 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.*" %>
<%@ page import="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
<%
ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("PRINTCOMMAND");
rsr.setReportId(60712);
rsr.setAlterationCommand("DRILLDOWN|60712|53655|RXVyb3Bl");
rsr.setReportClientReferenceId("1");
rsr.setSessionId("ce509806176f6a0563767bfb0b2bb36f");
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
%> <xmp> <%
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
m.marshal(rootElement,out);
%></xmp><%
//out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
...