8.3.1 generateOutput オペレーション
概要
ファイルを生成し、生成したファイルをリポジトリへ登録、ファイルシステムへ出力、Amazon S3へ出力、またはバッチ印刷機能を利用して印刷します。
処理要求は generateOutputリクエストメッセージ、処理結果の取得は generateOutputレスポンスメッセージでそれぞれリクエストします。

generateOutputリクエストメッセージ
レイアウト定義から指定したファイルを指定先へ出力するようにリクエストします。
generateOutputレスポンスメッセージ
リポジトリに登録した生成ファイルの保存先のURLや、バッチ印刷した場合の印刷結果が取得できます。
SOAPメッセージ例
1ファイルシステムに出力する場合に、<filesystem>タグ を使用する例
リクエストメッセージ例<?xml version='1.0' encoding='utf-8'?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <generateOutputRequest 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> <pdf> <filesystem filePath="/bs/output/Sample.pdf" /> </pdf> </output> <layoutData> <layoutDefinition uri="/bs/sample/xml/Sample1.xml"/> </layoutData> </generateOutputRequest> </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:generateOutputResponse xmlns:bsws="http://schemas.brainsellers.com/webservices/bizstream/2006-10"> <bsws:filesystem filePath="/bs/output/Sample.pdf" /> </bsws:generateOutputResponse> </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> <generateOutputRequest 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> <pdf> <repository filePath="/Test/Sample.pdf" /> </pdf> </output> <layoutData> <layoutDefinition uri="/bs/sample/xml/Sample1.xml"/> </layoutData> </generateOutputRequest> </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:generateOutputResponse xmlns:bsws="http://schemas.brainsellers.com/webservices/bizstream/2006-10"> <bsws:repository filePath="/Test/Sample.pdf" uri="http://server:8080/jackrabbit/repository/default/Test/Sample.pdf" /> </bsws:generateOutputResponse> </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> <generateOutputRequest 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> <pdf> <amazonS3 bucketName="BucketName" filePath="Test/Sample.pdf"> <tags> <tag key="key1" value="value1"/> <tag key="key2" value="value2"/> </tags> </amazonS3> </pdf> </output> <layoutData> <layoutDefinition uri="/bs/sample/xml/Sample1.xml"/> </layoutData> </generateOutputRequest> </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:generateOutputResponse xmlns:bsws="http://schemas.brainsellers.com/webservices/bizstream/2006-10"> <bsws:amazonS3 region="ap-northeast-1" bucketName="BucketName" filePath="Test/Sample.pdf"/> </bsws:generateOutputResponse> </soapenv:Body> </soapenv:Envelope>