REST enabled Oracle Database Cloud Service – my first experiences by Niall Commiskey

clip_image001

I have heard that APEX supports REST so I decided to try this out on my SOA CS environment’s
DB CS instance. AS per usual, I studiously avoided reading any documentation.
This should be simple, right?
I created a simple table Customers

Now, as luck would have it I locked my ADMIN APEX user out.
This I fixed as follows –
ssh into the DB CS machine
start sqlplus

conn system/yourPwd@yourSOADB;

alter session set current_schema = APEX_050000;

select user_id, substr(user_name, 1,10), account_locked from wwv_flow_fnd_user;

update APEX_050000.WWV_FLOW_FND_USER

set web_password = ‘yourNewPassword’

where user_name = ‘ADMIN’

Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Stream Explorer – configuring REST target By Jernej Kaše

 

clip_image002I’ve blogged about how to consume REST with Oracle Stream Explorer in previous posts Exploring data streams with Oracle Stream Explorer – part 1 and Exploring data streams with Oracle Stream Explorer – part 2.

This time we are going to take a look how to configure stream explorer to send events to a REST service.

We’ll start by creating an exploration which summarizes tweets per minute per each of the keywords we have: Configuring a REST target

Configuring a target is as simple as a few clicks. Just click the "Configure a target" button, select REST from the dropdown and enter your REST service url. Note that building the service is not in the scope of this blog, suffice to say it should expect parameters which your exploration emits. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Invoking REST Service from Oracle ACM Java Activity by Andrejus Baranovskis

 

clip_image002In this post I will show you, how to call REST service from ACM Java activity class method. This could be useful in the situations, when you would like to have programmatic ACM activity integrated with REST service data. We could access ACM payload data from within the method overriden in the class implementing Case Activity Callback.

ACM activity implemented on top of Java class, contains the same properties and configuration as the regular one. You could define input/output data, execution properties, etc.:

Here is the Java code to invoke REST service from the Java class implementing ACM activity. I’m giving an example to parse ACM payload and access Last Name attribute. REST service is invoked through a library packaged with FMW 12c: Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Performance Study – REST vs SOAP for Mobile Applications by Steven Davelaar

 

clip_image002Introduction

To build functional and performant mobile apps, the back-end data services need to be optimized for mobile consumption. RESTful web services using JSON as payload format are widely considered as the best architectural choice for integration between mobile apps and back-end systems. Nevertheless, we have seen many customers of Oracle’s Mobile Application Framework (MAF) consuming SOAP web services in their mobile apps. One reason this is happening might be the nice declarative support in MAF/JDeveloper where you can easily create a SOAP-based data control through a wizard and build your pages using drag and drop. However, this wizard is only intended for really simple SOAP services. It cannot handle all XSD types, nor can it handle more complex, nested payloads. One way to work around these limitations is to process the SOAP payload programmatically in Java, but this is not a trivial task to do. While most of the issues around consuming more complex web services can ultimately be solved, this article explains why you should really abandon SOAP and go for REST-JSON services for one simple reason: performance. The differences in performance are staggering and get worse as the mobile device gets older.

Main Article

This articles discusses the results of a test conducted by Oracle’s A-Team to compare the performance of REST-JSON, REST-XML and SOAP service calls in MAF. We will first discuss the test set-up, then discuss the test results and we will end with a discussion of the options you have if you are currently consuming SOAP web services in your MAF application.

Test Set-Up

We have created an ADF Business Components (ADF BC) application that uses the HR schema to return a list of departments, including a nested list of employees for each department. So, the payload returned consists of 27 departments with 107 nested employee records.Each department row has 4 attributes, each employee row has 11 attributes.
In JSON format this payload is 26.2 KB, in XML format the payload is 77.3 KB in size (whitespace and carriage returns have been removed). Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

REST-enable existing SOAP services with Oracle SOA Suite 12c – free online training

 

REST-Enabling SOA with Oracle Service Bus 12c clip_image001clip_image002

clip_image004In this tutorial, you REST-enable a service by using an application that validates credit cards. The application validates the requested authorization amount for the credit card number, and it returns the response in XML or JavaScript Object Notation (JSON) format, the common data formats for mobile devices.

REST-Enabling SOA with Oracle SOA Suite 12c clip_image001[1]clip_image002[1]

In this tutorial you integrate REST operations as service-binding components and reference-binding components in SOA composite applications. You REST-enable a service by using Oracle SOA Suite 12c and an application that validates credit cards. The application validates the requested authorization amount for the credit card number, and it returns the response in XML or JavaScript Object Notation (JSON) format, the common data formats for mobile devices.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Mobile Suite Service Bus REST and ADF BC SOAP by Andrejus Baranovskis

