NetBeans 7.0 and JAX-RPC Web Services

Sometimes, you encounter old WSDL service definitions, based on RPC style SOAP instead of the newer Document based litteral encoding.

To discover wether a WSDL is using RPC or literal encoding, check the “style” parameter of the “binding” element, such as

<binding name="A_WebServiceBinding" type="tns:A_WebServiceRPC">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>

In Java, RPC based SOAP is implemented by JAX-RPC, a quite old API developed for Java 1.4.  As it is older than JAXB, it even implements its own XML to Java object mapping.

When SOAP 1.2 was released, the Java platform switched to the newer JAX-WS implementation to support it along with other stuffs, namely HTTP Binding (aka XML over HTTP without SOAP), a new data mapping model and support for WS-I basic profile 1.1

You can read this IBM article for a very good, while concise, description of JAX WS vs JAX RPC.

In NetBeans 7.0, only JAX WS is provided out of the box.  When you encounter older WSDL, based on RPC encoding, you must manually install JAX-RPC.  However this plugin is not provided in the default plugin repository anymore.  You will need to add another plugin repository :

  • Select “Tools” in the menu, then “Plugins”, then the “Settings” tab.
  • Add a Repository with the name you choose and this URL : http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz

  • Then go back to “Available Plugins” and type RPC in the search box, you should find JAX-RPC in the list of proposed plugins.
  • Follow the instructions to download and install the plugins.

Et voilà, you are now ready to create JAX RPC based Java clients by choosing the “File” menu, then “New File” then choose “Web Service Clients” in the “Web Services” section.

Enjoy !

, , , , ,

34 Comments

JDeveloper 11g PS4 is available

JDeveloper team released last week version 11.1.1.5, aka Patch Set 4.

This is a maintenance only release, no new feature has been added in this release. You can download it for free from Oracle Technology network.

Release Notes are available here

As usual, should you try to install it on Mac OS X, don’t forget to symlink classes.jar to rt.jar in your JVM installation, as per instructions on this blog (or from the official documentation)

, , ,

No Comments

NetBeans 7.0 is available

NetBeans 7.0 is available for download.

The major new feature of this release is the support for the upcoming Java SE 7 specification, in particular project Coin (diamond operator, String in switch, multi catch for exceptions …).

Others new / improved features is the support for Maven 3, Git etc … and the support for GlassFish Application Server 3.1, Oracle Weblogic Server and Oracle database (simplified connection wizard, guided installation to JDBC driver, editing and deployment of stored procedures)

Download is free for everyone, release notes are full of details.

Enjoy !

, ,

No Comments

Modern version of a web site

Today, Apple published my third publicly released iPhone application.  I’ve been asked to develop it for a French school of cinema, sound, 3D animation and other arts and technology for video and sounds professionals.

The application allows to discover the different departments of the school, get access to the latest news, to the contact details and look at some video and animation created by students.

As of today content is general purpose and rather static, it is a modern version and mobile version of a web site.  It looks like everybody wants its own iPhone app these days:-)

Future version might include some student-specific content and features such as restricted access to course schedule & content and push notifications towards registered students.

Today’s content is 100% in French, English version might be proposed in the future.

You can discover the application on the App Store.

Enjoy !

, ,

No Comments

Solaris 11 Express on VirtualBox

I just downloaded and installed Solaris Express 11 on VirtualBox on my Mac and I was pleasantly surprised by the integration work done during these last two years.  Everything I tested is working out of the box, including screen resizing, a traditional paint point of Solaris + VirtualBox.

Beside paving the way toward Oracle Solaris 11 and being one of the first Oracle branded release of Solaris, there are many new functions for developers and system administrators.

I was particularly impressed by the extremely simple installation process, that started with OpenSolaris and is now live for all current and future Solaris users.  You can have a preview with this video.

You can also download a prebuilt Virtual Box VM, ready to use.

Give it a try !

, ,

No Comments

Oracle Enterprise Cloud Conference @ Luxembourg

Oracle Enterprise Cloud Summit

Develop Your Strategy and Roadmap for Cloud Computing Strategies

The cost and speed advantages of cloud computing are clear and compelling. But how do you actually move to cloud computing? To discover a practical approach to building your cloud foundation, join us for the Oracle Enterprise Cloud Summit.

