Using the File Transport to write to a file
In this recipe, we will write a file to the local filesystem (local to the OSB server). We will implement a business service which uses the File Transport to do that. Additionally, we will create a proxy service and control the filename of the file being written by using a Transport Header action.
Getting ready
No special actions necessary.
How to do it...
We begin with a business service writing a file to a local folder. In Eclipse OEPE, perform the following steps:
Create a new OSB project and name it
using-file-transport-to-write-to-file
.Create a
business
folder in that new project.In the
business
folder create a new business service namedWriteToLocalFile
.On the General tab select Messaging Service as the Service Type option.
Navigate to the Messaging tab and select Text as the Request Message Type.
Leave the Response Message Type on None.
Navigate to the Transport tab and select file from the Protocol drop-down list.
Enter
file:///C:/work/destination...