Oracle Portlet Development - RSS Feed

Post on 02-Mar-2015

1.750 views 1 download

Transcript of Oracle Portlet Development - RSS Feed

Oracle Portlet Development – RSS Feed Data

Alvin Reyes

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.

Create new FMW Project

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

ware Project

Create new FMW Project• Name: FMiddlewareApplication

• On the model: Include the WebCenter Portlet Creation Service

Create new FMW Project• On the ViewController: Default Configuration

• Finish!

Create new FMW Project• Project Structure!

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

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).

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

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

is where all our XSD file will be placed.

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.

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

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

display of it in the design view canvass.

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.

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

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

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

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

Create URL Service Data Control

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

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

• Click Finish!

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.

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.

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

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

Display Twitter Data

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

Display Twitter Data

• Page with Twitter Data!

Display Twitter Data

• Run the Page!

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.

Create Portlet Entry

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

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

Create Portlet Entry

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).

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

Oracle WebCenter

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

it can be done via Enterprise Manager.