clip_image002One of the key parts of Oracle Mobile Suite 12c offering is Service Bus product. This is logical choice – Service Bus allows to transform complex SOAP Web Service data into simplified REST format, preferred by mobile client. I think it is essential to use Service Bus, when implementing enterprise mobile applications. It makes sense to learn how Oracle Service Bus works. I would recommend to start from Steven Davelaar excellent tutorial article, available here – Creating a Mobile-Optimized REST API Using Oracle Service Bus – Part 2.
I have created my own ADF BC application with SOAP WS – findEmployees method (filters by first and last name). Here you can download both applications – MobileServiceBusApp_v1.zip. Keep in mind, for some reason Service Bus server doesn’t start with JDEV 12c BPM Default Domain, it works only with JDEV 12c SOA Default Domain. Make sure to check, which JDEV you are using, you can check the list features installed: ADF BC SOAP service is implemented to support Master-Detail (Employee – Department Managed by Employee) structure: Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

OSB12c: Errorhandling in REST by Martien van den Akker

 

clip_image002Yesterday, I had an OSB consulting day at a customer. We looked into a REST service that was to be extended with update functionality. Since calling an update service of an EIS (Enterprise Information System) can go wrong with all sorts of errors, it is important to be able to return a fault-message with the errors, jason format.
Now in OSB12c it’s very apparent how you define possible fault-messages and even how the should be formatted in JSON:

In this sample case we created a more or less simple xsd for faults (dutch: fouten). To test with different fault messages we simply duplicated the ‘fouten’ element in the xsd to ‘fouten2’. You can assign different HTTP-status codes to the different fault.
So this is configuration is pretty simple and straight forward. But it is not quite clear in the documents how you would return a specific fault within your error-handlers in the pipeline.
Internally OSB works not only ‘XML’-based but actually SOAP-based. So the trick in the end is to replace the body with a soap-fault message and the selection of the REST/JSON errormessage is done based on the structure of the document in the details-section of the SOAP-Fault. In the screen above, you would define for each fault message an xsd-element and apparently it validates the soap-fault-details content against each XSD defined, and the xsd against which the detail-content is valid points to the returned fault, with the corresponding HTTP Status.

Read the complete article here

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Creating a Mobile-Optimized REST API Using Oracle Service Bus by Steven Davelaar

clip_image002

Fusion Middleware A-Team architect Steven Davelaar kicks off a new series that shows you how to use Oracle Service Bus (OSB) 12c to transform SOAP-based enterprise system interfaces into a mobile-optimized REST-JSON API.  Read part 1 and Read part 2

Introduction

To build functional and performant mobile apps, the back-end data services need to be optimized for mobile consumption. RESTful web services using JSON as payload format are widely considered as the best architectural choice for integration between mobile apps and back-end systems. At the same time, most existing enterprise back-end systems provide a SOAP-based web service application programming interface (API) or proprietary file-based interfaces. In this article series we will discuss how Oracle Service Bus (OSB) 12c can be used to transform these enterprise system interfaces into a mobile-optimized REST-JSON API. This architecture layer is sometimes referred to as Mobile Oriented Architecture (MOA) or Mobile Service Oriented Architecture (MOSOA). A-Team has been working on a number of projects with OSB 12c to build this architecture layer. We will explain step-by-step how to build this layer, and we will  share tips, lessons learned and best practices we discovered along the way. In this first part we will discuss how to design the REST API.

Main Article

Design Considerations

Let’s start with the first challenge: how do you design an API that is truly optimized for mobile apps? A common pitfall is to start with the back-end web services, and take that back-end payload as a starting point. While that may limit the complexity of transformations you have to do in OSB 12c (you could even use the automated “Publish-As-REST” function on a SOAP business service) it leads to an API which is everything but optimized for mobile. This brings us to our first recommendation:

The REST API design should be driven by the mobile developer.

He (or she) is the only one who can combine all the requirements, information and knowledge required for a good design:

  • he designs and builds the various screens, knows the supported form factors and knows exactly which data should be retrieved for which screen.
  • he knows the requirements for working in offline mode, and knows how this can be supported and implemented using his mobile development tool set.
  • he is responsible for data caching strategies to optimize performance in both online and offline scenarios
  • he decides which read and write actions can be performed in a background thread not impacting the user-perceived performance.

To illustrate how the above aspects impact the design of the API, we will introduce the sample “human resources” app that we will use throughout this article series. Lets start with the three screen mockups our API should support: Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

REST Enabling Oracle Fusion Sales Cloud using Java By Angelo Santagata

Oracle Fusion Sales Could (Rel7) currently has a WebServices/SOAP interface however many clients & partners are interested in accessing Oracle Fusion Sales Cloud using REST & JSON. The main difference between a SOAP service and a REST service is the “way” you get access to the data and methods you use. Whilst SOAP is very powerful, very complete and also can be quite complex perhaps over-complex. REST in comparison is rather simple and uses the http verbs (GET,POST,PUT etc) to define the operation and can be as powerful as you desire.
There are many documents on the web which discuss REST vs SOAP but in summary :

SOAP

Originally defined as Simple Object Access Protocol. A protocol specification for exchanging structured information in the implementation of Web Services in computer networks.
An envelope, which defines what is in the message and how to process it A set of encoding rules for expressing instances of application-defined datatypes And a convention for representing procedure calls and responses.
Relies on eXtensible Markup Language (XML) as its message format, and usually relies on other Application Layer protocols (most notably Remote Procedure Call (RPC) and HTTP) for message negotiation and transmission. This XML based protocol consists of three parts:

