Wednesday, February 1, 2012

The birth of a WebCenter based Intranet - 1

In this series of posts we follow an imaginary company, lets call it 'Bunny Inc.' on their WebCenter based Intranet implementation
The posts describe the steps they need to take, the functionality they will implement and the challenges they meet during the project.

Since they have a number of Intranet renewal failures, they do not want a huge project which will take 6 months or more to deliver something just to see it does not meet their requirements.
In stead, they want a basic Intranet in little time and extend the Intranet over time.

When we were called to assist Bunny Inc. in this process, we did an intake.
During the intake process, we made an inventory of requirements they have for the Intranet. Not just for the first release, but also for the long(er) term Intranet.
At first Bunny Inc. was reluctant to cooperate as they were afraid we wanted to make the implementation a huge project. Fortunately we were able to convince them the long term vision was necessary to make sure we make the correct decisions during the implementation of the first phase that would not bite us in a next phase which would mean we would have to do rework.

We refer to this as Think Big, Start Small.

During the intake, Bunny Inc. provided us with the following required functionality:
  • Informing employees about (new) developments within the organization
  • Publishing events (calendar)
  • Yellow pages (employee information like name, email address, phone number etc)
    Information should be modifiable by the employee
  • Enable employees to get more involved in the content on the Intranet
  • Being able to share experiences and knowledge
  • Provide personal information such as:
    • Company car information
    • Health insurance information
    • Reviews / evaluations
    • Presence reports
    • Etc
Read how we went along in the next episode.

Tuesday, January 31, 2012

Content Presenter does not return any documents for a query

If you add a Content Presenter taskflow to your WebvCenter (Spaces) application and want to shown content as a result of a query, it might happen that the query does not return any documents.
Normal procedure would be:
  1. Go to edit mode in the page (CTRL-SHIFT-E)

  2. Click Add Content
  3. From the folder Content Management, select Content Presenter

  4. Close the repository
  5. Click the first edit icon
  6. Click the button Select Content
  7. As Content Source, select Results of a Query
  8. Enter the query criteria and click Preview Results to see... a preview of the results.
Even though you're sure that the selection criteria should at least match one or more content items, the preview remains empty.
No errors show up in either the WebCenter log file or the Content Server log file.

The problem is most likely in the configuration of the Content Server.
If you check the config.cfg from the content server, you probably are missing to directives:
  • SearchIndexerEngineName
  • IndexerDatabaseProviderName
These tell the content server to use the Oracle Text Search features. Without these, the query will not result in any hits.

Change the $DOMAIN_HOME/ucm/cs/config/config.cfg file and add the two following lines:

SearchIndexerEngineName=OracleTextSearch
IndexerDatabaseProviderName=SystemDatabase

Save the file and restart both the content server managed server and the WebCenter managed server.

If you retry the Preview results, you should get results.




Sunday, January 29, 2012

Deploying a WebCenter application - Simple

When you have developed your WebCenter application and want to deploy it to a standalone Weblogic server, you can do it in several ways.
First (in an ideal world) you would deploy it to a development environment.
Often, developers have (unlimited) access to the development environment.
A quick way to deploy your WebCenter application is from JDeveloper.
To use this method, you need access to the admin server. This is the reason why you probably cannot deploy this way to test or production environments.

How do we deploy from JDeveloper:


  1. When you're ready for testing the application on a development environment, open the Application menu and select deploy, then your application



  2. Select Deploy to Application Server as we want to deploy it directly and click Next.

  3. If you already created a connection to your admin server, select it and click Next. Then proceed to step 9
    Otherwise, click the + image at the top right hand corner

  4. Enter a name for the connection, e.g. development-server and click Next

  5. Enter the admin username / password for the admin server and click Next

  6. Enter the connection details for the domain, and click Next

  7. Test the connection (you never know) and click Finish

  8. Select the connection and click Next


  9. Select Deploy to selected instances in the domain, select a server (preferably a custom server, otherwise a server with the WebCenter libraries targetted) A safe choice is the WC_Spaces server.
  10. Click Finish



  11. After some time, a Deployment Configuration wizard will popup.
    On the MDS tab, you can select the Metadata Store and the partition within the MDS


  12. On the connections tab you can modify the connection details.
    For different environments, you might have different servers providing different services.
    If you would like to change connections, select the connection and click the pencil icon


  13. Change the connection details and click OK

  14. Finally, click Deploy to deploy your application.


  15. Run the application by going to the URL in the browser:
    http://localhost:8888/reference-Portal-context-root


  16. For deployments using other methods, keep an eye on the blog.

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.

Case
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.

Solution
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.

Analysis
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.



Solution
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 http://goo.gl/t9wV1
At http://goo.gl/P3DXD 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.

Situation:

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 11.1.1.3
UCM 10.1.3.5.1

Analysis:

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 john.doe@portal.com.
userstorage  Thread-1  Created user object for user john.doe@portal.com
userstorage  Thread-1  Expired=false isNewUser=true for john.doe@portal.com
userstorage  Thread-1  Loaded record from database for john.doe@portal.com
userstorage  Thread-1  Retrieving attributes (type=EXTERNAL) for john.doe@portal.com
userstorage  Thread-1  Provider PortalLDAPProvider matches dUserSourceOrgPath
userstorage  Thread-1  Checking Default UserProvider PortalLDAPProvider
userstorage  Thread-1  LdapProvider.checkCredentials() started
userstorage  Thread-1  user: john.doe@portal.com
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.

Solution:
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.