Using AJAX within Oracle Application Express (part 2)

Most of the AJAX calls will require some parameters. Instead of using an application item for every parameter, I wrote some javascript and PL/SQL functions that will store all AJAX parameters as XML in 1 application item!

The same javascript as in my first blog, but some extra parameters and functions are added.

This javascript function allows you to add an extra parameter to the AJAX call

This PL/SQL function allows you to read out the same parameter in the AJAX call’s PL/SQL code

We can simply add some parameters to our AJAX call. The first parameter of the AddParam function, is the name of the parameter (you must use the same name in your AJAX call’s PL/SQL code to read the parameter’s value), the second parameter is the parameter’s value.

In the PL/SQL code of the AJAX call, you can use the GetParameter function to read out these parameters

The result would be…

Data Driven Application using Adobe Flex – Part 3

Today I’m having a closer look at the Data Features provided by Adobe Flex using the Adobe Developer Guide and the forum for more information.

In the Flex Developer Guide, CHAPTER 37 Representing Data, an explanation is given about the different possibilities you have to define a data driven application.

In the first example you can check out how to define a model with some data fields and show these fields in your application. Note ! You need to enclose the inputfields in an mx:form-container to be able to view the fields or set the lay-out different from absolute because this renders the fields inapproprialty as well.

In the next example you can check out the validation-framework in Flex SDK where you can add validation to specific fields. Flex includes a set of validators for common types of user input data, such as ZIP codes, phone numbers, and credit card numbers.

If you have a closer look at the 2nd example you will notice the ZIPCodeValidator is used which is one of the default validators included in Flex. When you run the application a red box is shown when a validation exception occurs. Note : When you have a look at chapter 40 you will notice that the first example on page 1282, the PhoneValidator, doesn’t work properly. You need to add the listener- and trigger-attribute into the PhoneValidator to let the code work.

A view on the validation exception and message box is shown in the following screenshot:

As you can see it’s fairly easy to create a form-based application with validation defined on the input fields. If you want to have more information regarding the functionality that’s behind these validators you can check out the class-files by going to the source-tab of your application and clicking ‘go to definition’ on one of the validators.

If you want to change the error-message you can override the resource-bundle which is used in Adobe and you can even override the style of the message. E.g. if you want the message to appear in your favorite color, or house-style you can provide the following int ‘mx:style’-tag:

{ borderColor: #0000FF}

In the previous examples we’ve used curly braces to bind our data, you can also use the mx:Binding-tag, see page 1253 for an example.

Now that we’ve seen the different functionalities to create data bound applications, let’s have a look at the different Flex Data Management Features.

What if we want to store data and synchronize data in client-server applications or in MVC-applications? The following screen can give us a clearer view on the different features we can use:

As you can see there are 3 different components we can use to store and retrieve managed data, which are HTTPService, WebService and RemoteObject.

And I need to look into an example using RemoteObjects, more on this next time!

I can proudly present to you … The One and Only Oracle Fusion Regional Director for Belgium

I can proudly present to you … the finest … the greatest … the smartest … Oracle Fusion MiddleWare Regional Director for Belgium !

To be honnest I can’t be modest because I’m in seventh heaven wright now ;o)

Secretly – without informing my parents, my firm, my husband … because it’s so important to me – I’ve send a nomination form to Oracle regarding becoming an ‘Oracle Fusion Regional Director’.

After waiting for an enormous long time – 3 weeks, but that feels like ages when you’re awaiting acceptance – I’ve got the big news:

I am pleased to inform you that we have reviewed and accept your nomination for Oracle Fusion Middleware Regional Director.

What I felt when I received this e-mail was … ‘If you’re happy and you know it clap your hands …’ I’m clapping away, clap clap clapperdiclap … in other words an appreciation and acknowledgement of the commitment of the non-Oracle consultants which spend a lot of time promoting the Oracle Products and Services and helping others on OTN, such as myself.

As we would say in Belgium ‘Ik ben in de 7de hemel’ / ‘I’m in seventh heaven’ !!!

Dba: Capturing a time frame from the ALERT.LOG

A thing I did not know about my database….

The alert.log file chronologically records messages and errors about database operations such as startups and shutdowns, internal errors (ora-00600), links to trace files and much more.
This often makes the alert.log-file, the primary file that needs to be consulted in order to identify and solve issues concerning your database.

