SHARE



ABOUT THE AUTHOR


Andrew Prokop
Andrew Prokop has been heavily involved in the world of communications since the early 1980s. He holds five United States...
Read Full Bio >>
SHARE



Andrew Prokop | November 07, 2016 |

 
   

Priming Your Web Services Knowledge

Priming Your Web Services Knowledge It's not just SIP and RTP that goes into unified communications. Let's talk SOAP and REST and everything Web services.

It's not just SIP and RTP that goes into unified communications. Let's talk SOAP and REST and everything Web services.

"Rest and be thankful."
― William Wordsworth

On a number of occasions, my unified communications articles have used terms such as Web services, SOAP, REST, and RESTful. Without providing much explanation, I've stated that these are methodologies and tools that allow a client application to access a remote service.

For example, Avaya SIP telephones use Web services to store and retrieve data from Personal Profile Manager (PPM). The telephone acts as a client to a service that executes as part of the Avaya Session Manager. PPM Web services allow a telephone to perform functions ranging from adding a name and number to a contact list to retrieving the telephone's button assignments.

Today, I'll dig a little deeper into Web services, exploring what they are and how they work. This can be a fairly complex subject, but the basics are pretty straightforward and having a decent background will help you in your overall understanding of unified communications platforms. Trust me, all the good ones support a collection of Web services interfaces.

The term Web services should be self-explanatory. These are services that are available over the Internet (Web) or an enterprise's intranet. I already gave the example of PPM, but Web services are plentiful outside of telephony. You've used Google Maps before, right? Google offers a Web services interface for map access and data retrieval. Microsoft offers a similar interface for its Bing maps. The social media giant, Twitter, advertises a myriad of Web services to retrieve tweet data and statistics based upon a variety of parameters. Think of a major player on the Web and I bet you will find that they support their own Web services for data retrieval and manipulation.

In the world of unified communications as a service (UCaaS), folks like RingCentral, Twilio, Zang, and Flowroute are blazing the trail with their comprehensive APIs built on RESTful Web services.

Details, Details

Web services are built on the same protocols that your browser uses. HTTP is used for unencrypted access and HTTPS is used when you require a secure, encrypted connection from client to server. Using these protocols allows Web services to pass through intermediaries such as data firewalls.

Web services are implemented in two distinct fashions, SOAP and REST. SOAP (Simple Object Access Protocol) came first and for many years was the predominant way to access Web services. REST (Representational State Transfer) came along after SOAP. Most developers today are moving to REST because of its simplicity, statelessness, and ability to scale to support large, distributed computing environments.

A comparison of SOAP and REST is beyond the scope of what I want to accomplish in this article. There are plenty of those discussions on the Internet and I invite you to explore them. For this article, I will focus on REST since it appears to be winning the API (application programming interface) war.

RESTful Web services follow four basic design principles:

  1. Use HTTP methods explicitly
  2. Be stateless
  3. Expose directory structure-like URIs
  4. Transfer XML, JSON (JavaScript Object Notation), or both

In terms of HTTP, REST predominantly uses four methods: POST, GET, PUT, and DELETE. You will sometimes hear this referred to as CRUD, which stands for create, read, update, and delete. The mapping of HTTP methods to REST functionality is as follows:

  • To create a resource on a server, use POST
  • To retrieve a resource from a server, use GET
  • To change the state of a resource or to update it, use PUT
  • To remove or delete a resource, use DELETE
Putting it into Practice

A very simplistic REST call that adds a user to a contact list might look as follows:

portable

Notice how this call uses XML to describe the new contact. As I stated above, REST also supports JSON to describe the user object. As with the pros and cons of SOAP and REST, I will let the reader do his or her own research into XML vs. JSON. Personally, I will choose JSON any day of the week, but XML interfaces have been extensively deployed.

Since security is paramount, all REST messages should be sent using HTTPS. This prevents someone from "sniffing" the LAN or WAN and obtaining potentially sensitive data.

Try Before You Buy

