Click here to close now.

Welcome!

Microservices Journal Authors: AppDynamics Blog, Liz McMillan, John Wetherill, Roger Strukhoff, Pat Romanski

Blog Feed Post

Orchestration of a JSON API with a SOAP Web Service using the Axway/Vordel API Server

A frequent question about the Axway/Vordel API Server is "Is it possible to orchestrate multiple calls to different APIs or Web Services?". The answer is "Yes", and in this blog I'll show how. Along the way, we'll see how to configure JSON Path on the API Server.

For my worked example, I'm using a weather-lookup scenario. It's now Spring in Boston, and I'm interested in finding out the temperature using the API Server. Yahoo provides a great Weather API to retrieve weather information using REST and JSON. Unfortunately though, it returns the temperature in Fahrenheit and I'm more familiar with Celsius. So, I want to take the temperature from the Yahoo output, and feed this as input to the W3 Schools Fahrenheit-to-Celsius conversion Web Service. This means that I'm orchestrating to calls, one to a REST JSON API and the other to a SOAP Web Service.

Breaking down the steps, this means:

Step 1) The API Server receives a HTTP GET request containing a zip code as a parameter, like this: http://API-Server/orchestration?zip=02110

Step 2) The API Server first makes an API call for this zipcode's weather to Yahoo's Weather API, which returns the weather info as JSON

Step 3) We then extract the temperature from the Yahoo JSON response, and use this to construct a SOAP request to the W3 Schools Fahrenheit-to-Celsius conversion Web Service.

Step 4) Finally, we return the temperature info, converted to Celsius, to the client.

To achieve this, we use a circuit on the API Server, which I show in its entirety below:


Let's look at the steps in detail. Each of the blocks in the circuit is called a "filter". Let's look at what each filter does

1) Extract REST Request Attributes. This filter takes the items from the HTTP request and converts them to variables (which we call "Attributes"). When I call the API Server with a request in the browser like http://API-Server/orchestration?zip=02110 , the value "02110" is put into the attribute ${http.querystring.zip}

2) Set HTTP Verb to GET. This is a "Set HTTP Verb" filter which sets the HTTP Verb to "GET", as shown below:



I am setting the verb to GET because we need to do a GET request to Yahoo's REST Weather API.

3) Call Yahoo Weather API. This is a "Connect to URL" filter, which is configured to pass the zipcode which we've read from the querystring using the Extract REST Request Attributes filter earlier. Notice the zipcode underlined below in red:


4) Read temperature using JSON Path. After we call the Yahoo API, we have the weather response as JSON. I used the excellent online JSON Path Evaluator to construct the JSON Path to read the temperature from the Yahoo response into an Attribute called "temperature":


5) Create temperature lookup request. The next step is to use a "Set Message" filter to take the temperature from the Yahoo JSON response (which we've just read using JSON Path) and place it into a SOAP request to the Fahrenheit-Celsius conversion Web Service, as shown below:



6) Set HTTP Verb to POST. This is another "Set HTTP Verb" filter, this time setting the verb to "POST" because we are about to POST our new SOAP request to the W3 Schools Web Service.



7) Connect to Temperature Conversion Service. This is a "Connect to URL" filter, which contains the URL we want to POST to.


8) Retrieve Celsius temp from message. This is a "Retrieve from Message" filter which uses XPath to read the Celsius value from the SOAP response. To use the XPath Wizard, click on the little magic wand icon, and open a stored example of the SOAP response. I show the configuration for this below:


9) Return Response. This is a "Set Message" filter, and you can see it takes the ${temperature} attribute from the XPath in Step 8, with the Zipcode we read from the Query-String in Step 1:



I wire up the circuit to a path of "/orchestration", like so:


This means that whenever a request comes in to "/orchestration", my circuit is run.

I can call circuit simply from a browser like so:


You can see it's just over 8C in Boston right now. Balmy, compared to a couple of weeks ago.

