Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Keep Your Data Flowing

Keep Your Data Flowing

Providing a first-class online user experience can require access to multiple sources of data.

The required data often resides in multiple databases, packaged applications, and other information silos. Accessing and relating such data is a key challenge facing modern enterprises. The IT world knows this problem as the enterprise information integration (EII) problem: enterprise applications need to be able to easily access and combine information about a given business entity from a distributed and highly varied collection of information sources. To meet this need, BEA offers Liquid Data for WebLogic.

Liquid Data provides unified access to data in relational databases, Web services, packaged applications (through J2EE CA adapters and application views), XML files, XML messages, and, through a custom function mechanism, most any other data source as well. It provides default XML views of all of the enterprise data sources, and includes an XQuery-based graphical view-and-query editing tool for integrating and enhancing information drawn from one or more of the data sources. It includes a distributed XML query processor and provides advanced features such as query result caching and data source-level and stored query-level access control.

A general overview of BEA Liquid Data for WebLogic appeared in WLDJ (Vol. 2, issue 4) earlier this year. Related articles (XML-Journal, Vol. 2, issues 6 and 7) described Liquid Data's overall approach to enterprise information integration, namely the use of XQuery and related XML standards to define and query XML views of disparate data sources. This article highlights the key new features of Liquid Data for WebLogic 8.1.

Liquid Data 8.1
The main theme for the BEA Liquid Data for WebLogic 8.1 release is seamless interoperability with the rest of BEA WebLogic Platform 8.1 for application developers. Within this theme, three areas of interoperability with other WebLogic Platform components were key focal points:
1.  Making it easy for portal developers to consume results from Liquid Data queries
2.  Making Liquid Data easy to use as an enterprise data access layer in Web services
3.  Making Liquid Data easy to use for data enrichment and augmentation in integration projects

A major theme for the WebLogic Platform 8.1 release is the provision of a unified integrated development environment, the BEA WebLogic Workshop IDE, where developers can create entire applications that include portals, Web services, and integration components. The WebLogic Workshop IDE programming model is based on the notion of Java controls - simple components with a visual representation in the design view that have methods, events, and properties - and the generation and use of annotated Java code that enables developers to declaratively specify desired behaviors instead of writing complex J2EE infrastructure code. Java controls provide simplified access to J2EE resources such as JDBC data sources, JMS queues, EJBs, or Web services. Application developers can also create new controls to encapsulate business logic in a reusable package that other application developers can then use. Liquid Data for WebLogic 8.1 provides a Liquid Data control that makes it easy for WebLogic Workshop applications to use Liquid Data queries.

In addition to providing the new Liquid Data control, Liquid Data now includes support for accessing delimited files and "in-flight" XML fragments in queries. And, it provides a means to utilize SQL stored procedures and vendor-specific SQL extensions in developing queries and views. Improvement-wise, this release includes important enhancements in the area of query builder UI usability.

In the remainder of this article we'll build a distributed query using Data View Builder (Liquid Data's query builder UI) and then create a Liquid Data control to encapsulate the query in the WebLogic Workshop IDE. After creating this control, we'll demonstrate how easy it is to create portals, page flows, Web services, and workflows that use this control. At the end of this article we'll look at some of the other features and improvements mentioned above.

Liquid Data Java Control
The BEA Liquid Data for WebLogic Java control allows application developers to develop applications in the BEA WebLogic Workshop IDE that can easily consume Liquid Data queries. When creating an instance of the control using the Liquid Data control design environment, application developers can browse the Liquid Data server repository and select one or more stored queries. The selected queries then become available as methods on the control. In addition, the control also provides a way for applications to directly issue ad hoc queries against the Liquid Data server. In both cases, the query results are returned to the application using WebLogic Workshop's XMLBeans technology. For each method, the return type is an XMLBeans instance that the Liquid Data control design environment auto-generates based on the query's XML Schema result type.

