We have a legacy application that is only able to upload files through ftp protocol. Our current application has SOAP interface for similar file submissions. Is there any way to configure the WSO2 ESB to transform the uploaded file through ftp to SOAP request for consuming by our current application?
1 に答える
5
はい、それは非常に一般的なアプローチです。FTP から読み取る VFS プロキシを作成できます。次に、SOAP エンドポイントに適合するように (入力形式に応じて) 変換 (つまり、XSLT) を行い、<send>
WS に単純に変換することができます。
ここに例 (疑似コードのみ - テストされていません) がありますが、良い出発点になります:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="ftp_proxy_example" transports="vfs" startOnLoad="true" trace="disable">
<parameter name="transport.PollInterval">10</parameter>
<parameter name="transport.vfs.FileURI">vfs:ftp://user:password@server/path</parameter>
<parameter name="transport.vfs.FileNamePattern">.*[.]xml</parameter>
<parameter name="transport.vfs.ContentType">application/xml</parameter>
<target faultSequence="errorSequence">
<inSequence>
<!-- maybe a transformation -->
<!-- send to your WS endpoint -->
</inSequence>
</target>
</proxy>
于 2013-02-15T10:54:36.193 に答える