Thursday, October 17, 2019

12c OSB - poll file using JCA file adapter

Here i will show how to poll files using JCA file adapter.
Create file OSB project.
Click OK and give file name.
Right click on proxy services swim lane and select file adapter.
Click next.


Select read operation.
Create incoming file path and archive path in your local desktop and provide incoming path and archive path.
Give file name pattern.
Give pooling frequency.
click native schema.
Click next.
Click next.
Browse file and click next.


Click next.
Click next.
Click next.
Click test button and test the code.
Now code xml format output.

Click next.
Now file adapter created.
Right click pipeline and select pipeline.
Click next.
Select wsdl.
Import wsdl.
After importing wsdl like below screen shot and uncheck expose as a proxy service.
After clicking finish and wiring both components.

Double click pipeline and drag and drop pipeline pair.
Add one log activity under stage activity.
Inside log give info like body and deploy the service.
Copy the file in incoming file location and check the console logs.

File data printed in log.

12c OSB - poll file from local directory using file transport

Here We will poll the file from local read directory using file transport.
Create OSB project and also create three folders in your local Directory (1. Read 2. Stage 3. Error).
 Select service bus project.
 Provide project name and click finish.
Right click on Proxy Services swim lane and select file transport.

 Click next and select messaging.
Select request text and response None, because file transport one way service.

Provide endpoint path.
 Service created.
 To resolve above proxy error, Double click proxy service and go to the transport details.
Give stage and error path here
 Save the project, now error is resolved after providing the stage and error path.
Copy the file in read path and test, after testing file will automatically poll.

12c OSB - Create business service using DB package and procedure

Drag and drop db adapter in external service
 Select the DB connection. If it is not created, create it using the pencil button.
 Select "call a Stored Procedure or function" option.
 Select the schema
 Select the package and procedure under that schema




 Right click on a folder⇾Service Bus⇾Generate Business Service
 Choose the created JCA  DB adapter

Click Finish

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...