SlideShare a Scribd company logo
5
Most read
6
Most read
How To Access Oracle
Cloud Storage Using
Mulesoft
- Ravi Singh
- http://mulesoftnotes.blogspot.com
What is Oracle Storage?
● Cloud based storage for objects and archives
● Your data is secured, quick to recover and simple to use
● Data is accessible anywhere from internet
● Provides wide variety of Application like Oracle, Mysql, Java etc
● Easy to use and Access
Why Enterprise uses it?
● Oracle provides cheaper option to store objects(files) with no burden of
hardware management
● Easy to Scale
How To Signup
You can sign up for a free 30 days free trial of Oracle Cloud here:
https://cloud.oracle.com/en_US/tryit
How To Upload Object or files To Oracle Cloud
● You can create container and then store object in it.
● Ways to download Object
How To access Object or files from Oracle Cloud in Mule
● I am going to use Oracle Java library SDK to upload object to Oracle
container
How To access Object or files from Oracle Cloud
What you need?
● Mulesoft Anypoint studio
● Oracle Java library - Download
● Oracle cloud account
Mulesoft example Demo
Scenario:
● Upload file using http connector
● Store file at local
● Upload same file to Oracle cloud storage
Follow the Youtube video
Download complete code here:
https://github.com/maxravi/Oracle-Cloud-Mule-Example.git
Java SDK method required to store object
CloudStorageConfig myConfig = new CloudStorageConfig();
myConfig.setServiceName("Service name").setServiceUrl("<Service url>")
.setUsername("<username>").setPassword("<password>".toCharArray());
CloudStorage myConnection =
CloudStorageFactory.getStorage(myConfig);
FileInputStream fis = new
FileInputStream("//tmp//"+myVariable);
myConnection.storeObject("filetest11", myVariable,
"multipart/form-data", fis);
Mule Flow
Mule code
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<file:connector name="File" outputPattern="#[flowVars.fname]" writeToDirectory="/tmp" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
<spring:beans>
<spring:bean id="Bean" name="myComponent" class="com.javatransformertest.myComponent"/>
</spring:beans>
<flow name="oraclecloudFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<foreach doc:name="For Each">
<set-variable variableName="fname" value="#[payload.dataSource.part.fileName]]" doc:name="Variable"/>
<set-payload value="#[payload.dataSource.content]" doc:name="Set Payload"/>
<byte-array-to-string-transformer doc:name="Byte Array to String"/>
<file:outbound-endpoint path="/tmp" connector-ref="File" responseTimeout="10000" doc:name="File"/>
<invoke name="Invoke" object-ref="myComponent" method="myMethod" methodArguments="#[message.payload],#[flowVars['fname']]"/>
</foreach>
<logger message="File copied" level="INFO" doc:name="Logger"/>
</flow>
</mule>
Thank You!!

More Related Content

PDF
Final Sonic Media Plan
PPT
Presentation skill Rèn luyện kỹ năng thuyết trình và nói trước đám đông
PPT
1. sejarah gerakan pm & bsmi
DOC
Rpl karir
PPT
Membangun media belajar berbasis ict
PPTX
DP-700_ Microsoft Certified Fabric Data Engineer.pptx
PPTX
AWS Certified AI Practitioner (AIF-C01): Ultimate Guide to Preparation, Recom...
PPTX
Pune_MuleSoft_Meetup_Async_API_Dwl_Library.pptx
Final Sonic Media Plan
Presentation skill Rèn luyện kỹ năng thuyết trình và nói trước đám đông
1. sejarah gerakan pm & bsmi
Rpl karir
Membangun media belajar berbasis ict
DP-700_ Microsoft Certified Fabric Data Engineer.pptx
AWS Certified AI Practitioner (AIF-C01): Ultimate Guide to Preparation, Recom...
Pune_MuleSoft_Meetup_Async_API_Dwl_Library.pptx

More from Ravi Prakash Singh (8)