For those of you who haven't encountered XMLBeans before, it's a new XML-Java binding technology from BEA that uses XML Schema as a basis for generating Java classes that provide convenient, typed access to XML instance data in Java programs. XMLBeans was designed to support both type-safe Java access to XML instance data as well as full access to the underlying XML data itself, combining the best features of low-level APIs like SAX and DOM (which provide full access) with the convenience of Java binding. Its generated type-safe Java classes provide schema-constrained read/write access to the underlying XML data, while full access to the data is provided via an efficient cursor-based interface. The XML cursor defines a location in the underlying XML data where a program can perform actions (e.g., set or get values, insert or remove pieces of XML, copy chunks of XML to other parts of the document) on the selected XML data. By delivering its query results via XMLBeans, the Liquid Data control makes it easy for a WebLogic Workshop application developer to create page flows, portals, Web services, and workflows that use XML query results obtained through calls to a Liquid Data control.

An Example Application Scenario
Avitek is an online electronics retailer that wants to build and deploy a new customer self-service application. The goal is to reduce call center expenses by adding customer self-service capabilities to the Avitek Web site. Once a customer logs in, he or she should be able to view their profile information and check their order information. To build this customer self-service portal for Avitek, we'll start by developing a CustomerOrder query to retrieve the customer profile and order information for a given online customer.

