1. Skip to navigation
  2. Skip to content

Glossary


Web Service

(provided by wikipedia.org)

The W3C defines a Web service[1] as a software system designed to support interoperable machine-to-machine interaction over a network. Web services are frequently just application programming interfaces (API) that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.
The W3C Web service definition encompasses many different systems, but in common usage the term refers to those services that use SOAP-formatted XML envelopes and have their interfaces described by WSDL.

back to top

SOA

(provided by wikipedia.org)

Service-oriented architecture (SOA [pronounced "s?-uh" or "es-?-?"]) expresses a perspective of software architecture that defines the use of loosely coupled software services to support the requirements of the business processes and software users. Resources on a network in an SOA environment are made available as independent services that can be accessed without knowledge of their underlying platform implementation.
A service-oriented architecture is not tied to a specific technology. It may be implemented using a wide range of technologies, including REST, RPC, DCOM, CORBA or Web Services. SOA can be implemented using none of these protocols and, for example, might use a file system mechanism to communicate data conforming to a defined interface specification between processes conforming to the SOA concept. The key is independent services with defined interfaces that can be called to perform their tasks in a standard way, without the service having foreknowledge of the calling application, and without the application having or needing knowledge of how the service actually performs its tasks.
SOA can also be regarded as a style of information systems architecture that enables the creation of applications that are built by combining loosely coupled and interoperable services. These services inter-operate based on a formal definition (or contract, e.g., WSDL) that is independent of the underlying platform and programming language. The interface definition hides the implementation of the language-specific service. SOA-based systems can therefore be independent of development technologies and platforms (such as Java, .NET etc). Services written in C# running on .Net platforms and services written in Java running on Java EE platforms, for example, can both be consumed by a common composite application. Applications running on either platform can also consume services running on the other as Web services, which facilitates reuse.

back to top

SOAP

SOAP (Simple Object Access Protocol)

SOAP was created to describe and/or implement the rules for program to program communication over HTTP using XML.  SOAP is often perceived as complicated because of its obscurity, and that is quite possibly why most implementations use a very small portion of the specification.  SOAP tools weren’t available immediately and the details of SOAP were never meant for human eyes to decipher.  Instead SOAP was meant to be an “under-the-covers” type technology.  The way most SOAP implementations work is a SOAP envelope and body are simply added to the beginning and end of the XML document.  Remember, SOAP is nothing more than text (say XML).  Take a look at Figure 8 which shows a non-SOAP example of a simple price calculating XML request.

Figure 8


glossary1

Figure 9 shows what the equivalent in SOAP would be.  Note that this particular example is using a style named RPC (Remote Procedure Call) Encoded – a common SOAP implementation.  This approach to SOAP is undesirable because it causes the data type to be sent along with the data (what Encoded means), adding more to the already bloated document.  The preferable SOAP style would be what’s called Document Literal as shown in Figure 10.  When using Document Literal you specify the data types for the XML in an XSD within what’s called a WSDL.  After working with RPC and Document approaches you will most likely ask yourself “Why were RPC and Document Literal created as separate styles instead of just having a single style coupled with a Boolean flag specifying whether or not the data type should be sent along with the request?”.  This is where flexibility to withstand change introduced obscurity, giving us what we now have.

Figure 9

glossary3

Figure 10

glossary5


back to top


WSDL

Web Service Description Language (WSDL)


WSDL’s are used at development time to describe a web service program including the names of procedures, input/output parameters, URL of the web service, and what enveloping mechanisms and transport will be used (i.e. SOAP over HTTP).  If you are the one creating a web service then you create a WSDL file that other programmers will use when they develop code on their end to consume your web service.  WSDL files are not used at runtime but are simply a method for most programming languages to “stub out” their code, or rather produce a code template that can be filled in with their business logic. 

