Wednesday, August 31, 2011

How to call a Web Service Data Control with pre-populated search criteria

I'ld like to present you with the following challenge:

We have an interface between our ADF application to a back-end application (Siebel) via Middleware, based of Web Services.
Given the datamodel of Siebel, you can image the complexity of the Web Service.

When the Web Service is called, some input values must be supplied.
These values should not be entered by the end-user, but should be 'hidden' from the user and defined by the application (e.g. Calling Application) or defined by navigation (e.g. contact ID, customer ID etc)

All the instructions and posts we have found on integrating Web Services via Data Controls  basically describe the following:
 - Create a Data Control based on the Web Service
 - Create a JSF page
 - Drag one (or more) of the input parameters to the page (all that you need)
 - Drag the WebServiceMethodCall(Object) to the page as an ADF page 
 - Drag one (or more) of the response fields to the page

To illustrate the WebServiceMethodCall see this image:

When you run the page, the web service is called (without parameters) and the result is displayed on the page.
On the page, you can enter some search criteria, and press the button
Then the web service is called and the page displays the result.

Now the challenge is:
How do we pre-populate the search criteria, bases on some application scope value (application name) and some session scope value (contact id) and make sure that the first call to the web service is done with these values.

Any idea's are more then welcome.

Answer will be posted as soon as we have it...
The question is also posted on the OTN ADF / JDeveloper forum

Wednesday, August 24, 2011

local part cannot be "null" when creating a QName using Soap UI Mock Service

This week we fixed a major issue in our project.

We're building a support portal in Web Center for an international customer. The portal interfaces to a number of back office systems, like Siebel, eBusiness Suite etc.
These interfaces are serviced by IBM Web Sphere and the logic in the service bus has (of course) to be developed.
The development starts with the WSDL of the web service we need to call. Once this WSDL is defined, we can start building.
However, we need an actual web service to test our implementation.

We used Soap UI in the past to test web services. Amazingly Soap UI has a feature to create a mock service. Basically a stub web service, based upon a WSDL.
In this mock service, you can define the response that is sent back upon a request, so you can test your application with 'live' data.
With this mock service, we created a data control based on the web service in JDeveloper and added this to a page (pretty straight forward, see a number of blog posts regarding this topic)
However, when we run the page we get an error: local part cannot be "null" when creating a QName

What is going on???
We read a lot of posts, forum entries and even raised a Service Request at Oracle Support. No answer however in more then a week.
Since all generated code is xml, we can't debug properly to see what went wrong.

The WSDL and associated includes a lot of complex types. Is this causing the issue?
Will this work with a web service without complex input or output parameters?Also, we see six calls to the mock service in Soap UI (in the log section). Is this caused by some sort of retry mechanism?

To investigate, we built two separate web services, one with complex output and one without complex output.  When we created mock services in Soap UI, both resulted in the same error. Is there something wrong with the 'data control based on a web service' in ADF?
To test, we deployed the web services to an actual WebLogic Server.
When we call this web service from the application, we don't get an error!
So the mechanism works, but what goes wrong?

There is a potential issue in the headers. The mock service gzips the response. Also, the content type header value is set to test/xml, which 'should' be application/xml
Can it be ADF handles this incorrect (or not at all)??
With Soap UI we call the deployed web service to view the differences. Besides the fact that there are more header variables, the ones that also exist in the mock service header, have the same values.
Can it then be in the response itself???
The XML in the response seems the same. Only differences are namespaces and how the namespaces are defined, but that should not be a problem.
The response from the mock service also contains some comments to indicate which fields are optional and which sections can be repeated. But comments in XML is legal so this too should not be a problem...

