Monday Dec 09, 2013

Make the Oracle Service Bus IDE feel at home on Linux

I played a lot with Oracle Service Bus (OSB) in the last few weeks. You will soon know why; no, I can't say right now. I installed it inside an Oracle Enterprise Linux virtual machine, and I must say the installation process is straightforward: install OEPE, install WebLogic, run RCU, run the installer, create a domain... It was nothing special, until I started the Service Bus IDE (OEPE with the OSB plugins). I got the following error messages:

  • Failed to parse the output of ‘adb version’
  • adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

My VM had all the prerequisites listed in the documentation installed. What was wrong, then? Turns out I had used the 64-bit version of Oracle Linux, and the IDE wanted some 32-bit dependencies. To fix the problem, I issued the following commands as root: 

yum install ncurses-libs.i686 libstdc++.i686 libgcc.i686
yum install zlib.i686 zlib-devel.i686

After that, the IDE started like a charm. Expect a few OSB-related posts from me in the future! 

Friday Apr 19, 2013

ADF Mobile and SDO: getting results

In my previous post, I explained how to make web service calls to SDO view objects exposed through a service-enabled application module. So far, so good. What I didn't explain is how you can access the return value of the service call if there is one. The answer is straightforward... once you figured it out.

 Our starting point, once again, is JDeveloper's Data Control palette.

As you can see,  the name of the return value is result. Consequently, one could be tempted to use GenericTypeBeanSerializationHelper to convert the value. And one would be right. Even better: you don't have to worry about the type name exposed by the data control as with input parameters. Here, I simply retrieve the results of the call in VisitResultBO, which is a simple POJO. 

GenericType genericReturnValue =
    (GenericType)AdfmfJavaUtilities.invokeDataControlMethod("VisitsWS", null, "getVisit", 
                                                            namesList, paramsList, 
                                                            typesList);
Object returnValue =
    GenericTypeBeanSerializationHelper.fromGenericType(VisitResultBO.class, 
                                                       genericReturnValue,
                                                       "visit");

What makes it not obvious is that the fromGenericType method has got two signatures: 

fromGenericType(java.lang.Class beanClass, GenericType gt)
fromGenericType(java.lang.Class beanClass, GenericType gt, java.lang.String attributeName)

For SDO web services, you absolutely need to use the second form and pass "result" as the value for attributeName. I must admit it took me some time to realize this. 

About

Frédéric Desbiens

The musings of a member of the ADF Product Management team.

I focus here on my favorite development framework but also have a strong interest in Mobile Development, Oracle WebCenter and Oracle SOA Suite.

Attentive readers will even find posts about IT Strategy from time to time, an interest of mine since I completed my MBA in 2006.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today