Thursday, May 15, 2008

Web Service Integration

Service oriented architecture is the latest trend (or buzz, depends on your point of view) in enterprise applications these days. So naturally comes the request for us to integrate Infranet using web service to a .NET environment.

The latest version of Infranet, now officially Oracle CBRM, does have a very simple web service module. It is essentially a thin Java web service deployed on Apache Axis. The good thing is it exposes the PCM API to you, albeit it does nothing to help you to learn it. The bad thing is you are on your own in terms of constructing flists, manually in XML!!! The distributed example figures out a way to build the flist by using the Java API, then converts it to XML using pin_flist_to_xml. Hmm if I know enough about the API to build flist in Java, then I may as well open a PCM context and call opcodes directly.

Anyway, I use wsdl2h shipped with Visual Studio to generate the stub from Infranet WSDL, then contruct the flist through XML mapping templates. Drop a simple ASPX page into IIS and voila you can call commit customer from there.

The outbound interface is a little trickier, since it involves a custom Data Manager, and DM requires a C library to call an external web service. After searching a while I select Apache Axis for C++ and gSoap for evaluation. After one test and looking though documentation, I decide to use gSoap.

Here again it involves parsing WSDL to generate the stub in C, gSoap provides wsdl2h and soapcpp2 utilities for that task. It is a little tricky to compile gSoap runtime into DLL, but it helps that the provided documentation is excellent.

Now I have an inbound and outbound web service for Infranet. Is it time to build plugins for EAI suites such as Tibco, Fiorano or we will all use Oracle Fusion?