WebCenter Portal - Access to WC Spaces Services over REST running on Oracle VM from your Mobile Application

Dec 19, 2013 5:24:18 AM

By: Andreja Sambolec - Application Consultant

Developing ADF Mobile application – accessing WC services running on VM

If you are using the Oracle SOA Suite/BPM Suite VirtualBox Appliance (Pre-Built Developer VM for Oracle VM VirtualBox) and want to start developing an ADF Mobile application accessing WC Spaces REST services running on this VM, you have to make sure:

  • Your mobile device and local machine have access to the same wireless network
  • NAT is selected as the available network mode on your VM


  • To check Port Forwarding


Now you can access WebCenter Spaces from your mobile device or from your local machine using IP address of your local machine:

In your ADF Mobile application, create a new connection:


If you want use programmatic approach for Spaces REST Service invocation, use the following:

RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();
String theUsername = "weblogic";
String thePassword = "welcome1";
String userPassword = theUsername + ":" + thePassword;
String encoding = new sun.misc.BASE64Encoder().encode(userPassword.getBytes());
restServiceAdapter.addRequestProperty("Authorization", "Basic " + encoding);
restServiceAdapter.addRequestProperty("Accept", "application/json; charset=UTF-8");
restServiceAdapter.addRequestProperty("Content-Type", "application/json; charset=UTF-8");



try {


} catch (Exception e) {



Using ADB tool and command adb logcat, you can see the part of the response as a result of the command System.out.println(restServiceAdapter.send("")):

resourceindex","links":[{"href":"**","template":"{startIndex}&itemsPerPage={itemsPerPage}&utoken=FJnkGqA-W6YrfhjgagLvMj_AJapY_w**","resourceType":"urn:oracle:webcenter:discussions:forums","capabilities":"urn:oracle:webcenter:read"},{"href":"**","resourceType":"urn:oracle:webcenter:preferences:general","capabilities":"urn:oracle:webcenter:read"},{"href":"**","template":"{projection}&q={q}&utoken=FJnkGqA-W6YrfhjgagLvMj_AJapY_w**","resourceType":"urn:oracle:webcenter:spaces:siteresources","capabilities":"urn:oracle:webcenter:read"},{"href":"http://192.168 ...

After the above verification of access to WebCenter Spaces REST Services you can continue with development.

Running into trouble? Want to have a chat with members from TEAM? Contact us here.

Subscribe by Email

No Comments Yet

Let us know what you think