During this half-day event, cloud experts will share real-world best practices, reference architectures, detailed customer case studies, and more. You’ll learn how to transform IT into a superior service provider with a strategy and roadmap for building, deploying, and managing an enterprise cloud.

Attend the Oracle Enterprise Cloud Summit to learn how to:

  • Build a state-of-the-art cloud architecture
  • Leverage your existing IT investments
  • Optimize your IT management processes

Whether you are considering a move to cloud computing or have already adopted a cloud.

AGENDA
8:30 Breakfast and Registration
9:00 Welcome
Pierre Henin, Managing Director, Oracle Luxembourg
9:15 Keynote : Your Roadmap to Enterprise Cloud Computing
Martijn Vlek, Senior Director – EMEA Middleware Solution Specialist Team
10:15 Oracle Exalogic Elastic Cloud : Revolutionizing Data Center Consolidation
Dieter Deramoudt, Senior Manager – Sales Consulting
11:00 BREAK
Track 1 Track 2
11:15 Infrastructure as a Service Enterprise Cloud Computing for Enterprises
Martijn de Jong, Product Marketing Manager
Five Essential Capabilities for Cloud Management
Mike Reys, Senior Sales Consultant
12:00 Oracle Exadata: Private Could Database Consolidation
Wim Van Asch, Master Principal Sales Consultant
Integrating your On-Premise Applications with Cloud Applications
Sébastien Stormacq, Principal Sales Consultant
12:45 LUNCH

Register Now !

This event is organized in collaboration with
itnation

, , , , ,

No Comments

Installing Oracle SOA Suite atop XE Database

Although not officially supported, installing Oracle SOA Suite a top of the lightweight XE database is often convenient for development, demo or training purpose.  It avoids going through the complete installation of her big brother : the complete Oracle Database 11g system.

XE is less than 220 Mb download and Installing it on  a Linux system is as simple as

rpm -ivh oracle-xe.rpm

However, there is some caveats, i.e. some system parameters to tweak before installing SOA Suite’s database schemas using Repository Creation Utility (RCU).

In the same spirit as my previous blog entry : here are the magical incantations for the database gods, to be executed before RCU.

First connect to the database :

sqlplus sys/yourpassword@XE as sysdba

(be sure to have /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin in your PATH)

SQL> show parameter processes //processes should be 40 – must be 200
SQL> alter system set processes = 200 scope=spfile;
SQL> show parameter session;
SQL> alter system reset sessions scope=spfile sid='*';
SQL> shutdown immediate;
SQL> exit;

then restart XE with :

sudo /etc/init.d/oracle-xe start

Finally, as stated on SOA Suite download page :

“If you want to use XE you can set the RCU_JDBC_TRIM_BLOCKS environment variable to TRUE *prior* to running RCU. As a reminder as to support level, when running RCU against XE you will receive a warning stating that the database version is not supported by Oracle.”

You must issue

export RCU_JDBC_TRIM_BLOCKS=true

before starting RCU. Failing to do so will cause WebLogic to issue a bunch of database related exceptions at startup time.

That’s it !  You can now proceed with RCU to install SOA Suite’s database schemas.

Enjoy !

, , ,

5 Comments

Installing VBox Guest Additions in a minimal Oracle Enterprise Linux config

Here is a tip to help you to save some time next time you will install Oracle Enterprise Linux as a guest OS in a Virtual Box system.

If, like me, you like to install the minimum set of components and then add whatever is required at a later stage, you will soon find that you can not install the Virtual Box Guest Additions : the installation procedure will complain for missing packages.

Actually, the installation procedure is compiling source code, hence it requires some development tools and the kernel header files. None of these are installed by default when you choose a minimal installation.

First Step : add Oracle repositories to YUM configuration (as root)

cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-el5.repo

Then ensure that the repositories are enabled, i.e. enabled=1 under [ol5_u5_base] and [el5_u5_base]

Second Step : install missing packages

sudo yum install gcc  make  automake  autoconf kernel-headers.i386 kernel-devel

Then you can proceed with normal VirtualBox Guest Additions installation.

Enjoy !

, , , ,

3 Comments

Web Services Security with OpenSSO Security Token Service (STS)

