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

Related Topics: Weblogic

Weblogic: Article

Building Better Bridges

Building Better Bridges

The most challenging integration efforts frequently involve integrating enterprise resource planning (ERP) or customer relationship management (CRM) systems with new and existing custom applications.

These enterprise software applications often have proprietary architectures and complex APIs, and use proprietary programming languages unfamiliar to the mainstream developer community. However, some enterprise software vendors are attempting to make the integration effort more approachable. Using XML and Web services, these vendors are attempting to bridge the gaps between their respective products and the world around them.

In the first installment of this two-part series (WLDJ, Vol. 1, issue 10), I looked at how the Java Messaging Service (JMS) and PeopleSoft 8.4's Integration Broker (IB) technology can be used to integrate PeopleSoft and J2EE applications. In this article, I will explore how Web service technology can be used to integrate PeopleSoft with J2EE applications. These concepts can be extrapolated to integrate PeopleSoft with any application capable of manipulating XML content and maintaining an HTTP connection. This opens the doors of integration to a wide range of environments such as J2EE and .NET.

Web Services - A Matter of Definition
For PeopleSoft Inc., the definition of a Web service is clear - it is an application component that can be accessed using XML messages over an HTTP connection. This definition means that Web services are inherently open and accessible over the Internet and across corporate intranets. In addition, they are accessible to a wide range of technologies and platforms.

XML and HTTP are the essential ingredients of any Web service. Additional standards, such as Simple Object Access Protocol (SOAP) and Web Services Description Language (WSDL), improve the consistency and accessibility of Web services by standardizing the description of Web services and the format of the messages they exchange. However, SOAP, WSDL, and Universal Description, Discovery, and Integration (UDDI) - a protocol for cataloging, publishing, and locating available Web services - are not requirements for Web services. Instead, these protocols mainly enhance the overall usability of Web services.

I will describe two scenarios for integrating PeopleSoft and J2EE applications. The first describes how a PeopleSoft application can invoke a WebLogic Server (WLS) 7.0-hosted Web service. The second describes how a J2EE application can invoke a PeopleSoft Web service. Both scenarios make ample use of XML and HTTP, while only the first uses SOAP, and neither explicitly uses WSDL. For the sake of simplicity, neither will use UDDI. Rather, it is assumed that both the PeopleSoft and J2EE clients know the specific names and locations of the Web services they desire.

Example 1: Invoking a J2EE Web Service from a PeopleSoft Client
In this scenario, I used a very simple Web service that is implemented as a session bean. WebLogic's servicegen Ant task automates the process of turning Java classes, session beans, and message-driven beans into Web services. Hence, the work involved in providing and publishing the Web service is considered trivial and thus, in the interest of time, will not be described. Instead, I'll first focus on the IB definitions that are required to support the integration. Next, I'll explore the actual client-side PeopleCode required to invoke the Web service.

As described in my first article, a number of key IB definitions must be created in order to support an integration scenario. In this scenario, PeopleSoft is synchronously invoking an HTTP-based Web service that resides on an external system. Since a synchronous invocation implies both a request and associated reply, I'll first define the request and reply messages, JKK_SBINFOFACADE_SOAP_REQ and JKK_SBINFOFACADE_SOAP_RESP, using the PeopleTools Application Designer environment. Next, an IB node must be defined to represent the external system, and its associated target connector must be PeopleSoft's HTTPTargetConnector. This node, JKK_WS_TARGETNODE, and its associated HTTPTargetConnector properties are shown in Figure 1.

The HTTPTargetConnector states that an HTTP POST to the URL, http://wls-01:7001/web_services/SBInformationFacade, is needed to reach the JKK_WS_TARGETNODE IB node. This URL is the address of the WLS-hosted Web service. Next, an outbound synchronous (outSync) transaction must be defined on the JKK_WS_TARGETNODE node, specifying JKK_SBINFOFACADE_SOAP_REQ and JKK_SBINFOFACADE_SOAP_RESP as the request and reply messages, respectively. Collectively, these IB definitions will support the synchronous exchange of messages with the WLS-hosted Web service, using an HTTP connection.

Next, I'll address the specific tasks required to create the PeopleCode Web service client. We begin by using the deployed Web service's home page (located at the URL listed above) to examine the SOAP messages exchanged when a Web service operation is invoked. For this example, I'll focus on invoking the getID Web service method, which simply generates and returns a unique identifier to its caller. Figure 2 illustrates the results of invoking getID() using the Web service home page.

This information can be used to implement the PeopleSoft client. Since PeopleSoft has no JAX-RPC equivalent, the client cannot readily make use of a Web service's WSDL description. Hence, in order to invoke the getID() operation, the PeopleSoft client must explicitly create, send, receive, and interpret the SOAP messages shown in Figure 2.

PeopleSoft provides direct support for manipulating SOAP messages and XML documents, via the SOAPDoc and XMLDoc PeopleCode classes. To invoke the getID() operation, the client must create and then send an appropriate SOAP request document to the Web service. These steps are illustrated in the PeopleCode program in Listing 1.

The special PeopleCode functions, CreateSOAPDoc() and ValidateSOAPDoc(), are used to create and validate SOAP documents. Both methods operate on instances of SOAPDoc, a special PeopleCode class that encapsulates SOAP documents.

