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

[Blog - TEAM IM ](https://www.teamim.com/blog)

# [WebCenter Portal - Access to WC Spaces Services over REST running on Oracle VM from your Mobile Application](https://www.teamim.com/blog/2013/12/18/webcenter-portal-access-to-wc-spaces-services-over-rest-running-on-oracle-vm-from-your-mobile-application-2)

 Written by [teaminformatics](https://www.teamim.com/blog/author/teaminformatics) | December 18, 2013 at 4:24 PM

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

<https://www.teamim.com/hubfs/Imported_Blog_Media/portal1.jpg>

- To check Port Forwarding

<https://www.teamim.com/hubfs/Imported_Blog_Media/potral2.jpg>

Now you can access WebCenter Spaces from your mobile device or from your local machine using IP address of your local machine: [http://192.168.1.33:8888/rest/api/resourceIndex](http://192.168.1.33:8888/rest/api/resourceIndex)

In your ADF Mobile application, create a new connection:

<https://www.teamim.com/hubfs/Imported_Blog_Media/portal3.jpg>

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

RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();  
 restServiceAdapter.clearRequestProperties();  
 restServiceAdapter.setConnectionName("WCRest");  
 restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);  
 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");

restServiceAdapter.setRetryLimit(0);

restServiceAdapter.setRequestURI("/rest/api/resourceIndex");

try {

System.out.println(restServiceAdapter.send(""));

} catch (Exception e) {

e.printStackTrace();

}

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(""))*:

{"version":"11.1.1.6.0","resourceType":"urn:oracle:webcenter:  
 resourceindex","links":[{"href":"http://192.168.1.33:8888/rest/api/discussions/forums?utoken=FJnkGqA-W6YrfhjgagLvMj_AJapY_w**","template":"http://192.168.1.33:8888/rest/api/discussions/forums?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=FJnkGqA-W6YrfhjgagLvMj_AJapY_w**","resourceType":"urn:oracle:webcenter:discussions:forums","capabilities":"urn:oracle:webcenter:read"},{"href":"http://192.168.1.33:8888/rest/api/preferences/general?utoken=FJnkGqA-W6YrfhjgagLvMj_AJapY_w**","resourceType":"urn:oracle:webcenter:preferences:general","capabilities":"urn:oracle:webcenter:read"},{"href":"http://192.168.1.33:8888/rest/api/spaces/siteresources?utoken=FJnkGqA-W6YrfhjgagLvMj_AJapY_w**","template":"http://192.168.1.33:8888/rest/api/spaces/siteresources?projection={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.](https://www.teaminformatics.com/contact/)

[View full post](https://www.teamim.com/blog/2013/12/18/webcenter-portal-access-to-wc-spaces-services-over-rest-running-on-oracle-vm-from-your-mobile-application-2)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "teaminformatics"
  },
  "dateModified" : "2018-08-16T15:35:32.423Z",
  "datePublished" : "2013-12-18T16:24:18Z",
  "headline" : "WebCenter Portal - Access to WC Spaces Services over REST running on Oracle VM from your Mobile Application",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://www.teamim.com/blog/2013/12/18/webcenter-portal-access-to-wc-spaces-services-over-rest-running-on-oracle-vm-from-your-mobile-application-2",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Blog"
  }
}
```