In concept WSDL files are a beautiful thing.  After all, they save from having to verbally describe the web service to a trading partner.  Your trading partner can simply point their browser to a WSDL on your server and know every technical aspect about how to make use of your web service.  The WSDL states the exact URL of the web service it is defining (e.g. http://myiSeries.com/cgi-bin/ws1) and describes what data is required for input and output – all in one singular document.  I liken a WSDL to an RPG service program.  Figure 11 shows an example of how an RPG prototype can be transposed into WSDL’s equivalent portType tag.  Note that both the prototype and portType are making references to the actual message to be used for input/output structures using LIKEDS and message respectively.  We have to look elseware in the WSDL document to find how the data types defined in the message attribute are defined - just like how we need to look elseware in our program to see how the structure specified in LIKEDS is defined.

Figure 11

glossary7

Figure 12 shows how the message tags of a WSDL relate to RPG data structures.  They both define the name and data type of information passed in/out of the interfaces. 

Figure 12

glossary9

 

Now that names of the subprocedures (read portTypes) are defined we need to state where they are located.  Concerning an RPG Service Program, one simply needs to know the library where the object resides to call it.  With a WSDL you use the service element to define the URL location of the web service as shown in Figure 13. 

 

Figure 13

glossary11

You will also notice the port element and associated binding attribute.  When creating a WSDL to define a web service you have what’s called the binding portion of the document.  WSDL’s binding tag isn’t as easily related to the RPG environment. Its purpose is to connect the <service> to the <portType> and define the enveloping mechanism and transport to be used (i.e. SOAP envelopes over HTTP) as shown in Figure 14.  The information contained in the binding tag could have easily been placed in either the service tag or the portType, but the creators of the specification  separated it out for modularity sake.  You will note the type attribute in the binding tag contains the name of the previously defined portType – ORDSV.  You will also note that there are two operation tags named the same as the operations defined in the portType tag.  This is where the defining of the envelope (i.e. SOAP) takes place.

Figure 14

glossary13

A raw WSDL is even more painful than looking at a raw XSD, which is why we can again be thankful for visual drag ’n’ drop WSDL tooling also available in WDSC.  Figure 15 gives a visual example of the four portions of a WSDL.  From this screen in WDSC you can completely compose a WSDL without having to look at the raw text.

Figure 15

glossary15

Note that even though the WSDL specification allows many different approaches to be taken concerning plumbing there are only a couple approaches commonly used.  For instance, the enveloping will be SOAP and transport will be HTTP/HTTPS 99% of the time.

Once you have a complete WSDL document in hand you can fully test it using WDSC by right clicking on the WSDL document and select Web Services -> Test with Web Services Explorer.  This will open a view allowing you to select one of the procedures to call along with specifying necessary input parameters.  Hitting the Submit button will send the request on it’s way to the web service specified in the <service> portion of the WSDL.  When the process completes you have access to the request and response XML documents which is very helpful when debugging or trying to determine what exactly is being sent across the wire.XML(use the chapter 2.1 of the RXS user manual for this definition and XSD)

back to top

XML

The Extensible Markup Language (XML) is a W3C-recommended general-purpose markup language that supports a wide variety of applications. XML languages or 'dialects' are easy to design and to process. XML is also designed to be reasonably human-legible, and to this end, terseness was not considered essential in its structure. XML is a simplified subset of Standard Generalized Markup Language (SGML). Its primary purpose is to facilitate the sharing of data across different information systems, particularly systems connected via the Internet. Formally defined languages based on XML (such as RSS, MathML, XHTML, Scalable Vector Graphics, MusicXML and thousands of other examples) allow diverse software reliably to understand information formatted and passed in these languages.

back to top

XSD

An XSD defines the structure of a document and what type of data can appear in each of the elements. Take the following XML Schema Definition which defines the <PostAdr> element.

    
Oddly, this might look like an XML file to you. You are not confused. XSDs use XML to define themselves.  The first tag is the <schema> tag. It merely declares what type of document we are in. Next is <element name="PostAdr">.  That essentially declares the name of the element being described. Within the <element… tag there is a <complexType> tag which states PostAdr either has attributes or children elements, or both. The <name> element needs to be defined within the <PostAdr> tag. The <sequence> tag specifies that realtionship. The contents of the <sequence> tag should contain only a sequence of child element definitions. The innermost children will be simple datatypes defined by the type="string" attribute (or other primitive data type). The value of the  data type attribute could specify a variety of types ranging from numerical to dates, timestamps, Booleans, and so forth.

Next note the definition of the phone element. It states that it can contain a string and must have at least one occurrence of the <phone> element included in the XML document at transaction time.  It also states that there can be a total of two <phone> elements sent (i.e. maxOccurs=”2”)

Finally note the definition of an element's attribute (i.e. the residential attribute of element PostAdr) located within the PostAdr's <complexType> tag. Using the <attribute> tag defines the name and type - residential and boolean respectively.

The nested aspect of an XML Schema Definition is similar to the relationships between commonly used iSeries Physical Files. Consider an order application that maintains data taken over the phone. That application would likely rely on a header (or parent) type file describing when the order was taken, the customer number, when the order will ship, and so forth. It could also use a detail (or child) file holding multiple line items in a single order. Its records could specify things like item ordered, quantity, unit price, extended price, discounts, and the like.

Additional XSD resources

back to top

HTTP

(provided by wikipedia.org)

Hypertext Transfer Protocol (HTTP) is a method used to transfer or convey information on the World Wide Web. Its original purpose was to provide a way to publish and retrieve HTML pages.
HTTP is a request/response protocol between clients and servers. The originating client, such as a web browser, spider, or other end-user tool, is referred to as the user agent. The destination server, which stores or creates resources such as HTML files and images, is called the origin server. In between the user agent and origin server may be several intermediaries, such as proxies, gateways, and tunnels.
An HTTP client initiates a request by establishing a Transmission Control Protocol (TCP) connection to a particular port on a remote host (port 80 by default; see List of TCP and UDP port numbers). An HTTP server listening on that port waits for the client to send a request message.
Upon receiving the request, the server sends back a status line, such as "HTTP/1.1 200 OK", and a message of its own, the body of which is perhaps the requested file, an error message, or some other information.

back to top


Create your own XML web service from RPG today.

Download The Free Trial! Go

Client Satisfaction

Utilizing RPG-XML Suite with great guidance from the Krengeltech support team we successfully consume UPS web services to create electronic return labels. This is the best package support I've received from my 15 years of AS400/iSeries experience.

Alla Ginzburg
Fidelitone

Client Satisfaction

With the help of RPG-XML Suite I was able to cut my personal project time in half. RPG-XML Suite is a proven toolset that allows for easy creation of XML web services from RPG. I'd recommend it to anyone on the iSeries / System i platform because it runs natively in RPG with Apache giving it excellent performance!

Bruce 'Hoss' Collins,
AAA Cooper Transportation

Case Study

Sunbelt rentals

"....keeping Java in their coffee cup!"More

Client Satisfaction

I would like to take this opportunity to thank you for being so helpful during our process and specifically to Aaron for all your prompt communications. Apart from the functionality of the product, you have largely sold your product to us through the support you have shown.

Mark Briggs,
Pfizer Australia

Client Satisfaction

I followed some example code on your website and have a simple app up and running very similar to what my client needs. I just need to adapt it to their JD Edwards World Database. Your software is making me look like a hero!

Carl Galgano
EDI Consulting

Client Satisfaction

Aaron,
I just wanted to take a few moments and say thanks for the help with the web service. I have it working now and we are creating tickets from the XML data. Really cool stuff! Thanks!

Brad Abernathy
Sunbelt Rentals

Client Satisfaction

RPG-XML Suite enables us to communicate from our AS400 real-time with our credit vendors, and the implementation was quick and easy. I would recommend it to anyone.

Margaret,
Spartan Insurance




Employment

View Current
Employment Opportunities.

Go

Our Partners

Get an overview of how to leverage a partnership with us.

Go

FAQs

See the questions everyone else is asking.

Read

Glossary of Terms

Get a better handle
on all the acronymns.

Read