SOAPDoc allows clients to specify and retrieve the fundamental elements of a SOAP document, including its envelope, body, method, and associated parameters. Upon inspecting the SOAP request and response documents in Figure 2, we learn that the actual SOAP method for invoking getID() is, in fact, getID(). Hence, after adding the mandatory envelope and optional body to the SOAP request document using SOAPDoc's AddEnvelope and AddBody methods, I used AddMethod to specify "getID" as the target Web service operation. Since SOAP methods can represent a request or response, AddMethod's second calling parameter can be used to specify which role to use. Supplying "1" means the method is a request, which will ultimately generate a getID element in the SOAP document (ex: <getID></getID>). However, supplying a "0" means the method is a response, which will be rendered in the SOAP document using the generally accepted practice of appending "Response" to the name of the method, eg., <getIDResponse></getIDResponse>. If getID() took arguments, they could be specified using SOAPDoc's addParm(parmName, parmValue) method, in which parmName is the formal name of the parameter or "part" (as specified in the Web service's WSDL description), and parmValue is its value.

The next step is to send the SOAP request document to the Web service using either the synchronous SyncRequestXmlDoc IB function or its asynchronous counterpart, PublishXmlDoc. Both functions will send a given XML document, under a specified message name, to a specified IB node. In Listing 1, the SOAPDoc's XMLDoc component is first extracted before being sent as a JKK_SBINFOFACADE_SOAP_REQ message to the JKK_WS_TARGETNODE IB node. In turn, IB will send the SOAP request document to the specified URL, effectively invoking the Web service that resides there. Once the Web service getID() operation completes, IB will convey the results to the PeopleCode client.

Finally, the PeopleCode client will use a SOAPDoc instance to capture and interpret the Web service's response. Because a response can contain multiple SOAP parameters (i.e., for the out and in-out parameters of a Web service operation), the SOAPDoc class provides GetParmName and GetParmValue methods to determine the name and value of specific parameters. In our scenario the getID() operation (and getIDResponse SOAP method) only returns one parameter, an integer named result (see Figure 2). So, for our purposes, we can assume that the first parameter name and value correspond to the result and associated value returned by the getID() operation.

Example 2: Invoking a PeopleSoft Web Service from a J2EE Client
PeopleSoft functionality can be exposed as Web services using an Inbound Business Interlink. Business Interlinks are integration mechanisms that enable external systems to perform component-based, real-time integration with PeopleSoft systems. Business Interlinks accomplish this by creating synchronous transactions that facilitate the real-time exchange of data between PeopleSoft applications and external systems.

Inbound Business Interlinks provide Internet Scripts (or IScripts), which are specialized PeopleCode programs that behave much like J2EE servlets. An IScript resides on the PeopleSoft server and is capable of exchanging XML data with external systems using HTTP. Incoming HTTP requests can originate from a Web browser or a client program communicating via an HTTP connection. An IScript definition spans both the PeopleSoft application and Web servers. The application server portion, which must be defined first, contains the actual implementation or business logic of the IScript, and is written in PeopleCode. The first step is to use the PeopleTools Application Designer to create a record, called a Web Library, or WEBLIB. WEBLIBs, which are roughly analogous to Java Archive (JAR) files, can store collections of IScript definitions within the Field Formula (FFO) fields of their columns. These records and columns, although similar to the definitions discussed in the first article, are not necessarily intended to store application data. Rather, they simply provide a convenient place to house and organize IScripts. Figure 3 illustrates the WEBLIB record, WEBLIB_WSILINK, which is used in our example.

The Web server portion, defined via the PIA screens, links the IScript to a service name, and stores this linkage in an XML registry. The service name will become part of the URL that any HTTP client (including a Web browser) must use in order to access the IScript. The definition and linkage of this service name is shown in Figure 4.

PeopleSoft's rich security model is at play here - ensuring that only properly authorized clients can access an IScript and the business components it uses. You can use the PeopleTools Security PIA screens to enable client access to an IScript and its WEBLIB, as shown in Figure 5.

Once the appropriate security settings are made, the URL can be used from a browser or client program to invoke the IScript. The IScript can be written to accept and return information in XML form, effectively making it a Web service.

An IScript, like a J2EE servlet, has programmatic access to the incoming HTTP request and outgoing HTTP response. As such, an IScript can read and use the contents of the incoming request object to guide its operation. For example, an IScript could take one or more arguments. These arguments could be passed through the IScript's URL, making them available via the request object. The IScript can respond, much like a J2EE servlet, by populating the supplied response object, which is ultimately conveyed back to the HTTP client. For our example, I'll create a simple IScript-based Web service that returns a list of known general ledger accounts, given some selection criteria. Listing 2 shows the PeopleCode implementation of the IScript, which ultimately creates and returns to the HTTP client an XML document containing the desired accounts.

As shown in Listing 2, the special PeopleCode variables, %Request and %Response provide access to the HTTP request and response objects, respectively. Additional PeopleCode classes, like SQL, are used to query the account data, while XMLDoc and XMLNode classes are used to build the XML document containing the account data. Ultimately, this Web service can be tested from within a Web browser by simply jumping to its URL. Figure 6 shows the result of invoking the Web service from within a browser. This same data would be returned to a programmatic HTTP client.

It is a fairly straightforward matter to automate the invocation of the Web service using an HTTP-enabled J2EE client. Listing 3 shows the Java implementation of a simple client, which first uses a URL to address the targeted Web service. Next, the client program performs a simple HTTP GET operation in order to receive the response. Finally, a mixture of JAXP and DOM invocations are used to parse and process the general ledger accounts returned from the Web service.

These articles only scratched the surface of integrating PeopleSoft with external systems. Issues such as security, scalability, and integration using various other protocols are complex and require far too much time to cover in this medium. However, these articles do shed light on the incredible advancements PeopleSoft has made to this critical aspect of systems integration.

More Stories By Joseph K. Krozak

An expert systems architect with over fifteen years of full lifecycle software engineering experience in various applications including banking, supply chain management / manufacturing, law, insurance, and telecommunications. I have spent years mentoring management and development teams on the architecture, design, implementation, and planning of large-scale, distributed, enterprise applications.

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
DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to gre...
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develop...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.