Browse Category by Oracle Mobile Platform

First Mobile Cloud Service project in Spain is now in prodution!

This is an important week in the mobile scene where Mobile World Congress is taking place in Barcelona, I think there is no better time to announce that the first Oracle Mobile Cloud Service in Spain is now in production. If you don’t know what Mobile Cloud Service is, you can check all my previous posts here. Posts about Mobile Cloud Service.

In avanttic we developed this project combining Oracle Mobile Application Framework with Oracle Mobile Cloud Service, which has allowed us to implement a mobility solution for the sales force of Industrial Farmacéutica Cantabra (IFC) in no time. The application will allow IFC to gain efficiency in their sales process and increase the turnover.

About the technology:


Oracle Mobile Application Framework is a hybrid mobile framework that enables developers to rapidly develop multi-platform single-source applications Oracle MAF provides a visual and declarative development experience and maximizes code reuse resulting in faster development of mobile applications.”


Oracle Mobile Cloud Service is Oracle’s Mobile Backend as a Service (MBaaS) and enables companies to create and deploy scalable, robust, and secure mobile applications quickly and easily, and empowers developers to leverage enterprise IT systems—without having to get IT involved”








Oracle Mobile Cloud Service New version has been released

New Oracle Mobile Cloud Service version has been released where we can find, a redisign of the application and some improvements that we were missing the the previous version (1.0). This new version 1.1 matches 16.1.1

if you want to know more about Oracle Mobile Cloud Service you can check my previous post: Oracle Mobile Cloud Service overview

The first changes that we can see is the design of the application. In the new version the menu is on the left hand side and you can collapse it. You can also change between environments with the combo box in the header of the application.

Another change we find is in Mobile Backend authentication. In the previous version we were able to use HTTP Basic, but in the new version we can configure our Mobile Backend to use OAuth authentication.

Oracle said that more connectors will come in future releases. Until now we were able to integrate REST and SOAP web services, now we can integrate our Integration Cloud Service instance thanks to the new connector.

Analytics is other feature that has changed, nwo we can create custom reports so we can avoid to select the filters every time we want to see them.

Other new features that were introduced are:

  • We can now integrate out .NET and JavaScript applications thanks to the new SDKs.
  • We can configure some static values when deploying between environments in our Mobile Cloud Service instance by editing a properties file.
  • We can also export and import any artifact we create so the migration between instances is easier.
If you want to know more about the new version you can check: What’s new in Oracle Mobile Cloud Service

MCS: Calling SOAP connector bypassing XML/JSON translator

In the MCS project we are working we have to create some SOAP Connectors to integrate with Siebel. A great thing of MCS is that although we are going to consume a SOAP web service, the XML payload is automatically translated into JSON. You can get more info in MCS Documentation.

I would like to thank Oracle Mobile PM  team, specially Grant Ronald and Frédéric Desbiens for their great help and for sharing best practices about this issue.

As soon as we create a SOAP Connector and try to test it we can see that the body we have to provide is a JSON.

But there are some cases where the translator is not perfect. We had a problem with some services that had an XML structure like this:

The translator seems not to add the  namespaces in the header therefore Siebel cannot parse the request.

The solution is to send a XML instead of a JSON, bypassing the translator.
We can test this in SOAP Connector tester. As we need the required XML, we can get it in any web service client tool like for example SoapUI.

We also have to set “Content-Type: application/xml;charset:UTF-8” and “Accept: application/xml” as header parameters.

If we test the Connector we can see that the web service call is working.

How do we implement the Custom API to send a XML payload to the connector?
The answer is to set the XML we want to send as the body of the request and set the header parameters we previously use to test the connector.

But, is this the recommended approach? Yes it is, but instead of sending a String with the SOAP message it is more secure to send it as a JavaScript object.

