Welcome!

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

Related Topics: Weblogic

Weblogic: Article

Web Services in the World of Java

Web Services in the World of Java

THIS MONTH I'M GOING TO TALK about Web Services (capitals intended - I'll explain in a minute). Specifically, as one of the architects of BEA's SOAP/WSDL stack, I'd like to talk to you about Web Services and where they fit in with J2EE and Java in general.

I capitalize the term "Web Services" because when I use it I'm referring to a very specific set of specifications and protocols. Many companies have retargeted their marketing machines at this space and they're using the term "web services" (lowercase s intended) to mean a wide variety of things, some even stretching it out to mean regular Web sites. Web Services are, by my definition, services whose shape (or interface) is determined by a corresponding WSDL document and that are accessed through some binding to the SOAP protocol. Currently, services falling under this umbrella should follow the SOAP 1.x and WSDL 1.x specifications published by W3C. Commonly, the transport protocol is either HTTP or SMTP, but there are probably others out there. There's another type of Web Service that I'll refer to as Business Web Services. These are built using conversation-based protocols on top of something akin to SOAP (or even SOAP itself). Some examples include ebXML, BizTalk, and RosettaNet.

SSB and JMS
When you look at the J2EE programming model for ideal points of integration with Web Services, there are two that jump out at you. Stateless Session Beans (SSB) look almost exactly like a typical Web Service. They have an interface that should map to a WSDL document; they're stateless like RPC-style Web Services; and they have the right granularity for loosely coupled systems. On the other hand, JMS destinations map very well to document-style Web Services. You can define an end-point; routing can be done; and the systems are nicely decoupled from one another. There may be other points of integration between the two systems, but because we know that these integration points are more appropriately decided by the Java Community Process (JCP, see JSR 101 & 109), at BEA we felt that we should stick to the obvious overlaps.

Performant, Extensible, Configurable...and Fast
When using our Web Services stack versus others, the main difference is that it's been built to be highly performant, extensible, and configurable. There are hooks for building extensions to the base functionality to ensure that while Web Service usage patterns are developing, you're not left waiting for the next release.

On the performance side, we developed an extremely fast XML parser and layered a very programmer- and execution- efficient API on top of it. Known as an XMLEventStream, this API allows you to access your XML data efficiently like SAX, while at the same time retaining a lot of the convenience of DOM. We also provided tools to deploy Web Services straight from your SSBs and your JMS destinations, so that you can get started right out of the box.

The more difficult decision was to support only very simple types. Our implementation supports the base types (like int and String) and structs (mapped to JavaBeans or Maps) and arrays of these types. We left the type codec very extensible so that you can map more complicated constructs to your own Java class implementations, but we don't encourage using it if you don't have to. It should be used only when interoperability would suffer without it. We also left out some of the higher-level J2EE constructs such as entity beans.

J2EE Should Never Be Stretched Too Far
Ensuring that your system is interoperable with many different clients has become very important. When you're architecting your applications, you need to make careful decisions when choosing what functionality you'll expose and how you'll expose it. For instance, many people are building Web service gateways to entity beans. Since I don't even believe that a Java client should access entity beans over the network (access should always be through a session bean), how could I support the access of entity beans through what should be a stateless interface with no support for remote references?

Another alarming feature that's becoming prevalent with the more "dynamic" implementations (by which I mean unmanageable) is the passing of serializable Java datatypes directly in a SOAP message. Some are even BASE64-encoding the serialized byte array! This is exactly the sort of thing developers should not do when building interoperable systems. All access points to your application should be designed with cleanliness, compatibility, and above all, maintainability firmly in mind.

If there's one thing the browser has taught us, it's that it is possible to have cross-platform applications hosted over the network. The arrival of Web Services promises that we can host cross-platform application services as well, if only a little care is taken.

More Stories By Sam Pullara

Sam Pullara has been a software engineer at WebLogic since 1996 and has contributed to the architecture, design, and implementation of many aspects of the application server.

e-mail: [email protected]

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.


IoT & Smart Cities Stories
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.
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
Early Bird Registration Discount Expires on August 31, 2018 Conference Registration Link ▸ HERE. Pick from all 200 sessions in all 10 tracks, plus 22 Keynotes & General Sessions! Lunch is served two days. EXPIRES AUGUST 31, 2018. Ticket prices: ($1,295-Aug 31) ($1,495-Oct 31) ($1,995-Nov 12) ($2,500-Walk-in)
According to Forrester Research, every business will become either a digital predator or digital prey by 2020. To avoid demise, organizations must rapidly create new sources of value in their end-to-end customer experiences. True digital predators also must break down information and process silos and extend digital transformation initiatives to empower employees with the digital resources needed to win, serve, and retain customers.
IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
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...
Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
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...