Using the Vordel Manager on port 8090 of an API Server instance, I can see each request go through, and click on "Show" buttons to see the actual messages and response.


You can see above that there are three request-response pairs:

1) From the Browser to the API Server
2) From the API Server to the Yahoo REST/JSON Weather API
3) From the API Server to the W3 Schools SOAP Web Service to convert from Fahrenheit to Celsius.

So, what we've seen here is that you can orchestrate two requests, one to a REST API and another to a SOAP Web Service, using the Axway/Vordel API Server. Note that the second request overwrites the initial response (if you want to keep a copy of the first response, use a "Store" filter and then use "Restore" to restore the message later).

For more info about the Axway/Vordel API Server, email [email protected]

Read the original blog entry...

More Stories By Mark O'Neill

Mark O'Neill is VP Innovation at Axway - API and Identity. Previously he was CTO and co-founder at Vordel, which was acquired by Axway. A regular speaker at industry conferences and a contributor to SOA World Magazine and Cloud Computing Journal, Mark holds a degree in mathematics and psychology from Trinity College Dublin and graduate qualifications in neural network programming from Oxford University.

@MicroservicesExpo Stories
SYS-CON Events announced today that Cloudian, Inc., the leading provider of hybrid cloud storage solutions, will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Cloudian, Inc., is a Foster City, California - based software company specializing in cloud storage software. The main product is Cloudian, an Amazon S3-compliant cloud object storage platform, the bedrock of cloud computing systems, that enables c...
This is my first blog post at AppDynamics, and I have to say that it’s great to be aboard. It’s been a hectic first couple of weeks, but the energy, enthusiasm and friendliness of everyone I have met has made me very excited about 2015! AppDynamics has a market leading APM and analytics platform but it also takes great people to make a great company – and AppDynamics has a wealth of talent! So to start my blogging life at AppDynamics I want to focus on something that is a red-hot buzzword in IT...
Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities. Accordingly, attendees at the upcoming 16th Cloud Expo at the Javits Center in New York June 9-11 will find fresh new content in a new track called PaaS | Containers & Microservices Containers are not being considered for the first time by the cloud community, but a current era of re-consideration has pushed them to the top of the cloud agenda. With the launch ...
While DevOps most critically and famously fosters collaboration, communication, and integration through cultural change, culture is more of an output than an input. In order to actively drive cultural evolution, organizations must make substantial organizational and process changes, and adopt new technologies, to encourage a DevOps culture. Moderated by Andi Mann, panelists will discuss how to balance these three pillars of DevOps, where to focus attention (and resources), where organizations m...
of cloud, colocation, managed services and disaster recovery solutions, will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. TierPoint, LLC, is a leading national provider of information technology and data center services, including cloud, colocation, disaster recovery and managed IT services, with corporate headquarters in St. Louis, MO. TierPoint was formed through the strategic combination of some of t...
SYS-CON Events announced today that Column Technologies, a global technology solutions company, will exhibit at SYS-CON's DevOps Summit 2015 New York, which will take place June 9-11, 2015, at the Javits Center in New York City, NY. Established in 1998, Column Technologies is a leader in application performance and infrastructure management for commercial and federal markets. The company is headquartered in the United States, with a diverse and talented team of more than 350 employees around th...
SYS-CON Events announced today that Ciqada will exhibit at SYS-CON's @ThingsExpo, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Ciqada™ makes it easy to connect your products to the Internet. By integrating key components - hardware, servers, dashboards, and mobile apps - into an easy-to-use, configurable system, your products can quickly and securely join the internet of things. With remote monitoring, control, and alert messaging capability, you will mee...
I woke up this morning to the devastating news about the earthquake in Nepal. Sitting here in California that destruction is literally on the other side of the world but my mind immediately went to thinking about my good friend Jeremy Geelan. See Jeremy and his family have been living in Kathmandu for a while now. His wife, in fact, is the Danish Ambassador to Nepal!
Public Cloud IaaS started it's life in the developer and startup communities and has grown rapidly to a $20B+ industry, but it still pales in comparison to how much is spent worldwide on IT: $3.6 trillion. In fact, there are 8.6 million data centers worldwide, the reality is many small and medium sized business have server closets and colocation footprints filled with servers and storage gear. While on-premise environment virtualization may have peaked at 75%, the Public Cloud has lagged in ado...
Dave will share his insights on how Internet of Things for Enterprises are transforming and making more productive and efficient operations and maintenance (O&M) procedures in the cleantech industry and beyond. Speaker Bio: Dave Landa is chief operating officer of Cybozu Corp (kintone US). Based in the San Francisco Bay Area, Dave has been on the forefront of the Cloud revolution driving strategic business development on the executive teams of multiple leading Software as a Services (SaaS) ap...
The 5th International DevOps Summit, co-located with 17th International Cloud Expo – being held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the...
Microsoft is releasing in the near future Azure Service Fabric as a preview beta. Azure Service Fabric is built to run microservices - a complex application consisting of smaller, interlocked components that enables updating components without disrupting service. Microsoft has used this over the past few years internally for many of its own applications and the new release is for general use, a new product. OSIsoft is an early adopter of this system and run with it to expand into the explo...
ProfitBricks, the provider of painless cloud infrastructure IaaS, today released its SDK for Ruby, written against the company's new RESTful API. The new SDK joins ProfitBricks' previously announced support for the popular multi-cloud open-source Fog project. This new Ruby SDK, which exposes advanced functionality to take advantage of ProfitBricks' simplicity and productivity, aligns with ProfitBricks' mission to provide a painless way to automate infrastructure in the cloud. Ruby is a genera...
This digest provides an overview of good resources that are well worth reading. We’ll be updating this page as new content becomes available, so I suggest you bookmark it. Also, expect more digests to come on different topics that make all of our IT-hearts go boom!
79% of new products miss their launch date. That was the conclusion of a CGT/Sopheon Survey in which the impact of such market misses were also explored. What it didn't dig into was the reason why so many products and projects miss their launch date. When we start digging into the details with respect to applications, we can find at least one causal factor in the delivery process, specifically that portion which focuses on the actual move into production, from which consumers (internal and...
This is a no-hype, pragmatic post about why I think you should consider architecting your next project the way SOA and/or microservices suggest. No matter if it’s a greenfield approach or if you’re in dire need of refactoring. Please note: considering still keeps open the option of not taking that approach. After reading this, you will have a better idea about whether building multiple small components instead of a single, large component makes sense for your project. This post assumes that you...
DevOps tasked with driving success in the cloud need a solution to efficiently leverage multiple clouds while avoiding cloud lock-in. Flexiant today announces the commercial availability of Flexiant Concerto. With Flexiant Concerto, DevOps have cloud freedom to automate the build, deployment and operations of applications consistently across multiple clouds. Concerto is available through four disruptive pricing models aimed to deliver multi-cloud at a price point everyone can afford.
The 17th International Cloud Expo has announced that its Call for Papers is open. 17th International Cloud Expo, to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, APM, APIs, Microservices, Security, Big Data, Internet of Things, DevOps and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding bu...
There is no quick way to learn Jython API but to experiment with it. The easiest way is to start with Jytutor extension for XL Deploy. Now you can also use the code snippet for exposing jython/python context in XL Deploy environment by running it directly in Jytutor Here’s how you can go ahead with that Download the Jytutor extension referring to the Jytutor Blog or from the following link https://github.com/xebialabs-community/xld-jytutor-plugin/releases Shutdown your XL Deploy server...
ProfitBricks has launched its new DevOps Central and REST API, along with support for three multi-cloud libraries and a Python SDK. This, combined with its already existing SOAP API and its new RESTful API, moves ProfitBricks into a position to better serve the DevOps community and provide the ability to automate cloud infrastructure in a multi-cloud world. Following this momentum, ProfitBricks has also introduced several libraries that enable developers to use their favorite language to code ...