33
Oracle Portlet Development – RSS Feed Data Alvin Reyes

Oracle Portlet Development - RSS Feed

Embed Size (px)

Citation preview

Page 1: Oracle Portlet Development - RSS Feed

Oracle Portlet Development – RSS Feed Data

Alvin Reyes

Page 2: Oracle Portlet Development - RSS Feed

Agenda

• Tutorial on:– Create Portlet Entry with RSS Data– Expose Portlet Entry to Oracle WebCenter

• For this Portlet Development – I’ll be using Twitter RSS Data.

Page 3: Oracle Portlet Development - RSS Feed

Create new FMW Project

• Open up your Oracle JDeveloper IDE and Create a new Fusion Middleware Project.– New > Fusion Middle

ware Project

Page 4: Oracle Portlet Development - RSS Feed

Create new FMW Project• Name: FMiddlewareApplication

• On the model: Include the WebCenter Portlet Creation Service

Page 5: Oracle Portlet Development - RSS Feed

Create new FMW Project• On the ViewController: Default Configuration

• Finish!

Page 6: Oracle Portlet Development - RSS Feed

Create new FMW Project• Project Structure!

• Next Step: Get Twitter Feed Data from its live RSS.

Page 7: Oracle Portlet Development - RSS Feed

Get Twitter DataFirst Step: Get XSD from the Twitter RSS Feed.

Get your twitter feed by using the following link:

http://twitter.com/statuses/user_timeline/alvinjayreyes.rss

We will be needing the RSS Feed XML to get the XSD (Schema Definition).

Page 8: Oracle Portlet Development - RSS Feed

Get Twitter Data• Save the Feed: <filename>.xml

Page 9: Oracle Portlet Development - RSS Feed

Get Twitter Data• Let’s create a new Folder on the Project. This folder

is where all our XSD file will be placed.

Page 10: Oracle Portlet Development - RSS Feed

Get Twitter Data• Let’s get the XSD from the XML we just downloaded

• To Do this.– New > XML

Schema from XML Document

• XSD (Xml Schema Definition) - specifies how to formally describe the elements in an Extensible Markup Language (XML) document.

Page 11: Oracle Portlet Development - RSS Feed

Get Twitter Data• XSD Creation Wizard: – XML Name: TwitterFeed.xsd– XML Document: <xml file>

Page 12: Oracle Portlet Development - RSS Feed

Get Twitter Data• Project will now show to XSD file and a graphical

display of it in the design view canvass.

Page 13: Oracle Portlet Development - RSS Feed

Get Twitter Data• We need to Run the Weblogic Server so that we can get the

XSD URL. For this purpose, we need to develop the JSF Page so that we can Run the Weblogic Server.

Page 14: Oracle Portlet Development - RSS Feed

Get Twitter Data• Run the Application and check the XSD File.

Page 15: Oracle Portlet Development - RSS Feed

Get Twitter Data• Run the Application and check the XSD File.

Take note of the URL as we need this to create the Data Control Component

Page 16: Oracle Portlet Development - RSS Feed

Get Twitter Data• Run the Application and check the XSD File.

Take note of the URL as we need this to create the Data Control Component

Page 17: Oracle Portlet Development - RSS Feed

Get Twitter Data• From the Model Package, create a new Data Control

Create URL Service Data Control

Page 18: Oracle Portlet Development - RSS Feed

Get Twitter Data• Data Control Configuration• Name: twitter_url_dc / URL Endpoint: twitter rss link.

Page 19: Oracle Portlet Development - RSS Feed

Get Twitter Data• Data Format: XML• XSD: The URL of our XSD from our last run.

• Click Finish!

Page 20: Oracle Portlet Development - RSS Feed

Get Twitter Data

• What Just happened:– We created an ADF complaint

Data Control– We use the live RSS Feed and the

XSD to define our Data Control– After completing the Wizard, the

IDE takes care of generating necessary source files for our Data Control.

Page 21: Oracle Portlet Development - RSS Feed

Get Twitter Data

• What Just happened:– We created an ADF complaint

Data Control– We use the live RSS Feed and the

XSD to define our Data Control– After completing the Wizard, the

IDE takes care of generating necessary source files for our Data Control.

Page 22: Oracle Portlet Development - RSS Feed

Display Twitter Data

• Since we now have our Data Control. We can now use this to create ADF components in our JSP pages.

•Go To:• Data Control > Search for the “item”

definition• Drag the “item” definition into the JSP

page

Page 23: Oracle Portlet Development - RSS Feed

Display Twitter Data

• After dragging the “item” definition, a context menu will pop-up.

• Lets Try creating a ADF Read-only Table– Go to > Table > ADF

Read-only Table

Page 24: Oracle Portlet Development - RSS Feed

Display Twitter Data

• You may choose to display all or certain columns on the table.

Page 25: Oracle Portlet Development - RSS Feed

Display Twitter Data

• Page with Twitter Data!

Page 26: Oracle Portlet Development - RSS Feed

Display Twitter Data

• Run the Page!

Page 27: Oracle Portlet Development - RSS Feed

Create Portlet Entry

• Right click on the JSP and click on “Create Portlet Entry” – Remember the additional components “WebCenter Portlet Creation Service” – since we included it on our project, we can create a portlet entry for any pages we have in this project.

Page 28: Oracle Portlet Development - RSS Feed

Create Portlet Entry

• Porlet Entry Information– Take note of the Portlet Name– Click OK

Page 29: Oracle Portlet Development - RSS Feed

Create Portlet Entry

• What happened?– WSRP Created– WSRP stands for Web Service for Remote Portlets – Its a

mechanism / component that exposes Portlets via Web Services.

• Go to this page to access the WSRP – WSDL: http://127.0.0.1:7101/FMiddlewareApplication-ViewController-context-root/info

Page 30: Oracle Portlet Development - RSS Feed

Create Portlet Entry

Page 31: Oracle Portlet Development - RSS Feed

Create Portlet Entry

• Click on WSRP v2 WSDL– V2 means version 2, this is the new version of the WSRP

– WSDL that complies with the latest WSRP.– Click on the link to access the WSDL (Web Service

Definition Language).

Page 32: Oracle Portlet Development - RSS Feed

Create Portlet Entry• WSDL v2

• Take note of the URL: We need this URL for us to install the Portlet on WebCenter

http://127.0.0.1:7101/FMiddlewareApplication-ViewController-context-root/portlets/wsrp2?WSDL

Page 33: Oracle Portlet Development - RSS Feed

Oracle WebCenter

• Oracle WebCenter consumes WSRP.– If you want Oracle WebCenter to consume your Portlet,

it can be done via Enterprise Manager.