To keep the example simple, suppose that there are two data sources containing data relevant to the customer self-service portal:

  • RTL-Customer: A relational database that contains the customer profile information
  • ElectOrderService: A Web service fronting a packaged order management application that contains the electronics order information for Avitek's customers

    Graphical Customer Order Query
    Figure 1 shows how the BEA Liquid Data for WebLogic 8.1 query builder tool, Data View Builder (DVB), can be used to graphically construct the query that assembles all the information needed for Avitek's customer self-service information page. The shape of the query result is determined by its target schema (shown on the right); the target schema contains a top-level element called CustProfile. CustProfile has a child element, Customer, that has basic profile information such as Customer_ID, First_Name, Last_Name, Email_Address. The Customer element itself has a child element Customer_Order that contains summary information for any/all orders for a given customer. The customer profile information for the query comes from the Customer table in the relational data source RTL-Customer. The order information for a given customer results from calling the Web service method ElectOrderService.getOrderSummary(). This Web service call takes custid as a single input parameter that comes from the Customer_ID column of the Customer table. The query is designed to be a parameterized query that takes a customer id as input and returns the profile and order information for the indicated customer.

    Customer Order XQuery Source
    Listing 1 shows the detailed structure of the XQuery generated by Liquid Data for WebLogic 8.1 as a result of Figure 1's mappings. The topmost FOR clause in the XQuery binds a variable to each Avitek customer who satisfies the query's outer WHERE predicate, which only keeps those customers whose customer ID matches the given query parameter. The outermost RETURN clause specifies the query's output, which consists of customer data from the RTL-Customer database plus the result of a nested query. The nested query pulls order data from the Electronics Order Web Service. The nested query's WHERE clause ensures that only orders for the customer of interest are queried, and the inner RETURN clause retrieves the desired order information. Listing 2 shows a sample of this query's output.

    Now that we have designed and tested the query successfully, we are ready to deploy the query and its associated target schema to the Liquid Data server as a stored query. Deploying a stored query directly from DVB is a new capability in Liquid Data 8.1. Once deployed, the query becomes immediately available for use by applications using the Liquid Data control in the WebLogic Workshop IDE, so we are now ready to create a Liquid Data Java control.

    Creating a Liquid Data Control
    Having deployed the Avitek customer order query using DVB, we are now ready to launch the BEA WebLogic Workshop IDE and start creating the desired application using the Liquid Data for WebLogic 8.1 control. To create an instance of a Liquid Data control, we will begin by creating a new default application in WebLogic Workshop and creating a folder called orders within it. We will then create a new control by selecting Liquid Data from the controls selection presented to us when we ask WebLogic Workshop to create a new Java control. Having done this, clicking on the next button will take us to a second screen that asks us to choose between a local and a remote Liquid Data server. Liquid Data supports two deployment scenarios. It can either be colocated in the same server as the final application, or it can be on a remote. In this example we will select the local option and click Create. This will take us to a third screen in the Liquid Data control creation process, which allows us to browse the deployed stored queries in the repository of the Liquid Data server. At this point we can select one or more queries to become methods when we create the Liquid Data control. Figure 2 shows the dialog for choosing among a set of available Liquid Data queries.

    We can now select the query crm.CustOrder and press the Finish button; the Java source code for defining the desired Liquid Data control instance will be created as the file CustOrder.jcx. As alluded to earlier, creating this control also auto-generates the XMLBeans classes related to the target schema associated with the query. These XMLBeans classes provide typed accessor methods for traversing the XML data returned by the query. Listing 3 shows the contents of the Liquid Data control JCX file. Given that we selected just our one query when creating the control, this file defines just one method, one that corresponds to the query that we selected. The name of the method defaults to the name of the query, although developers have the option of changing the method name. Note that this method, CustomerOrder(), takes one parameter, Customer ID (the input parameter for the stored query CustomerOrder), and returns a result of type CustOrderDocument (the root document type for the collection of XMLBeans classes generated from the query's target XML schema). The method annotations in the JCX file include the name of the stored query and a copy of its XML schema.

    Once this Liquid Data Java control instance has been created, it can be used in developing WebLogic Workshop applications such as page flows, portals, Web services, and workflows.

    Creating Web Applications
    BEA WebLogic Workshop 8.1 provides tools for developing Web applications using JavaServer Pages (JSPs) and page flows, separating presentation, business logic, and navigational control logic to help minimize application complexity. Page flows in WebLogic Workshop allow developers to separate their user interface code for a Web application from their navigational control logic and their other business logic (which may include data aggregation code). User interface code is placed where it belongs, in JSP files. Navigational control logic is implemented separately (but easily) in the page flow's controller file (which is a special Java file that uses a JPF file extension). Data aggregation logic can be implemented in a Liquid Data control. In this section we will walk through the process of creating a Web application that uses our Liquid Data control for data aggregation and page flows for data presentation.

    Given a Liquid Data control, right-clicking on the control's JCX file causes WebLogic Workshop to prompt for one of two options: generate page flow or generate test JWS (Java Web service) file. If we select the option to generate a page flow, WebLogic Workshop will launch its page flow-generation wizard to guide us through the creation of a page flow based on our Liquid Data control. The default page flow that it generates includes JSPs that allow users to enter values for the input parameters for the control's methods and then to invoke the methods. The generated JSPs don't take care of result formatting, however; they simply display the returned results in XML string format. In this example, we want fancier formatting - we would like our result page to have a header to show the Customer profile data along with a table listing all the order information for the given customer.

    To format the query's XML results as desired in the JSP result page, we will need to declare a public variable of type Customer in the page flow so that it will be accessible in the WebLogic Workshop page flow properties data palette. After declaring this variable and assigning the results of the query to it in the source code, we need to create a table for formatting header information. In the header block we'll simply create a table with two columns and four rows. The first column will have the labels for the Customer information and the second column will have the actual values. These values can be dragged and dropped into the table from the Customer object in the properties data palette. As shown in Figure 3, for the Order Information table we will need to drag-and-drop the CustomerOrderArray element from the Customer object in the properties data palette. As we drop the CustomerOrderArray onto the JSP, a RepeaterWizard will pop up and walk us through the creation of the orders table. The RepeaterWizard will provide us with choices, including the selection of what fields we want to display and the formatting style to be used. At this point we have completed the formatting of our JSP pages and are ready to test our application. Figure 4 shows the output of running the resulting Web application. It shows the results formatted with a header block containing the customer profile information and a detail block containing all of the orders related to the customer. It is interesting to note how little actual coding was required to create the desired customer self-service application.

    Once we've created a Liquid Data control, it's just as easy to create a portal, a Web service, or a workflow that incorporates it. The paradigm for consuming Liquid Data queries in any other WebLogic Workshop project is the same as what we've shown for creating Web applications.

    Other Notable Liquid Data Features
    In addition to the Liquid Data control, which is the central new feature in Liquid Data for WebLogic 8.1, this release added several new ways for XML data to enter the Liquid Data world and improved on manageability and performance in several key areas.

    Delimited Files
    Liquid Data 1.0 supported only XML files when it came to file data sources. BEA Liquid Data for WebLogic 8.1 adds support for delimited files, which are text files that contain a predefined character as a data separator. Delimited files are typically exported from a database, a spreadsheet, or another application like a spreadsheet. It's now possible to create delimited file data sources in Liquid Data for use in queries. Such data sources have associated (partially implied) XML schemas and they make it possible to combine delimited file data with any other Liquid Data data source(s) by creating queries that use the delimited file data source.

    Complex Parameter Types
    Complex parameter types (CPTs) are another addition. Essentially, CPTs make it possible to use XML data as an input parameter to a Liquid Data query. CPTs make it possible to define an XML data stream of an arbitrary (XML Schema) type and then pass XML data of that type as input to a query. A typical CPT use case might be a workflow that receives an XML message and needs to enrich the message with information culled from a collection of back-end heterogeneous data sources.

    SQL Calls as Data Sources
    BEA Liquid Data for WebLogic 8.1 also includes support for using SQL stored procedures and SQL queries as parameterized data sources for use in Liquid Data queries and views. To use a stored procedure or a SQL query as a data source in Liquid Data, one creates a SQL Call Description File (SCDF). The SCDF is an XML file that defines the types and the functions for a set of SQL stored procedures and/or SQL queries. These SQL calls then become available for use in building queries in the Data View Builder just like any other data source.

    In this article, we looked at how BEA Liquid Data for WebLogic 8.1 makes it easy to develop applications - including Web applications, portals, Web services, and workflows - that require access to data from multiple heterogeneous sources. You can try developing applications using BEA Liquid Data for WebLogic 8.1 yourself by downloading it from http://commerce.bea.com/index.jsp.


  • Carey, M.; and Mangtani, N. "Liquid Data: XQuery-Based Enterprise Information Integration." BEA WebLogic Developer's Journal, Vol. 2, issue 4, April 2003.
  • Carey, M.; Florescu, D; and Mangtani, N. "Integrating Enterprise Information on Demand with XQuery." XML-Journal, Vol. 2, issues 6 and 7.
  • BEA Liquid Data 8.1 Documentation: http://edocs/liquiddata/docs81/index.html
  • XMLBeans: An Easy Way to use XML in Java: http://dev2dev.bea.com/technologies/xmlbeans/overview.jsp.
  • Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    @ThingsExpo Stories
    Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
    Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
    Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
    Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
    As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
    DXWorldEXPO LLC announced today that "Miami Blockchain Event by FinTechEXPO" has announced that its Call for Papers is now open. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Financial enterprises in New York City, London, Singapore, and other world financial capitals are embracing a new generation of smart, automated FinTech that eliminates many cumbersome, slow, and expe...
    DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
    The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
    DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of bus...
    With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
    Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
    DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
    DXWorldEXPO LLC announced today that ICOHOLDER named "Media Sponsor" of Miami Blockchain Event by FinTechEXPO. ICOHOLDER give you detailed information and help the community to invest in the trusty projects. Miami Blockchain Event by FinTechEXPO has opened its Call for Papers. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Miami Blockchain Event by FinTechEXPO also offers s...
    Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
    Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
    Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
    The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
    With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...