There are a number of ways you can play with Web services before you put any money into it. If you are a programmer, your preferred language most likely contains built-in support for writing Web services clients and servers. As a Java programmer, I am immersed in the Apache CloseableHttpClient object and its many methods.

However, you can explore Web and cloud services without a lick of programming knowledge. One of the most popular alternatives to coding is Google's Postman. Postman provides an easy to use GUI (Graphical User Interface) that allows you to write, run, and test every imaginable combination of commands, headers, and message bodies. It's my go-to tool when I want to explore a cloud API before committing to writing a real application. Postman allows me to work out the message flows to and from a cloud service that is easily translated to Java code.

Curl is another popular tool for exploring Web services. It's a tad more complicated than Postman, but as a command line tool, it is sometimes the best choice for testing purposes.

Mischief Managed

At this point, I have covered all that I want to say for a Web services primer. If you've read this far, I hope you walk away from this article with these four concepts:

  1. Web services allow clients (e.g. SIP telephones) to access services (e.g. PPM) in a loosely connected manner.
  2. Web services are built on the Web protocols HTTP and HTTPS.
  3. There is no limit to the kinds of interfaces that Web services can facilitate. Communications systems, social media platforms, retail services, and contact centers all offer Web services. And the list goes on and on.
  4. The two predominate ways of implementing Web services are SOAP and REST. SOAP got there first, but REST has the wind in its favor.

That's enough for now. I hope this furthers your knowledge of all that goes into unified communications. Clearly, it's not just SIP and RTP.

Andrew Prokop writes about all things unified communications on his popular blog, SIP Adventures.

Follow Andrew Prokop on Twitter and LinkedIn!
@ajprokop
Andrew Prokop on LinkedIn





COMMENTS



April 19, 2017

Now more than ever, enterprise contact centers have a unique opportunity to lead the way towards complete, digital transformation. Moving your contact center to the cloud is a starting point, quick

April 5, 2017

Its no secret that the cloud offers significant benefits to enterprises - including cost reduction, scalability, higher efficiency, and more flexibility. If your phone system and contact center are

March 22, 2017

As today's competitive business environments push workforces into overdrive, many enterprises are seeking ways of streamlining workflows while optimizing productivity, business agility, and speed.

April 20, 2017
Robin Gareiss, president of Nemertes Research, shares insight gleaned from the firm's 12th annual UCC Total Cost of Operations study.
March 23, 2017
Tim Banting, of Current Analysis, gives us a peek into what the next three years will bring in advance of his Enterprise Connect session exploring the question: Will there be a new model for enterpris....
March 15, 2017
Andrew Prokop, communications evangelist with Arrow Systems Integration, discusses the evolving role of the all-important session border controller.
March 9, 2017
Organizer Alan Quayle gives us the lowdown on programmable communications and all you need to know about participating in this pre-Enterprise Connect hackathon.
March 3, 2017
From protecting against new vulnerabilities to keeping security assessments up to date, security consultant Mark Collier shares tips on how best to protect your UC systems.
February 24, 2017
UC analyst Blair Pleasant sorts through the myriad cloud architectural models underlying UCaaS and CCaaS offerings, and explains why knowing the differences matter.
February 17, 2017
From the most basics of basics to the hidden gotchas, UC consultant Melissa Swartz helps demystify the complex world of SIP trunking.
February 7, 2017
UC&C consultant Kevin Kieller, a partner at enableUC, shares pointers for making the right architectural choices for your Skype for Business deployment.
February 1, 2017
Elka Popova, a Frost & Sullivan program director, shares a status report on the UCaaS market today and offers her perspective on what large enterprises need before committing to UC in the cloud.
January 26, 2017
Andrew Davis, co-founder of Wainhouse Research and chair of the Video track at Enterprise Connect 2017, sorts through the myriad cloud video service options and shares how to tell if your choice is en....
January 23, 2017
Sheila McGee-Smith, Contact Center/Customer Experience track chair for Enterprise Connect 2017, tells us what we need to know about the role cloud software is playing in contact centers today.