Unfortunately there’s no default “auto-cleanup” of this file and so the file can grow to an unmanageable size (e.g. impossible to edit using VI) and that makes it hard to search for message within a certain time frame.
By using Enterprise Manager, it is very easy to browse through this alert.log file and to capture/select only those message you’re interested in by filtering on a start and end date.

An example:

STEP 1: Connect to the EM Database Console:

STEP 2: Click the “Alert Log Content” hyperlink (on the Home-tab)

. . .

STEP 3: Fill in search criteria and push “Go”-button

STEP 4: Result

Reset Oracle Single Sign-On password

As of Oracle Portal Release 10.1.4, there’s a standard procedure to allow users to reset their password.

In order to get this thing working, users will have to provide a “Password Reset Hint” and an “Answer to Password Reset Hint” in their profile. This can be achieved through http://infra_host/oiddas/ui/oracle/ldap/das/mypage/ChgPwdMyPage.

When this information is submitted to the LDAP server, users can use http://infra_host/oiddas/ui/oracle/ldap/DASStep1ResetPwd to reset their password.

Oracle Web Service Manager

Another environment we should get familiar with…

The Oracle Web Service Manger will enable you to implement security without modifications to the existing Web Services, it will as a matter of fact create a gateway through which you access existing services.

Every service you register to the gateway will be made available through a new service URL and you can modify the security, logging or content validation of the service by using the Oracle Web Service Manger. You can, for instance, change the way a request is handled by adding additional steps to the request processing.

By default a request “pipeline” (that’s how the different steps in the processing are called) will write log information to the database. This pipeline can be extended without coding by adding different pipeline steps. During the workshop we added steps to extract credentials from the HTTP Request (or SOAP envelope), authenticate to a LDAP Directory and authorize using service roles which are defined in the LDAP Directory.

All of this was configured and tested within 5 minutes!!

I’m looking forward to the production release of Oracle Web Service Manager because sometimes we had to “stop and start all services” to work around some strange behaviour…

SOA Suite

Today, I attended a workshop at Oracle to get a first glimp of the SOA Suite We used the “Developer Preview” of JDeveloper to develop a few simple Web Services. The software is not yet available on Oracle Technet, but it will be…soon….

The installation of Oracle SOA Suite is very simple, run the installer and click “next”, “next”, “next”, … “finish”. By default, it installs an Oracle Lite database to store the metadata together with an Oracle Application Server which provides a number of applications:

  • Oracle Web Services Manager
  • Oracle Business Rules Author
  • Oracle Enterprise Service Bus
  • Oracle BPEL Process Manager Controll
  • Oracle Application Server Controll

One nice thing is that the Oracle Application Server is configured for Single Sign-On and it uses jazn-data.xml. This limits the amount of memory needed for the installation because you don’t need to install Oracle Internet Directory! For those of you who want to simulate the production environment, Oracle Application Server Controll enables you to change the security provider to Oracle Identity Manager, a 3rd Party LDAP Server (with standard support for Active Directory and Sun Directory Server) or use a custom JAAS security class to integrate with other LDAP Servers.

Now lets focus on what we tested tested today.

We used the JDeveloper wizards to generate and deploy a Web Service based on a Java class, and a Web Service based on a PL/SQL Stored Procedure. Nothing exciting because we already saw that working in previous JDeveloper releases.

We used Oracle Application Server Controll (formerly known as Enterprise Manager) to test the generated Web Services. No need to learn the URL’s to the deployed Web Service by heart, just navigate to the “Test Service” link and fill in the HTML form that’s generated by OracleAS. There’s even a possibility to stress test the service by entering the number of simultaneous threads, number of loops and the delay in ms.

The more demanding developers can:

  • configure Web Service Auditing
  • configure port level reliability features to guaranty response delivery and eliminate duplicate requests
  • enable authentication mechanisms like username/password, certificate or SAML authentication
  • sign SOAP messages to ensure integrity
  • encrypt the SOAP message to ensure confidentiality

really nice stuff, and we didn’t use the Oracle Web Services Manager yet!!

Off course, in real life, not all Web Services are deployed to an Oracle Application Server. That’s where Oracle Web Services Manager comes into the picture.

But I’ll come back on that tomorrow….