But it is :(
We copied the response from the deplloyed web service to the mock service (the mock service response can be edited to return the data you want) and with the response copied from the deployed service, the call worked in ADF!
It took another 10 minutes to identify the comments to be the cause.

We're still not sure what goes wrong in the ADF application, but apparently one of the layers cannot handle comments in the response.
Edit the response to not include any comments. This will run the application smoothly.
Total Time Spent: Over a week.
Time Spent Next Time: None (thanks to this post ;)

Wednesday, April 20, 2011

WebCenter Suite Bootcamp in Denmark

In the first week of may I will teach a WebCenter Suite Bootcamp in Ballerup, Denmark.
I'm really looking forward to it, hoping to meet a lot of people , helping them getting started with this product suite and hopefully keep in contact with them as they 'practice what I preach'

In short, the program will cover these main topics:

  • WebCenter Spaces 
  • WebCenter Framework Introduction 
  • Application Development Framework (ADF) 
  • WebCenter Composer 
  • WebCenter Page Service 
  • WebCenter Look and Feel 
  • Portlets 
  • WebCenter Content Integration 
  • WebCenter Services 
  • WebCenter Security 
  • WebCenter Installation & Deployment 
and of course will be a combination of lecture and hands-on practices

For a complete list of features covered visit
At you can see a shortlist of the bootcamp and data when it will be running.

If enough people are interested, we can host a bootcamp in The Netherlands as well...

Wednesday, March 9, 2011

User cannot find / view any content in UCM from custom WebCenter application

At a customer, we deployed a custom Portal application which is used for an Intranet and Extranet
One user does not see any content in the Portal.


Users are registered in an Oracle Virtual Directory (OVD) for authentication.
Users are registered in an Oracle Internet Directory (OID) for authorization.
Groups are registered in the same OID.
The custom Portal application and UCM point to the OID for user store and group membership
WebCenter Framework


For viewing content, two groups are defined in OID, one for employees (for the Intranet) and one for customers (for the Extranet)
Analysis showed that the user cannot see any content in UCM as well.
The profile of the user does not show that the user is member of the group Employees, to which he is added in OID.
The UCM server log and server output did not show anything which could lead to the cause of the issue.

To be better abled to view what is logged, I added th line UseRedirectedOutput=true to the UCM config.cfg (located in \server\config).
I also check which Active Sections were defined in the System Audit Information page of UCM (Administration | System Audit Information)
Only the sections system, idocscript, requestaudit, resourceloader were active (which is pretty standard I think)
Since we had some problems regarding a specific user account, I added userprofile and userstorage, selected save and restarted UCM to make the changes effective.

Thanks to the UseRedirectedOutput, a IdcServerNT.log was created in the \server\bin folder. After logging in as the defective user, we saw the following:

userstorage  Thread-1  Start user storage query for user
userstorage  Thread-1  Created user object for user
userstorage  Thread-1  Expired=false isNewUser=true for
userstorage  Thread-1  Loaded record from database for
userstorage  Thread-1  Retrieving attributes (type=EXTERNAL) for
userstorage  Thread-1  Provider PortalLDAPProvider matches dUserSourceOrgPath
userstorage  Thread-1  Checking Default UserProvider PortalLDAPProvider
userstorage  Thread-1  LdapProvider.checkCredentials() started
userstorage  Thread-1  user:
userstorage  Thread-1  authenticateUser: false
userstorage  Thread-1  User is new to this provider.
userstorage  Thread-1  DN cn=john.doe.,cn=Users,dc=PORTAL,dc=COM found in local data.
userstorage  Thread-1  Unable to load extended info for cn=john.doe.,cn=Users,dc=PORTAL,dc=COM. Reason: !csLdapUnableToBindToObject

We noticed a couple of things.
First of all, the DN of the user contains a period after his name. This is not the way the user is registered in OVD or OID. Therefore, the line stating that th extended info cannot be loaded is correct.
Second, UCM states it loaded a record from the database and uses dUserSourceOrgPath in some way.

A query on the USERS table in the OCSERVER schema learned that the dUserSourceOrgPath contained the DN with the additional period, which is used by the LDAP Provider.
An update of this column fixed the issue.

But how was the situation created?
Apparently the creation of the user in OID was incorrect once (including the period) but the entry in OID was deleted and recreated correctly.
But in between these changes, the user had logged onto the system, creating the record in the USERS table, with the incorrect dUserSourceOrgPath :(
So if you change the DN of a user (or any other replicated attributes like full name or email address) be aware of the fact that UCM holds that data in a local table.

Friday, January 28, 2011

WHICH statement for Windows

Ok... I know... Not really an ADF post...
But yesterday I got the question 'Which sqlplus is executed?'
The answer was: e:\app\ses\bin\sqlplus.exe
The return question was 'Are you sure it is??'
Lucky for me, I'm positive that there is only one copy of sqlplus.exe on the machine, as SES (Oracle Secure Enterprise Search) is the only product with an Oracle Client with it...

But what if you're not sure?
With Linux you get a nice little utility called which.
By calling which you get the location of the executable that will be executed if you would run

Windows does not have that utility... yet...
If you create the following batch (or command) file and place it somewhere in your path you do have that utility.

Paste the following code into which(.cmd):
@for %%i in ( %1 ) do @echo. %%~$PATH:i

When you enter which sqlplus.exe you'll see something like:

H:\>which sqlplus.exe

See, I was right... e:\app\ses\bin\sqlplus.exe was executed...
This also works with non-executables:

H:\>which orauts.sym

Drawback: You need to include the extension. So if the file you look for opmnctl and you do not know the extension, you might need to search for opmnctl.exe, opmnctl.cmd and opmnctl.bat

Happy searching!

Sunday, January 23, 2011

Finally: The book review: Web 2.0 Solutions with Oracle WebCenter 11g

First of all, my sincere apologies for letting everyone have to wait so long for the review. I can list the reasons it took so long, but I think it's a better idea to just review the book...

The book is divided in 10 chapters. In these chapters 'only' two major components of WebCenter are described. Fortunately, these happen to be the two most important components, being WebCenter Framework and WebCenter Spaces. With the Oracle WebCenter Framework, developers can build custom applications and add Web 2.0 features to that application. The book guides the developer through the entire process which makes the book a good guide.

The book assumes the latest release of WebCenter as it was written. During the review period, WebCenter 11g PatchSet 3 is released, which made me redo the first 6 chapters. Besiides from some user interface differences and another implementation of the WebCenter Application in JDeveloper, the steps in the book are still very good to follow.

Chapter 1 gives an overview of Web 2.0 concepts and relates them to the enterprise, thereby introducing the term Enterprise 2.0 The chapter also briefly described Oracle WebCenter Suite in retrospect to the previous descriptions of Web 2.0 and Enterprise 2.0

Chapter 2 guides the developer through the installation of WebCenter Suite. This results in an installation which can be used in the remainder of the book and is a nice environment to experiment with the suite.
What I thought was strange is that even though the book mentions to use the SOA Suite and BPA Suite, the necessary schema's for these suites are not selected in the installation steps of the Repository Creation Utility (RCU) Later on in the book, it appears SOA and BPA Suite are not used, which is just fine. It would only make the book lose focus.

Chapter 3 guides the developer through the installation of JDeveloper, the main tool for custom Java development from Oracle.

Chapter 4 helps you to build a simple portlet and integrate the portlet in a custom WebCenter application. You cannot make any mistakes in the process, except when you deliberately deviate from the text and images. Everything is spelled out to such a level, you cannot go wrong. It has similarities with the Oracle Tutorials.

Chapter 5 introduces ADF and design components. The name of the chapter (Design and Personalization) leads to think Personalization is mentioned, but instead, it mentions Database interaction. Perosnilization comes in Chapter 9. Along with the previous chapter, it's a good start to get familiar with JDeveloper and ADF

Chapter 6 explains the different types of portlets (WSRP, JSF, OmnioPortlet, Ensemble etc) and guides you through the creation of your own ADF portlet that displays table data and one that displays a graph. These portlets, of course, a placed on a WebCenter page.

Chapter 7 explains what the Discussions, Wiki and Blog serves are and how to integrate these. Two techniques are described in detail, using an IFrame and using the WebClipping portlet. The final steps (2 or so) of the last technique are missing, but as it's pretty self explanatory, it's no problem.

Chapter 8 describes how to integrate Search capabilities to your pages. Other ways to find content is by means of Tagging, Linking and RSS feeds. All of these are described in this chapter as well. Again, with clear instructions on how to add these services to your page.

Chapter 9 explains Oracle Composer. One of the most comprehensive components in the ADF WebCenter Framework. It enables the end user to customize the application to their own need. This chapter explains how to integrate the Oracle Composer in your application and how to use it at runtime.

Chapter 10 gives a clear overview of WebCenter Spaces. It'll tell you the different type of pages (Personal, Group and Business Role) and how to manage them. The book even explains how to add users and roles and how to enable access to the different page types.

The book is very detailed and therefore good to follow for people with no experience of WebCenter, JDeveloper, ADF etc. For the bit experienced developers, it's a good reference.
I wish I had this book when I started with Oracle WebCenter Suite. It would have been a great time saver...
As mentioned previously, the setup is a bit like Oracle Tutorials as in the great detail and screenshots to support the text.
Drawback of the book is the fact that in a number of chapters a new JDeveloper application is created to hold the functionality of that chapter. If a single (or at least a minimum) of application would have been used, you would end up with an application that holds all the features discussed. However, after reading the book, it's a good exercise to integrate all features into one application.
For the (now) latest release of WebCenter (11g PS3, this is still a very usefull book.