...
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レポートがアクセスされた回数です。 | FormatCode | String | レポートの書式コードです。 | AverageRunTime | Integer | レポートの平均実行時間です。 | Category | String | レポートが表示されるカテゴリーです。 | SubCategory | String | レポートのサブカテゴリーです。 | ReportUsage | Integer | レポートが使用、またはアクセスされた回数です。 | ViewName | String | ビューの名前です。 | Datasource | String | データソースの名前です。 | Author | String | レポートを作成したユーザーです。 | AuthoringMode | String | 指定されたレポートの書式コードです。レポートが作成されたモードです。 | BinaryDataReportTemplate | String | Base64でエンコードされたXLSX、またはXLSのバイナリーチャンクです。レポートのテンプレートです。 | ContentTypeDataOutput | String | このオブジェクトのMIMEコンテンツタイプです。値は「application/vnd.openxmlformats-officedocument.spreadsheetml.sheet」になります。 | データ出力です。例:カラム(列) | DashboardEnabled | Boolean | ダッシュボードが有効化されている場合はTrueになります。 | LastModifiedDate | Date | レポートの最終編集日です。 |
応答の例サービスは、今回の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>UEsDBBQACAgIAJUKa0wAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlb ...</binaryData>
<canDrill>false</<canDrill>false</canDrill>
<category>Audit Reports</category>
<contentType>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</contentType><category>Tutorial</category>
<dashboardEnabled>true</dashboardEnabled>
<dataOutput>COLUMN</dataOutput>
<datasource>Yellowfin<datasource>Ski Configuration Database<Team</datasource>
<errorCode>0</errorCode>
<formatCode>REPORTANDCHART</formatCode>
<hitCount>25<<hitCount>0</hitCount>
<lastModifiedDate>2016<lastModifiedDate>2017-0306-29</lastModifiedDate>
<lastRunDuration>0</lastRunDuration>
<lastRunStatus>RUN_NOERROR</lastRunStatus>26</lastModifiedDate>
<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<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Active>Company Session Start<Name</span>
IsIn Not NullList
<span class="rptFilterLogicIdentifier"><>[User Prompt]</span>
</div>]]></preRunFilterString>
<private>false</private>
<reportDescription>Top N Agencies compared to all other Agencies by <reportDescriptiondemographic</>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 |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("XLSXINFO"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。 Code Block |
---|
| rsr.setOrgRef("org1"); // search for the report in this client org |
XLSX書式に変換するレポートを指定します。どのレポートのコメントのステータスを変更するか指定することができます。 Code Block |
---|
| rsr.setReportId(60712); |
レポートクライアント参照ID、またはセッションIDを指定することもできます。 Code Block |
---|
| rsr.setReportClientReferenceId("1");
rsr.setSessionId("18607a5670842650d512976b5d7ccddd"); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_info_xlsxreportreport.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_info_xlsxreportreport.jsp」を実行します。
Code Block |
---|
| <%
/* 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" %>
<%
/*
Create Group
Using Java generated stubs rather that using the Yellowfin webservices API..
*/
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("XLSXINFO");
rsr.setOrgRef("1");
rsr.setReportId(60712);
rsr.setReportClientReferenceId("1");
ReportServiceResponse rs=rsc.remoteReportCall(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サービスは、れオートカラム(列)やフィルターのメタデータを含む、指定したレポートの概略情報を返します。 リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「DOCX」、または「DOC」に設定します。SCHEMA」に設定します。 | OrgRef | String | クライアント組織内部参照IDです。(オプション設定) | ReportId | IntegerDOCX/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サービスリクエストのステータスです。値の選択肢は、以下の通りです。 | ReportId | Integer | 指定したレポートのIDです。 | ReportName | Columns | ReportSchema[] | レポート結果セット内の各カラム(列)と、レポートにユーザープロンプトフィルターデータを渡す必要があるかどうかの情報(メタデータ)を含むReportSchemaの配列です。 | Author | String | レポートを作成したユーザーの名前です。 | AuthoringMode | String指定したレポートの名前です。 | | HitCountAverageRunTime | Integer指定したレポートがアクセスされた回数です。 | | FormatCodeCanDrill | StringBoolean指定されたレポートの書式コードです。 | レポートのドリル可否です。 | BinaryDataCategory | StringBase64でエンコードされたDOCX、またはDOCのバイナリーチャンクです。 | レポートが保存されているフォルダーの名前です。 | ContentTypeSubCategory | 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> | レポートが保存されているサブフォルダ―の名前です。 |
DashboardEnabled | Boolean | |
DataOutput | String | 以下のいずれかになります。 |
Datasource | String | レポートが依存するデータソースの名前です。 |
DrillCode | String | レポートで利用可能な場合のドリルタイプです。以下のいずれかになります。 - DRILLDOWN
- DRILLTHROUGH
- DRILLANYWHERE
|
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[] | レポートがサーバ上で実行されている時のデバッグ情報を示す文字列の配列です。デバッグとエラーのトレーシングに使用されます。 |
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>
<author>System Administrator</author>
<authoringMode>JAVA</authoringMode>
<averageRunTime>0</averageRunTime>
<canDrill>false</canDrill>
<category>Tutorial</category>
<columns>
<columnName>Region</columnName>
<dataType>TEXT</dataType>
<displayName>Athlete Region</displayName>
<fieldId>1</fieldId>
<hidden>false</hidden>
<numberOfDecimals>0</numberOfDecimals>
<outputLocation>COLUMN</outputLocation>
<prompt>false</prompt>
<sortOrder>0</sortOrder>
</columns>
<columns>
<allowPrompt>false</allowPrompt>
<cachedValues>true</cachedValues>
<columnName>Region</columnName>
<dataType>TEXT</dataType>
<displayName>Athlete Region</displayName>
<filterDisplayType>DROPDOWN</filterDisplayType>
<filterId>74908</filterId>
<filterOmittable>true</filterOmittable>
<filterType>INLIST</filterType>
<filterTypeCode>FILTER</filterTypeCode>
<filterUUID>d4ea61ab-247e-403a-b51b-8243aeea63db</filterUUID>
<numberOfDecimals>0</numberOfDecimals>
<prompt>true</prompt>
<sortOrder>0</sortOrder>
</columns>
<dashboardEnabled>true</dashboardEnabled>
<dataOutput>COLUMN</dataOutput>
<datasource>Ski Team !!!</datasource>
<drillCode>DRILLDOWN</drillCode>
<errorCode>0</errorCode>
<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>
<private>false</private>
<reportDescription>Ski Team, 8/6/2018 9:36 AM</reportDescription>
<reportId>74907</reportId>
<reportName>cached filters</reportName>
<reportTemplate>REPORTANDCHART</reportTemplate>
<reportUUID>982500e8-7b33-476b-be47-6a1aab611349</reportUUID>
<reportUsage>100</reportUsage>
<sessionId>7e9971ea99fff609387ac1c504abcc63</sessionId>
<statusCode>SUCCESS</statusCode>
<subCategory>Training</subCategory>
<tags>No tags</tags>
<viewName>Ski Team</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("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 |
---|
|
<%
/* ws_reportschema.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.*" %>
<%
ReportServiceResponse rs = null;
ReportServiceRequest rsr = new ReportServiceRequest();
ReportServiceService ts = new ReportServiceServiceLocator("localhost", 8080, "/services/ReportService", false);
ReportServiceSoapBindingStub rssbs = (ReportServiceSoapBindingStub) ts.getReportService();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setReportRequest("SCHEMA");
rsr.setReportId(70045);
rs = rssbs.remoteReportCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
out.write("Success </br>");
ReportSchema[] schema = rs.getColumns();
for (ReportSchema s: schema)
//display filters:
if (s.getFilterType() != null && s.getFilterTypeCode().equals("FILTER")){
out.write("<br>Display Name: " + s.getDisplayName());
out.write("<br>Filter UUID:" + s.getFilterUUID());
out.write("<br>Filter Id:" + s.getFilterId());
}
} else {
out.write(rs.getStatusCode());
out.write(rs.toString());
}
%> |
Expand |
---|
|
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>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<reportRequest>FILTEROPTIONS</reportRequest>
<reportId>70066</reportId>
<objectName>70081</objectName>
</arg0>
</web:remoteReportCall>
</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 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>
<formatCode>REPORTANDCHART</formatCode>
<hitCount>2</hitCount>
<lastModifiedDate>2018-06-18</lastModifiedDate>
<lastRunDuration>0</lastRunDuration>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Loaded Report: 70080 Successfully</messages>
<messages>Retrieving Options</messages>
<messages>Request Contains No ReportFilter Records.</messages>
<messages>Region (FilterId: 70082 ) Requires User Prompt</messages>
<messages>Ignoring Prompt Filter On Field: 70082</messages>
<messages>DEMOGRAPHIC (FilterId: 70081 ) Requires User Prompt</messages>
<authoringMode>JAVA</authoringMode><messages>Web Service Request Complete</messages>
<averageRunTime>0</averageRunTime> <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Athlete Region</span>
In List
<span <binaryData>UEsDBBQACAgIAN0Ma0wAAAAAAAAAAAAAAAATAAAAW0 ...</binaryData>
<canDrill>false</canDrill>class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>
<div class="rptFilterLogicText">
AND
<span class="rptFilterLogicIdentifier">Demographic</span>
In List
<span class="rptFilterLogicIdentifier">(Adventure, Relaxation, Family, Culture)</span>
</div>]]></preRunFilterString>
<private>false</private>
<category>Audit Reports</category> <reportDescription>Ski Team, <contentType>application/vnd.openxmlformats-officedocument.wordprocessingml.document</contentType>18/6/2018 2:49 PM</reportDescription>
<dashboardEnabled>true<<reportId>70066</dashboardEnabled>reportId>
<dataOutput>COLUMN<<reportName>qwerty</dataOutput>reportName>
<datasource>Yellowfin Configuration Database</datasource><reportTemplate>REPORTANDCHART</reportTemplate>
<errorCode>0</errorCode><reportUUID>c105ab26-9744-434d-9c8c-9fb9e48d80c0</reportUUID>
<formatCode>REPORTANDCHART</formatCode><reportUsage>100</reportUsage>
<results>
<hitCount>26</hitCount> <lastModifiedDate>2016-03-29</lastModifiedDate><dataValue>Asia</dataValue>
<lastRunDuration>0</lastRunDuration> <dataValue>Asia</dataValue>
<lastRunStatus>RUN_NOERROR</lastRunStatus> </results>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <sessionId>eb31d9392a25c8c40995237650837cd5</sessionId>
<messages>Loaded<statusCode>SUCCESS</statusCode>
Report: 56401 Successfully</messages> <subCategory>Training</subCategory>
<messages>Generating DOCX Report</messages> <tags>No tags</tags>
<messages>Request Contains No ReportFilter Records.</messages> <viewName>New View</viewName>
<messages>Report Run Successfully<</messages>return>
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| <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> |
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_filteroptions.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_filteroptions.jsp」を実行します。
Code Block |
---|
| <%
/* <private>false</private> <reportDescription/>ws_filteroptions.jsp <reportId>56401</reportId> <reportName>Active Sessions<*/reportName>
%>
<%
ReportServiceResponse rs = null;
<reportTemplate>REPORTANDCHART</reportTemplate> ReportServiceRequest rsr = new ReportServiceRequest();
ReportServiceService <reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID>
<reportUsage>27</reportUsage>
ts = new ReportServiceServiceLocator("localhost", 8080, "/services/ReportService", false);
ReportServiceSoapBindingStub rssbs = (ReportServiceSoapBindingStub) ts.getReportService();
<sessionId>9b4a5e7182d359795d176d56378ac0f2</sessionId>
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
<statusCode>SUCCESS</statusCode> rsr.setOrgId(1);
rsr.setReportRequest("FILTEROPTIONS");
<subCategory>Admin
Reports</subCategory> rsr.setReportId(70066);
rsr.setObjectName("70081");
<tags>No tags</tags> <viewName>NEW
VIEW</viewName>
</return>rs = rssbs.remoteReportCall(rsr);
</ns2:remoteReportCallResponse> </S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 インターネットブラウザから、「http://<host>:<port>/ws_docxreport.jsp」を実行します。
Code Block |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの呼び出しを実行するための基礎的なリクエストです。
Code Block |
---|
| | ReportServiceRequest rsr = new ReportServiceRequest();if ("SUCCESS".equals(rs.getStatusCode())) {
rsrout. setLoginIdwrite(" admin@yellowfin.com.auSuccess </br>");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("DOCX");レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。 Code Block |
---|
| rsr.setOrgRef("org1");
// 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)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。/* ReportRow[] rows = rs.getResults();
for (ReportRow r: ws_docxreport.jsprows) {
*/ <%@ 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())) { //display filter values:
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class); Marshaller m = context.createMarshaller(); mout.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XMLwrite("<br>" + r.getDataValue()[0]);
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs); m.marshal(rootElement,out); //out.write("Success"); }
} else {
out.write("Failure"(rs.getStatusCode());
out.write(" Code: " + rs.getErrorCodetoString());
}
%> |
|
レポート結果セット関数
これらのwebサービスは、レポートにより生成される結果に固有のものです。
Expand |
---|
| PDFリクエストは、指定されたレポートを実行し、PDF書式で返します。 |
こちらの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サービス関数です。「PDF」に設定します。RESULTSET」に設定します。 | OrgRef | String | クライアント組織内部参照IDです。(オプション設定) | ReportId | Integer | PDF書式で返すレポートを指定するための内部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>PDF<<reportRequest>RESULTSET</reportRequest>
<reportId>56401<<reportId>58511</reportId>
</arg0>
</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()
応答要素 | データ型 | 説明 |
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>
<binaryData>JVBERi0xLjQKJeLjz9MKNCAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDI4OT4+ c3RyZWFtCnic7VNNSwMxEI1 . . .<<errorCode>0</binaryData>errorCode>
<canDrill>false<<formatCode>REPORTANDCHART</canDrill>formatCode>
<category>Audit Reports<<hitCount>4</category>hitCount>
<contentType>application/pdf</contentType><lastModifiedDate>2016-04-13</lastModifiedDate>
<dashboardEnabled>true<<lastRunDuration>0</dashboardEnabled>lastRunDuration>
<dataOutput>COLUMN</dataOutput><lastRunStatus>RUN_NOERROR</lastRunStatus>
<messages>Successfully <datasource>YellowfinAuthenticated Configuration Database</datasource>User: admin@yellowfin.com.au</messages>
<errorCode>0</errorCode><messages>Loaded Report: 58511 Successfully</messages>
<formatCode>REPORTANDCHART</formatCode> <messages>Returning RAW Resultset</messages>
<hitCount>25</hitCount> <messages>Request Contains No ReportFilter Records.</messages>
<lastModifiedDate>2018-07-02</lastModifiedDate> <messages>Report Run <lastRunDuration>0<Successfully</lastRunDuration>messages>
<lastRunStatus>RUN_NOERROR</lastRunStatus><messages>Web Service Request Complete</messages>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <private>false</private>
<messages>Loaded<reportDescription/>
Report: 56401 Successfully</messages> <reportId>58511</reportId>
<messages>Generating PDF Report</messages> <reportName>Role Population</reportName>
<messages>Request Contains No ReportFilter Records.</messages> <reportTemplate>REPORTANDCHART</reportTemplate>
<messages>Report Run Successfully</messages> <reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID>
<messages>Web Service Request Complete<<reportUsage>7</messages>reportUsage>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Active Session Start</span>
Is Not Null
<span class="rptFilterLogicIdentifier"></span>
</div>]]></preRunFilterString><results>
<dataValue>System Administrator</dataValue>
<private>false</private> <dataValue>1</dataValue>
<reportDescription/> </results>
<reportId>56401</reportId> <results>
<reportName>Active Sessions</reportName> <dataValue>Consumer & <reportTemplate>REPORTANDCHART</reportTemplate>Collaborator</dataValue>
<reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID><dataValue>5</dataValue>
<reportUsage>100<</reportUsage>results>
<sessionId>bb2175f6da398640f670ff666c40fcfa<<sessionId>c958af74f677c4b1f575bd728d3b25d0</sessionId>
<statusCode>SUCCESS</statusCode>
<subCategory>Admin<subCategory>User Reports<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("PDFRESULTSET"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。結果を取得するレポートを指定します。 Code Block |
---|
| rsr.setOrgRefsetReportId("org1"); // search for the report in this client org | PDF書式で参照するレポートを指定します。レポートクライアント参照IDを指定することもできます。 Code Block |
---|
| rsr.setReportIdsetReportClientReferenceId(60712"1"); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例
以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。
- コードをコピーして、「ws_pdfreportresultset.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_pdfreportresultset.jsp」を実行します。
Code Block |
---|
|
<%
/* ws_pdfreportresultset.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("PDF");
rsr.setOrgRef("1RESULTSET");
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 | CSVFORMATTEDRESULTSET |
---|
|
こちらのリクエストは、指定されたレポートを実行し、CSV書式(カンマ区切り値)で返します。こちらのwebサービスは、RESULTSET関数の呼び出しに類似していますが、レポートからのフォーマッターを使用してロウ結果セットを返します。 リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「CSV」に設定します。FORMATTEDRESULTSET」に設定します。 | OrgRef | String | クライアント組織内部参照IDです。(オプション設定) | ReportId | Integer | CSV書式で返すレポートを指定するための内部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>CSV<<reportRequest>FORMATTEDRESULTSET</reportRequest>
<reportId>56401<<reportId>58511</reportId>
</arg0>
</web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素応答には、これらの主要なパラメーターが含まれます。応答には、これらの主要なパラメーターが含まれます。(より詳細な応答パラメーターの一覧は、ReportServiceResponseオブジェクトを参照してください。 応答要素 | データ型 | 説明 | 取得コード | ReportId | Integer | 指定したレポートのIDです。 | getReportId() | ReportNameStatusCode | String | 指定したレポートの名前です。Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。getReportName() HitCountInteger | Results | 指定したレポートがアクセスされた回数です。 | getHitCount()
| FormatCode | String | 指定したレポートの書式コードです。 | getFormatCode()
| BinaryData | String | Base64でエンコードされたCSVのバイナリーチャンクです。 | getBinaryData()
| ContentType | String | このオブジェクトのMIMEコンテンツタイプです。値は「text/comma-separated-values」です。 | getContentType()
|
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>
<binaryData>Tm8gcmVzdWx0cyByZXR1cm5lZC4K</binaryData>
<canDrill>false</canDrill>
<category>Audit Reports</category>
<contentType>text/comma-separated-values</contentType>/category>
<dashboardEnabled>true</dashboardEnabled>
<dataOutput>COLUMN</dataOutput>
<datasource>Yellowfin Configuration Database</datasource>
<errorCode>0</errorCode>
<formatCode>REPORTANDCHART</formatCode>
<hitCount>26<<hitCount>5</hitCount>
<lastModifiedDate>2018<lastModifiedDate>2016-0704-02<13</lastModifiedDate>
<lastRunDuration>0</lastRunDuration>
<lastRunStatus>RUN_NOERROR</lastRunStatus>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Loaded Report: 5640158511 Successfully</messages>
<messages>Generating<messages>Returning CSVRAW Report<Resultset</messages>
<messages>Request Contains No ReportFilter Records.</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>
</div>]]></preRunFilterString>
<private>false</private>
<reportDescription/>
<reportId>56401<<reportId>58511</reportId>
<reportName>Active<reportName>Role Sessions<Population</reportName>
<reportTemplate>REPORTANDCHART</reportTemplate>
<reportUUID>594d4da4<reportUUID>00c65743-1b5815f8-44d34f93-bf4face1-11456a42f68c<e3d4d2b956eb</reportUUID>
<reportUsage>100<<reportUsage>9</reportUsage>
<sessionId>6f95db60d17d24138a5faf23190f5a6e</sessionId><results>
<statusCode>SUCCESS</statusCode> <subCategory>Admin Reports</subCategory><dataValue>System Administrator</dataValue>
<tags>No tags<<dataValue>1</tags>dataValue>
<viewName>NEW VIEW<</viewName>results>
</return> <results>
</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");<dataValue>Consumer & Collaborator</dataValue>
<dataValue>5</ /dataValue>
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)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。/* </results>
<sessionId>1e4f0c8ee07d24a5500f952a459b1652</sessionId>
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(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
<statusCode>SUCCESS</statusCode>
<subCategory>User Access</subCategory>
<tags>No tags</tags>
<viewName>NEW VIEW</viewName>
</return>
</ns2:remoteReportCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
|
rsr.setLoginId("admin@yellowfin.com.au"); |
.setOrgId(new Integer(1));
rsr.setReportRequest("CSV");
rsr.setOrgRef("1");
rsr.setReportId(60712);
rsr.setReportClientReferenceId("1"); |
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_resultset.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_resultset.jsp」を実行します。
Code Block |
---|
| <%
/* ReportServiceResponse rs=rsc.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { ws_resultset.jsp */
%>
<%@ page JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
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" %>
<%
JAXBElement<ReportServiceResponse>ReportService rootElementrsc = new JAXBElement<ReportServiceResponse>(new QNameReportService(); //("ReportServiceResponselocalhost"), 8080, ReportServiceResponse.class, rs);"admin@yellowfin.com.au", "test", "/services/ReportService");
ReportServiceRequest rsr = new ReportServiceRequest();
mrsr.marshal(rootElement,outsetLoginId("admin@yellowfin.com.au");
//out.writersr.setPassword("Successtest");
rsr.setOrgId(new Integer(1));
} else { rsr.setReportRequest("FORMATTEDRESULTSET");
outrsr.writesetOrgRef("Failure1");
rsr.setReportId(60712);
outrsr.writesetReportClientReferenceId("1");
Code: " +ReportServiceResponse rs=rsc.getErrorCoderemoteReportCall()rsr);
}
%> |
|
Expand |
---|
|
リクエストは、指定されたレポートを実行し、テキスト書式で返します。 リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「TEXT」に設定します。 | 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> if ("SUCCESS".equals(rs.getStatusCode())) {
JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
<arg0>
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
<loginId>admin@yellowfin.com.au</loginId> JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
<password>test</password> m.marshal(rootElement,out); <orgId>1</orgId>
//out.write("Success");
<reportRequest>TEXT</reportRequest> } else {
<reportId>60712</reportId>out.write("Failure");
out.write(" Code: " </arg0>+ rs.getErrorCode());
}
</web:remoteReportCall> </soapenv:Body>
</soapenv:Envelope>
%> |
|
その他
Expand |
---|
|
こちらの関数は、受信者のメールアドレスにレポートを送信します。 応答要素リクエスト要素応答には、これらの主要なパラメーターが含まれます。以下の要素は、こちらのリクエストとともに渡されます。 応答要素リクエスト要素 | データ型 | 説明取得コード | LoginId | ReportIdString | Integer | 指定したレポートのIDです。 | getReportId() | ReportName | String | 指定したレポートの名前です。 | getReportName()
| HitCount | Integer | 指定したレポートがアクセスされた回数です。 | getHitCount()
| FormatCode | String | 指定したレポートの書式コードです。 | getFormatCode()
| BinaryData | String | Base64でエンコードされたTEXTのバイナリーチャンクです。 | getBinaryData()
| ContentType | String | このオブジェクトのMIMEコンテンツタイプです。値は「text/tab-separated-values」です。 | getContentType()
|
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| theme | EclipseYellowfin 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 |
---|
|
<S<soapenv:Envelope xmlns:Ssoapenv="http://schemas.xmlsoap.org/soap/envelope/".xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<S<soapenv:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/"><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>
<return> <reportOptions>
<author>System Administrator</author> <authoringMode>JAVA</authoringMode><string>binish.sheikh@yellowfin.com.au</string>
<averageRunTime>0</averageRunTime></reportOptions>
</arg0>
<binaryData>Tm90IGZvciBSZS1TYWxlIExpY2VuY2UsLCwKVG9wIE4sQ29tcGFueSBOYW1lLERlbW9ncmFwaGlj LFN1bSBJbnZvaWNlZCAoUHJlZiBDdXJyZW5jeSkKIlRvcCBOIEFnZW5jaWVzICIsQmFyZ2FpbiBU</web:remoteReportCall>
cmlwcyxBZHZlbnR1cmUsIiQxMCw4NTYiCiJUb3AgTiBBZ2VuY2llcyAiLEJhcmdhaW4gVHJpcHMs RmFtaWx5LCIkMjk1LDgyNyIKIlRvcCBOIEFnZW5jaWVzICIsQmFyZ2FpbiBUcmlwcyxMdXh1cnks IiQxLDAzMiwwNTYiCiJUb3AgTiBBZ2VuY2llcyAiLEJhcmdhaW4gVHJpcHMsUmVsYXhhdGlvbiwi JDgwLDY2MCIKIlRvcCBOIEFnZW5jaWV . . .</binaryData>
<canDrill>false</canDrill>
</soapenv:Body>
</soapenv:Envelope> |
応答要素
応答には、これらの主要なパラメーターが含まれます。
応答要素 | データ型 | 説明 |
StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
応答の例
サービスは、今回のSOAPの例に基づき、以下の応答を返します。
Code Block |
---|
|
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<category>Tutorial</category>
<contentType>text/tab-separeted-values</contentType><ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<dashboardEnabled>true</dashboardEnabled> <author>System <dataOutput>COLUMN<Administrator</dataOutput>author>
<datasource>Ski Team<<authoringMode>JAVA</datasource>authoringMode>
<errorCode>0<<averageRunTime>0</errorCode>averageRunTime>
<formatCode>REPORTANDCHART<<canDrill>false</formatCode>canDrill>
<hitCount>5<<category>Tutorial</hitCount>category>
<lastModifiedDate>2017-06-26</lastModifiedDate><dashboardEnabled>true</dashboardEnabled>
<lastRunDuration>0<<dataOutput>COLUMN</lastRunDuration>dataOutput>
<datasource>Ski <lastRunStatus>RUN_NOERROR<Team</lastRunStatus>datasource>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages><errorCode>0</errorCode>
<formatCode>CHART</formatCode>
<messages>Loaded Report: 60712 Successfully</messages> <hitCount>3</hitCount>
<messages>Generating TEXT Report</messages> <lastModifiedDate>2018-03-07</lastModifiedDate>
<messages>Request Contains No ReportFilter Records.</messages> <lastRunDuration>0</lastRunDuration>
<messages>AGENCYNAME (FilterId: 60723 )<messages>Successfully RequiresAuthenticated User: Prompt<admin@yellowfin.com.au</messages>
<messages>Loaded <messages>ReportReport: Run70012 Successfully</messages>
<messages>Web Service Request Complete</messages>
<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Company>Invoiced Name<Date</span>
In ListBetween
<span class="rptFilterLogicIdentifier">[User Prompt]<>Current Date - 6 Years And Current Date</span>
</div>
.
.
.
]]></preRunFilterString>
<private>false</private>
<reportDescription>Top<reportDescription>This Nreport Agenciesprovides compareda tohigh alllevel othersummary Agenciesof by demographic<campaigns</reportDescription>
<reportId>60712<<reportId>70012</reportId>
<reportName>Agency<reportName>Campaign Benchmark<Summary</reportName>
<reportTemplate>REPORTANDCHART<<reportTemplate>CHART</reportTemplate>
<reportUUID>c83357db<reportUUID>3e842fae-8aef02f7-4ec74ad3-ab72a632-fce34de9ee77<ca267e0078da</reportUUID>
<reportUsage>0<<reportUsage>100</reportUsage>
<sessionId>0b549fb1c8361edb2b83dee81227e460<<sessionId>fa0cc79a9ea229bd5df85b4a7f50c878</sessionId>
<statusCode>SUCCESS</statusCode>
<subCategory>Marketing & Booking</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("TEXT");レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。
Code Block |
---|
|
rsr.setOrgRef("org1"); </
/return>
search
for
the
report</ns2:remoteReportCallResponse>
in
this
client orgTEXT書式で参照するレポートを指定します。
Code Block |
---|
|
rsr.setReportId(60712); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
|
ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
返される応答には、レポートに関連するパラメーターが含まれます。(より詳細な情報は、上記応答パラメーターの表を参照してください)
完成例
以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。
コードをコピーして、「ws_textreport.jsp」として保存します。root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。インターネットブラウザから、「http://<host>:<port>/ws_textreport.jsp」を実行します。
手順
Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。
Expand |
---|
|
/*ReportServiceRequest rsr = new ReportServiceRequest();
|
ws_textreport.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();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 |
---|
|
/* ws_sendtoemail.jsp //("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("TEXT");
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*/
<%@ 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("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);
ReportServiceResponse m.marshal(rootElement,outrs=rsc.remoteReportCall(rsr);
//out.write("Success");
} else {if ("SUCCESS".equals(rs.getStatusCode())) {
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サービス関数です。「PRINT」に設定します。 | 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> JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
Marshaller m = context.createMarshaller();
<web:remoteReportCall> m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format <arg0>XML
<loginId>admin@yellowfin.com.au</loginId>
JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
<password>test</password> m.marshal(rootElement,out);
<orgId>1</orgId>
<reportRequest>PRINT</reportRequest> //out.write("Success");
} else <reportId>56401</reportId>{
out.write("Failure");
</arg0> </web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素応答には、これらの主要なパラメーターが含まれます。 応答要素 | データ型 | 説明 | 取得コード | 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:Sout.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/">
<S:Body>
<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<author>System Administrator</author>
<authoringMode>JAVA</authoringMode>
<averageRunTime>0</averageRunTime>
<binaryData>PHN0eWxlIHR5cGU9InRleHQvY3NzIj4KLm11bHRpV2lkZ2V0Q2FudmFzRWRpdG9yIHsKCXBvc2l0
aW9uOiByZWxhdGl2ZTsKfQoKLm11bHRp . . .</binaryData>
<canDrill>false</canDrill>
/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<category>Audit Reports</category><web:remoteReportCall>
<contentType>text/html</contentType><arg0>
<dashboardEnabled>true</dashboardEnabled><loginId>admin@yellowfin.com.au</loginId>
<dataOutput>COLUMN<<password>test</dataOutput>password>
<datasource>Yellowfin Configuration Database</datasource><orgId>1</orgId>
<drillCode>NODRILL<<reportRequest>SENDTOEMAIL</drillCode>reportRequest>
<errorCode>0<<reportId>70012</errorCode>reportId>
<formatCode>REPORTANDCHART</formatCode><alterationCommand>drill-down|70012</alterationCommand>
<reportOptions>
<hitCount>30</hitCount> <lastModifiedDate>2018-07-02</lastModifiedDate><string>binish.sheikh@yellowfin.com.au</string>
<lastRunDuration>0<</lastRunDuration>reportOptions>
<lastRunStatus>RUN_NOERROR<</lastRunStatus>arg0>
</web:remoteReportCall>
</soapenv:Body>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
</soapenv:Envelope> |
応答要素応答には、これらの主要なパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<messages>Loaded Report: 56401 Successfully</messages><ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<messages>Generating HTML Report</messages> <messages>Request Contains No ReportFilter Records.</messages><author>System Administrator</author>
<messages>Report Run Successfully</messages><authoringMode>JAVA</authoringMode>
<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><averageRunTime>0</averageRunTime>
<canDrill>false</canDrill>
<private>false<<category>Tutorial</private>category>
<relatedReports<dashboardEnabled>true</>dashboardEnabled>
<reportDescription<dataOutput>COLUMN</>dataOutput>
<datasource>Ski <reportId>56401</reportId>Team</datasource>
<errorCode>0</errorCode>
<reportName>Active Sessions</reportName> <formatCode>CHART</formatCode>
<reportStyle>td.rpthdrcol { position: relative; } img.rptcolmenu { <hitCount>3</hitCount>
position: absolute; right: 5px; top: 0;<lastModifiedDate>2018-03-07</lastModifiedDate>
bottom: 0; margin: auto 0;<lastRunDuration>0</lastRunDuration>
cursor: pointer; } td.rpthdrcol div.rptdata { padding-right: 20px;
}
td.reportChartCell {<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
vertical-align: top;
}
div.reportChart { <messages>Loaded position: relative;Report: 70012 Successfully</messages>
display: inline-block; } img.reportChart { position:<messages>Web absolute;Service Request Complete</messages>
left: 0; top: 0; } . . .
table.rpt56401sectionsummary {
margin-bottom: 20px;
}
.printpagebreak {
PAGE-BREAK-BEFORE: always;
}</reportStyle>
<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>
<reportTemplate>REPORTANDCHART</reportTemplate> <private>false</private>
<reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID> <reportDescription>This report provides a high level summary of <reportUsage>100<campaigns</reportUsage>reportDescription>
<selectedSortColumn>-1</selectedSortColumn><reportId>70012</reportId>
<reportName>Campaign <selectedSortOrder>0<Summary</selectedSortOrder>reportName>
<sessionId>7fc9ad31786cfd1ca10605c301551534<<reportTemplate>CHART</sessionId>reportTemplate>
<sortableColumns/><reportUUID>3e842fae-02f7-4ad3-a632-ca267e0078da</reportUUID>
<sortableColumns<reportUsage>100</>reportUsage>
<sortableColumns<sessionId>fa0cc79a9ea229bd5df85b4a7f50c878</>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 |
---|
| ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("PRINTSENDTOEMAIL"); |
レポートの保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。 Code Block |
---|
| rsr.setOrgRef("org1"); // search for the report in this client org |
印刷可能な書式に変換するレポートを指定します。メール送信するレポートと、その変更コマンドを指定します。 Code Block |
---|
| rsr.setReportId(60712(60712);
rsr.setAlterationCommand("drill-down|60712"); |
レポートの送信先となるメールアドレスを提供します。 Code Block |
---|
| rsr.setReportOptions(new String[]{ "dummy@dummy.com"}); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_printreportsendtoemail.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_printreportsendtoemail.jsp」を実行します。
Code Block |
---|
| /* ws_printreportsendtoemail.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("SENDTOEMAIL");
rsr.setOrgRef("PRINT1");
rsr.setReportId(60712);
rsr.setAlterationCommand("drill-down|60712");
rsr.setReportOptions(new String[]{ "dummy@dummy.com"});
ReportServiceResponse rs=rscrsr.remoteReportCall(rsr);setReportClientReferenceId("1");
rsr.setDashboardTabId(70080);
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());
}
%> |
|
...