こちらの関数は、レポートコメントのステータスを設定するために使用します。ステータスオプションは、次の通りです。:OPEN、EDITED、RESOLVED、DELETEDこちらの関数は、レポートのコメントのステータスを設定するために使用します。ステータスのオプションは、次の通りです。:OPEN、EDITED、RESOLVED、DELETED リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | ReportRequest | String | webサービス関数です。「COMMENTSTATUS」に設定します。 | ReportComment | ReportComment | ステータスを設定するレポートコメントの詳細を含むオブジェクトです。以下の ステータスを設定するレポートのコメントの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | クライアント組織の内部参照IDです。(オプション設定)クライアント組織内のレポートを検索する場合は、こちらを使用します。こちらが設定されない場合、レポートがデフォルト(プライマリー)組織から検索されます。クライアント組織の内部参照IDです(オプション設定)。クライアント組織内のレポートを検索する場合は、こちらを使用します。こちらが設定されない場合、レポートはデフォルト(プライマリー)組織から検索されます。 | ReportId | Integer | 特定のレポートを検索するために、レポートIDを提供することができます。特定のレポートを検索するためにレポートIDを提供することができます。 |
こちらの関数のReportCommentオブジェクトに設定しなくてはいけない必須パラメーターがあります。ReportComment要素 | データ型 | 説明 | 取得コード | CommentId | Integer | コメントのIDです。 | getCommentId() | StatusCode | String | 新しいステータスを提供します。ステータスオプションは、次の通りです。:OPEN、EDITED、RESOLVED、DELETEDステータスのオプションは、次の通りです。:OPEN、EDITED、RESOLVED、DELETED | getStatusCode() |
リクエストの例以下の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>COMMENTSTATUS</reportRequest>
<reportId>60712</reportId>
<reportComment>
<commentId>12345</commentId>
<statusCode>OPEN</statusCode>
</reportComment>
</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>
<canDrill>false</canDrill>
<dashboardEnabled>false</dashboardEnabled>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<private>false</private>
<sessionId>6dc344c3e5dee88864998f4acc17d676</sessionId>
<statusCode>SUCCESS</statusCode>
</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("COMMENTSTATUS"); |
レポートが保存されているクライアント組織を指定する必要がある場合は、こちらのコードを追加します。 Code Block |
---|
| rsr.setOrgRef("org1"); // search for the report in this client org |
こちらの関数は、レポートに与える新しいステータスを指定するために、ReportCommentオブジェクトを要求します。 Code Block |
---|
| ReportComment rc=new ReportComment(); |
ステータスを変更するレポートのコメントを指定することもできます。 Code Block |
---|
| rc.setReportId(60712); |
ステータスを変更するコメントと、新しいステータスを指定します。ステータスを変更するコメントと、新しいステータスのオプションを指定します。 Code Block |
---|
| rc.setCommentId(12345);
rc.setStatusCode("OPEN"); |
リクエストに「rc」オブジェクトを渡します。 Code Block |
---|
| rsr.setReportComment(rc); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
レポートwebサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_commentstatus.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_commentstatus.jsp」を実行します。
Code Block |
---|
| <%
/* ws_commentstatus.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("COMMENTSTATUS");
ReportComment rc=new ReportComment();
rc.setReportId(60712);
rc.setCommentId(12345);
rc.setStatusCode("OPEN");
rsr.setReportComment(rc);
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());
}
%> |
|