OSB-12c : Write into File

OSB-12C supports messages in text format. We can use 'Text' message type in both proxy and business services.

Sample use-case:

1. Send message in text format to proxy service.
2. Text request will be routed to File protocol based business service and writes contents of Text message into file with .txt extension.

Create new folder inside MessageType_Service
File -> New -> Folder -> Text_MessageTypeServices along with sub folders.


Create new file protocol based business service.


Give service name and specify protocol for business service.
Service Name: WriteFile
Transport: File
Messaging Req: Text
     Resp: None





Specify End point URI, the location in which you want to write contents of file.
End point URI: file:///Oracle12cPOC/WriteFile





Create new pipeline in design view


Provide Service name and specify transport protocol and message type for proxy service.
Service Name: Test_MessageTypeProxyService
Transport: http
Messaging Req: Text
      Resp: XML








Add a route node and route incoming request to WriteFile.bix business service




In Request Action of Route node add a replace action, to replace body of incoming request.


In Response Action of Route node add a replace action and specify expression as below.
<FinalResponse>
<Code>000</Code>
<Desc>Text Message Type tested successfully.</Desc>
</FinalResponse>



Deploy service into standalone local server. Once deployment is success, we can locate service in sbconsole.



Run ‘Text_MessageTypePipeline’ and provide some valid text message in request part.



We can see that request is routed to WriteFile business service by trace. Once execution of request is success we will static success response as below.



Now you can migrate to specified File writing location and we can see that file is getting created with .txt extension.



Comments

Popular posts from this blog

OSB-12C : XA Transactional Support feature

Static code analysis of Terraform .tf files using ‘Checkov’ — Secure your infrastructure

OSB12c : Schema Validation - Dynamic Validation