REST

RESTful web service (also called a RESTful web API) is a simple web service implemented using HTTP and the principles of REST. Such a web service can be thought about as a collection of resources. The definition of such a web service can be thought of as comprising three aspects:
The base URI for the web service, such as http://example.com/resources/
The MIME type of the data supported by the web service. This is often JSON, XML or YAML but can be any other valid MIME type.
The set of operations supported by the web service using HTTP methods (e.g., POST, GET, PUT or DELETE).

References : · http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services & · http://en.wikipedia.org/wiki/SOAP
Why would you want to use REST instead of SOAP?
There are many reasons why one would/could want to use REST instead of SOAP, one reasons is that SOAP is considered too heavy-weight for mobile applications, where payload size is critical, and also instead of XML, JSON is the preferred message format.
The JSON message format is also very appropriate when interfacing with systems that use JavaScript (such as browsers or node.js) and hence adds weight to the desire to use REST instead of SOAP for accessing Oracle Fusion Sales Cloud.
So getting to the matter at hand and getting RESTful
So enough of why REST , how does one do it for Oracle Sales Cloud (aka CRM). Thankfully this is rather straightforward, at Oracle OpenWorld 2013 you would have seen Thomas Kurian demonstrate our new Oracle SOA Suite and how it can transform a SOAP service into a REST service whilst this is excellent and incredibly productive some clients dont want to install SOA Suite soley for this purpose. Thankfully its possible to do the same using pure Java and deploy it to a cloud infrastructure, like the newly release Oracle Java Cloud Service. It is however worth noting that using SOA Suite is preferable because it accelerates the deployment tremendously and would ultimately be more "agile".
So what are the basic steps to REST enable a Fusion Sales Cloud Service?

  1. Download and install the Jersey REST libraries, we’ll use these for the creation of the RESTful service
  2. Generate the SOAP Client Side Proxie(s) for Oracle Sales Cloud. In this example we’re using static proxies however for a more industrialized approach Id recommend going down the dynamic proxy route, more flexible and less likely to break at runtime, however at a development cost.
  3. Create "wrapper" JAXB Objects so that you can return XML data. This is needed because the baseline SOAP clients dont have @RootElement (s) defined.
  4. Create the RESTful project and expose the services you require.
  5. Deploy to your runtime Java contain, like the Oracle Java Cloud Service
  6. Consume by your favourite client, like a mobile phone etc

For the purpose of the tutorial (in the document), I’ve documented step by step how you can build the above, query Oracle Fusion Sales Cloud, manage security (for development & production) and how to deploy the code to the Oracle Java Cloud. Obviously take note that this document is more of a tutorial than anything else when building your own custom REST Adaptor you would tailor it specifically to what services your client (mobile phone, javascript widget etc) requires.
Happy reading Material: Document & Template Files & Complete Solution (needs Jersey files downloadable separately)
Note : This document and source code is sample code and assumes no support from Oracle Corporation or myself. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Java Cloud Service Integration to REST Service By Jani Rautiainen

Service (JCS) provides a platform to develop and deploy business applications in the cloud. In Fusion Applications Cloud deployments customers do not have the option to deploy custom applications developed with JDeveloper to ensure the integrity and supportability of the hosted application service. Instead the custom applications can be deployed to the JCS and integrated to the Fusion Application Cloud instance.

This series of articles will go through the features of JCS, provide end-to-end examples on how to develop and deploy applications on JCS and how to integrate them with the Fusion Applications instance.
In this article a custom application integrating with REST service will be implemented. We will use REST services provided by Taleo as an example; however the same approach will work with any REST service. In this example the data from the REST service is used to populate a dynamic table.
Pre-requisites
Access to Cloud instance

In order to deploy the application access to a JCS instance is needed, a free trial JCS instance can be obtained from Oracle Cloud site. To register you will need a credit card even if the credit card will not be charged. To register simply click "Try it" and choose the "Java" option. The confirmation email will contain the connection details. See this video for example of the registration.
Once the request is processed you will be assigned 2 service instances; Java and Database. Applications deployed to the JCS must use Oracle Database Cloud Service as their underlying database. So when JCS instance is created a database instance is associated with it using a JDBC data source.
The cloud services can be monitored and managed through the web UI. For details refer to Getting Started with Oracle Cloud.

JDeveloper

JDeveloper contains Cloud specific features related to e.g. connection and deployment. To use these features download the JDeveloper from JDeveloper download site by clicking the "Download JDeveloper 11.1.1.7.1 for ADF deployment on Oracle Cloud" link, this version of JDeveloper will have the JCS integration features that will be used in this article. For versions that do not include the Cloud integration features the Oracle Java Cloud Service SDK or the JCS Java Console can be used for deployment.
For details on installing and configuring the JDeveloper refer to the installation guide
For details on SDK refer to Using the Command-Line Interface to Monitor Oracle Java Cloud Service and Using the Command-Line Interface to Manage Oracle Java Cloud Service.
Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki