Posts tagged file adapter
Publishing the Product Details WebService based on an Excel based Product Catalog using the SOA Suite 11g File Adapter with Synchronous File Read
Nov 14th
On the one hand: the organization wants to publish a real Web Service, SOAP enabled and all. On the other: the data to be provided by this Web Service is maintained in Excel files and undergoes regular changes by people who are well versed in Excel but absolutely blank when it comes to Web Services.
This article demonstrates how the File Adapter can be used with a Composite application running in Oracle SOA Suite 11g to synchronously read from a file with product catalog details and return information about a single product for which the product identifier was sent to the service.
In just a few, largely declarative, steps, the bridge is built from file based article records to a real SOAP Web Service.
SOA Suite File Adapter Pre and Post processing using Valves and Pipelines
Oct 24th
A quick note on the notion of valves and pipelines that can be configured in File (and FTP) Adapter Services and References (inbound and outbound) to perform file pre- and post processing on the files before they enter the composite application proper as XML or after they have left the composite application, turned from XML to their native format and before they are written out to file.
Valves can easily be created – in a way that reminds me of Servlet Filters – and the pipeline that can be configured with a chain of valves is also quite similar to a filter chain. A valve is custom Java Class that implements one or two specific interfaces. This class is packaged in a JAR file that is added to the classpath of the SOA Suite: the valve becomes part of the generic SOA Suite infrastructure, to be used potentially by multiple composite applications – not necessarily by just a single composite. Note however that use of a valve is configured in the File Adapter binding in every composite application that wants to leverage it.
Valves can be used for several operations. Some examples on the inbound end are:
-
filter files: only let through files or lines that are relevant
-
split files: let through structured data and write to grid or temp storage the associated attachments
-
pre-transform: convert binary (Word, PDF) to plain text or JSON to XML or CSV
-
security/validation: perform check on contents and decide whether to let through or not
-
throttle: slow down processing or wait for a toke to become available
-
decrypt, correct/enrich or unzip files
-
archive files in a more specific way than the file system copy currently supported by the file adapter
For outbound post-processing, a similar list could be composed.
Currently valves are not supported by JMS or Database Adapter – only for file and ftp. I have an inkling that this may change in the fairly near future, though this is only guesswork.
Note: it feels to me that some of the things valves can do regarding file and ftp adapter bindings, we can do through custom web service policies for web service and http binding – message pre- and post processing for inbound and outbound bindings respectively.
The Oracle SOA Suite 11g HttpBinding or another way to call RESTful services from SOA Composite Applications
Dec 15th
I wanted to take a quick look at REST(ful) WebServices and see how those can be integrated into the SCA based SOA Composite Applications that we create with the Oracle SOA Suite. Currently, it does not have the HTTP binding that the 10.1.3 release of the SOA Suite used to have. So what are the alternatives?
In this article, I want to demonstrate a way of calling RESTful (simple http request based) services into a SOA Composite application. I show one way of doing so using the Google Translation Service, a RESTful service described at http://code.google.com/apis/ajaxlanguage/documentation/ and to be accessed at http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=hello%20world&langpair=en%7Cit. This service takes a string to translate and an indication of a source and a destination language. Though maybe not formally resource oriented enough to be called REST-style (or RESTful) service by some, it is a service that does not require SOAP or WS* but simply a HTTP Get request. So at least quite restful.
In this article I will use the work I did and described in the previous article: Leveraging RESTful Services from Java application using Jersey (Introduction). Using project Jersey's support for clients of RESTful services and the JSON-SIMPLE library to interpret the response I get from the GoogleTranslation service, I will hook up with the RESTful Service. Then I will leverage the Mediator Java Callout mechanism to integrate this REST-service-client into a SOA Composite application. The Mediator I create will be the fully SOA Suite integrated front-end of this RESTful Service.

SOA Suite 11g (TP4) – Create Mediator based SCA Composite Application from XSD – write to output file using File Adapter
Jan 22nd
A quick overview of you can create an SCA Composite Application that publishes a WebService interface, accepts SOAP Messages and write their contents to a file, appending a new record to the current contents. In the center of the composite sits a Mediator. Its interface is based on a WSDL that is created directly from an XSD document that describes the XML messages that have to be processed. The Mediator is then exposed as Service through a simple drag & drop operation. An outgoing file adapter service is created that writes its input in a comma separated record format to an existing file. Finally with another drag and drop, the Meditor is wired to this File Adapter Service and – with more dragging & dropping – the mapping between the incoming XML message and the outgoing CSV record is created.
This is all done using Oracle 11g SOA Suite, Technology Preview 4.