In order to implement this we have to follow some steps:

  1. Download and Install Node.js. link
  2. Install xml2js module.
  3. In this example test_rrs is the directory where the package.json file resides.

  4. Add xml2js as a dependency in package.json
  5. Moving to our javascript file, as I already stated before the first idea was to build the SOAP message as a string. This first image is the base implementation and we are going to make some changes to it.
  6. First we need to add var xml2js = require(‘xml2js’); at the top of our implementation.

    This is the tricky part, we need to create a JSON like this.
    ‘ $ ‘ means that we want to add attributes to the XML element.
    ‘ _ ‘ means that we want to have something inside that element.

    The last thing we have to do is to create a xml2js.Builder object and execute buildObject method using the json object we have just create. The result of this method is the body we are going to send.
After the implementation is done we just have to put everything inside the zip file and upload it to MCS.
If you want to know more about xml2js click here.

Oracle Mobile Cloud Service 3 Days Workshop in Madrid

Last week I had the chance to attend a Mobile Cloud Service 3 days workshop in Madrid. This was the first MCS training in Spain where some partners and I were able to get a good insight about what MCS offers and also a complete hands-on.

If you want to know MCS functionality you can check my previous post: Oracle Mobile Cloud Service overview.

Although I already attended Oracle Summer Camps workshop in Lisbon, we are in the middle of a MCS development and  this workshop was a perfect fit for mastering my MCS skills and also any question we made was perfectly answer by Mireille Duroussaud (Senior Principal Product Manager).

We were also able to see some of the features that will bring the next versions of Mobile Cloud Service like Mobile Application Accelerator (Oracle MAX), and hear of others like for example a JavaScript editor for implementing and debugging APIs right in the browser.
I was really impressed about Oracle MAX becasue building a Mobile Application connected to Mobile Cloud Service was just a matter of 10 minutes. Although the things you can do with Oracle MAX are limitted, it is likely possible that we will be able to donwload the source code of the generated application to extend it wich is a nice feature.
I think this is a must-attend workshop it you are planning to start a Mobile Cloud Service project anytime soon. You can also check Oracle Mobile Platform Youtube channel where you can find more than 50 videos about MCS.

MCS: Custom API that calls a SOAP Web Service

In one of the other posts about MCS i showed how easy we can create an API that makes a call to an external REST web service. MCS Connectors also allows to connect to a SOAP web service. Although there is a couple of different things I am going to start the process from the beginning.

  • Creating the connector

We have to head to Connectors page, click on New Connector button and pick SOAP sub menu.
In the popup we need to fill some information including the SOAP web service URL.
We are going to use a public weather service:
http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL 

Our connector has been created. Now we can configure settings like connection timeout or add security policies.

In this example we are not going to add any extra setting so we can continue to the last step, Test.
As you can see although this is a SOAP web service, the tester let us introduce a JSON payload.
This is one of the great things of MCS, the SOAP Connector uses a JSON translator and transforms automatically the JSON that we are going to use to the xml that the SOAP web service needs.

Now if we set a zip code into the JSON and click on Test Endpoint we can see that the web service returns us the weather of that zip code.

  • Create and Implement a Coustom API.

Now that the connector is up and running we need to create a Custom API that will make the call to the connector.
We have to navigate to APIs page and click on New API.

In the popup we have to fill the name of the API and a short description or upload a RAML file.

Now there is a setting we have to change in order to avoid authentication and having to create users. Head to Security option and be sure to select On  in Allow Anonymous User Access.

We need to create an Endpoint we click on New Resource and add {zipcode}. This is the parameter that our API will need to send it to the connector call.

After that, clicking on methods (in the right hand side) we will add a GET method.

Now that we have designed the API, we need to implement it by downloading the JavaScript Scaffold.

In the zip file there are 4 files.

package.json is the file where we can set the dependencies of our API, in this case we have to add our connector’s URI.

In myweatherapi.js file we have to make the implementation.
There is a couple of things that differs from the REST connector call.
  1. In the URI of the connector we also have to add the name of the method that we are going to call, in this case GetCityForecastByZIP.
  2. We need to build the JSON that we will send to the connector.
To achieve the second point we can use the example payload from the connector tester and put zipcode parameter.
After building the JSON we have to make a post call to the connector.

Once we have finished the implementation we have to pack the files in the same zip filethat we have downloaded and upload it to MCS.
The last step is to test out API. Just type a zip code, select the MBE and version and click on Test Endpoint. You will see that the API works and returns us the weather forecast.