PDF
Gappsy Review - Create faster and Amazing apps for IOS and Android
PPT
5 Reason Why I have selected Generatepress Theme for my Blog
PDF
Black friday deals for bloggers 2018
PPTX
Elementor pro review and comparison with thrive architect
PPTX
How to access Microsoft Azure cloud storage using Mulesoft
PPTX
Understanding flows and subflows in mule
PPTX
How to deploy and run mule in docker
PPTX
IOT and Mulesoft
Gappsy Review - Create faster and Amazing apps for IOS and Android
5 Reason Why I have selected Generatepress Theme for my Blog
Black friday deals for bloggers 2018
Elementor pro review and comparison with thrive architect
How to access Microsoft Azure cloud storage using Mulesoft
Understanding flows and subflows in mule
How to deploy and run mule in docker
IOT and Mulesoft
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation_ Review paper, used for researhc scholars
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
KodekX | Application Modernization Development
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation_ Review paper, used for researhc scholars
The AUB Centre for AI in Media Proposal.docx
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectroscopy.pptx food analysis technology
Programs and apps: productivity, graphics, security and other tools
KodekX | Application Modernization Development
“AI and Expert System Decision Support & Business Intelligence Systems”
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
Ad

How to access Oracle Cloud storage using Mulesoft

  • 1. How To Access Oracle Cloud Storage Using Mulesoft - Ravi Singh - http://mulesoftnotes.blogspot.com
  • 2. What is Oracle Storage? ● Cloud based storage for objects and archives ● Your data is secured, quick to recover and simple to use ● Data is accessible anywhere from internet ● Provides wide variety of Application like Oracle, Mysql, Java etc ● Easy to use and Access
  • 3. Why Enterprise uses it? ● Oracle provides cheaper option to store objects(files) with no burden of hardware management ● Easy to Scale
  • 4. How To Signup You can sign up for a free 30 days free trial of Oracle Cloud here: https://cloud.oracle.com/en_US/tryit
  • 5. How To Upload Object or files To Oracle Cloud ● You can create container and then store object in it. ● Ways to download Object
  • 6. How To access Object or files from Oracle Cloud in Mule ● I am going to use Oracle Java library SDK to upload object to Oracle container
  • 7. How To access Object or files from Oracle Cloud What you need? ● Mulesoft Anypoint studio ● Oracle Java library - Download ● Oracle cloud account
  • 8. Mulesoft example Demo Scenario: ● Upload file using http connector ● Store file at local ● Upload same file to Oracle cloud storage Follow the Youtube video Download complete code here: https://github.com/maxravi/Oracle-Cloud-Mule-Example.git
  • 9. Java SDK method required to store object CloudStorageConfig myConfig = new CloudStorageConfig(); myConfig.setServiceName("Service name").setServiceUrl("<Service url>") .setUsername("<username>").setPassword("<password>".toCharArray()); CloudStorage myConnection = CloudStorageFactory.getStorage(myConfig); FileInputStream fis = new FileInputStream("//tmp//"+myVariable); myConnection.storeObject("filetest11", myVariable, "multipart/form-data", fis);
  • 11. Mule code <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd"> <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> <file:connector name="File" outputPattern="#[flowVars.fname]" writeToDirectory="/tmp" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/> <spring:beans> <spring:bean id="Bean" name="myComponent" class="com.javatransformertest.myComponent"/> </spring:beans> <flow name="oraclecloudFlow"> <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/> <foreach doc:name="For Each"> <set-variable variableName="fname" value="#[payload.dataSource.part.fileName]]" doc:name="Variable"/> <set-payload value="#[payload.dataSource.content]" doc:name="Set Payload"/> <byte-array-to-string-transformer doc:name="Byte Array to String"/> <file:outbound-endpoint path="/tmp" connector-ref="File" responseTimeout="10000" doc:name="File"/> <invoke name="Invoke" object-ref="myComponent" method="myMethod" methodArguments="#[message.payload],#[flowVars['fname']]"/> </foreach> <logger message="File copied" level="INFO" doc:name="Logger"/> </flow> </mule>