8.3.3 generateOutputData オペレーション
概要
generateOutput と generateData を同時に行うオペレーションです。
ファイルを生成し、生成したファイルをリポジトリへ登録、ファイルシステムへ出力、Amazon S3へ出力、またはバッチ印刷で印刷しつつ、バイナリ形式ファイルをレスポンスとして取得します。
処理要求は generateOutputDataリクエストメッセージ、処理結果の取得は generateOutputDataレスポンスメッセージでそれぞれリクエストします。
generateOutputDataリクエストメッセージ
レイアウト定義から指定したファイルを指定先へ出力するようにリクエストします。
バイナリ形式で作成するファイルの種類として PDF ファイル、Excel ファイル、 CSV ファイルを選択できます。作成するファイルのレイアウトの指定や、CSVによるデータの設定が可能です。generateOutputDataレスポンスメッセージ
リポジトリに登録した生成ファイルの保存先のURLや、バッチ印刷した場合の印刷結果が取得できます。生成したファイルは、SOAP メッセージとして返されます。
SOAPメッセージ例
1ファイルシステムに出力する場合に、<filesystem>タグ を使用する例
リクエストメッセージ例<?xml version='1.0' encoding='utf-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <generateOutputDataRequest xmlns="http://schemas.brainsellers.com/webservices/bizstream/2006-10" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:ns2="http://schemas.brainsellers.com/webservices/common/2006-10"> <output> <csv encoding="MS932" lineSeparator="CRLF"> <filesystem filePath="/bs/output/Sample.csv" /> </csv> </output> <layoutData> <layoutDefinition uri="/bs/sample/xml/Sample1.xml"/> </layoutData> </generateOutputDataRequest> </S:Body> </S:Envelope>
<?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <bsws:generateOutputDataResponse xmlns:bsws="http://schemas.brainsellers.com/webservices/bizstream/2006-10" xmlns="http://schemas.brainsellers.com/webservices/bizstream/2006-10"> <common:contentDataGroup xmlns:common="http://schemas.brainsellers.com/webservices/common/2006-10"> <common:contentData xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmime:contentType="text/csv"> 【BASE64データ】 </common:contentData> </common:contentDataGroup> <bsws:filesystem filePath="/bs/output/Sample.csv"/> </bsws:generateOutputDataResponse> </soapenv:Body> </soapenv:Envelope>
2リポジトリに出力する場合に、<repository>タグ を使用する例
リクエストメッセージ例<?xml version='1.0' encoding='utf-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <generateOutputDataRequest xmlns="http://schemas.brainsellers.com/webservices/bizstream/2006-10" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:ns2="http://schemas.brainsellers.com/webservices/common/2006-10"> <output> <csv encoding="MS932" lineSeparator="CRLF"> <repository filePath="/Test/Sample.csv" /> </csv> </output> <layoutData> <layoutDefinition uri="/bs/sample/xml/Sample1.xml"/> </layoutData> </generateOutputDataRequest> </S:Body> </S:Envelope>
<?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <bsws:generateOutputDataResponse xmlns:bsws="http://schemas.brainsellers.com/webservices/bizstream/2006-10" xmlns="http://schemas.brainsellers.com/webservices/bizstream/2006-10"> <common:contentDataGroup xmlns:common="http://schemas.brainsellers.com/webservices/common/2006-10"> <common:contentData xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmime:contentType="text/csv"> 【BASE64データ】 </common:contentData> </common:contentDataGroup> <bsws:repository filePath="/Test/Sample.csv" uri="http://server:8080/jackrabbit/repository/default/Test/Sample.csv" /> </bsws:generateOutputDataResponse> </soapenv:Body> </soapenv:Envelope>
3AmazonS3に出力する場合に、<amazonS3>タグ を使用する例
リクエストメッセージ例<?xml version='1.0' encoding='utf-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <generateOutputDataRequest xmlns="http://schemas.brainsellers.com/webservices/bizstream/2006-10" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:ns2="http://schemas.brainsellers.com/webservices/common/2006-10"> <output> <csv encoding="MS932" lineSeparator="CRLF"> <amazonS3 bucketName="BucketName" filePath="Test/Sample.csv"> <tags> <tag key="key1" value="value1"/> <tag key="key2" value="value2"/> </tags> </amazonS3> </csv> </output> <layoutData> <layoutDefinition uri="/bs/sample/xml/Sample1.xml"/> </layoutData> </generateOutputDataRequest> </S:Body> </S:Envelope>
レスポンスメッセージは、<bsws:amazonS3>のうち、リージョン、バケット名、ファイルパスの値を返します。
<?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <bsws:generateOutputDataResponse xmlns:bsws="http://schemas.brainsellers.com/webservices/bizstream/2006-10" xmlns="http://schemas.brainsellers.com/webservices/bizstream/2006-10"> <common:contentDataGroup xmlns:common="http://schemas.brainsellers.com/webservices/common/2006-10"> <common:contentData xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmime:contentType="text/csv"> 【BASE64データ】 </common:contentData> </common:contentDataGroup> <bsws:amazonS3 region="ap-northeast-1" bucketName="BucketName" filePath="Test/Sample.csv"/> </bsws:generateOutputDataResponse> </soapenv:Body> </soapenv:Envelope>