I recently experimented with OpenSSO Secure Token Service, one of the rare component Oracle will migrate from Sun’s Identity Management Suite to Oracle’s IAM Suite.

An Open Source implementation is also available from ForeRock’s OpenAM.

To summarize, a Secure Token Service is a third-party broker where Web Services clients can authenticate and receive a security token to be sent to a Web Service Provider.  The Web Service Provider will, in turn, validate the token and to evaluate authentication and authorization decisions.

The best STS description / tutorial I found on the web is on a deprecated page of Microsoft’s MSDN.  If you don’t know about STS, I highly recommend to read this serie of articles.

After installing / setting up OpenSSO / OpenAM, you will be ready to configure the STS part.

There are three approaches to interact with STS Server

Approach #1 – STS’s WSDL definition

This is the platform agnostic approach.  Just rely on STS’s WSDL definition to generate whatever client code you will need.

Unfortunately, on Java SE 6, this approach fails because of incompatibilities in OpenSSO’s STS WSDL definition and JAX-WS.

ForgeRock’s community is tracking this issue under Bug ID 287 and Bug ID 306

Stay tuned on ForgeRock’s JIRA for more details on this approach.

Approach #2 : Using JAX-RPC and JSR 196 provider

JSR 196 is a SPI specification allowing to hook a filter inside a container.  This filter will be invoked for all incoming and outgoing JAX RPC call, allowing it to be used for logging or security purposes for example.

OpenSSO and OpenAM do provide a JSR 196 provider for web service authentication (JSR 196) and authorization (JSR 115).  This provider is able to work with an STS provider.  The provider is available as part of openssowssprovider.jar JAR file.

While a little cumbersome to configure, this approach is working out of the box.  As long as you strictly follow the documentation.  These troubleshooting steps will probably be useful as well.

However, this approach has a major drawback : it is JAX RPC based, i.e. quite old, now that the (Java) world has embraced JAX WS.  In other words, Oracle only supports this when the web service provider and the web service consumer are deployed into a GlassFish v2 instance.

So, if you want to use JAX WS, you will require a little more work.

Approach #3 – JAX WS

JAX-WS also provides hooks to intercept outgoing and incoming SOAP requests.  These hooks are named “Handler“.

The good news about Handlers is that they are web-app specific, unlike JAX-RPC JSR 196 provider which are installed at container level; hence for all your web applications.

You can think of an Handler as a Servlet Filter, dedicated to web service calls.  They can be part of a web app, to protect web services providers, or stand alone client, to protect web service consumers.  IBM has a very good documentation about using Handlers with JAX WS web services.

To test OpenSSO / OpenAM STS service with JAX WS handlers, I suggest you to read this tutorial.

All in all, this is an excellent step by step article, covering deployment in Tomcat, GlassFish and Websphere.

Unfortunately, you will soon realize that these step by step instructions are not working.

Problem #1 : Oracle removed the download link to openssowssagents.jar file.  Yes you read it right.  As of today, there is no binary distribution for the JAX WS Handlers and WSS Agents.  The JAR file is only available from ForgeRock.

Problem #2 : JAX-WS ClientHandler and ServerHandler are not included in openssowssagents.jar file.  So even, if you are downloading ForgeRock’s JAR file, you won’t get these two JAX WS handlers.

So the only solution is to download the source code and built it yourselves.  Building OpenSSO / OpenAM is not an easy task.  This product has many dependencies and historical (legacy) branches.  Anyway, your build will not be supported by Oracle nor ForgeRock.  For your convenience, here is a openssowssagents.jar file with the JAX WS classes included.

Should you have a valid support contract with Oracle and/or ForgeRock, do not hesitate to open a support case and see what / if /how they will handle this situation.

Enjoy !

, , , , , , , , , ,

10 Comments

Coherence Plugin for NetBeans IDE

While working with Coherence, we might find convenient to start, stop and query Coherence cluster node directly from the IDE.

My colleague Andrew wrote a plugin to allow this.  In addition, the plugin takes care of generating the tedious boilerplate code required for object serialization.

Good Job Andrew !

You will have more details and a short documentation on Andrew’s blog.  And you can download the plugin from NetBeans’ plugin portal.

, , , ,

No Comments