Blog Feed Post

How to Expose a WSDL Service (SOAP) as REST API

Screen Shot 2016-01-11 at 4.04.07 PM.png

API Express visual editor

Appery.io API Express make it fast and simple to connect to an enterprise data source and expose it via a REST API. With API Express you can quickly create an API for:

  • Relational database.
  • WSDL service (SOAP).
  • REST API. Connecting to an existing REST API allows you to apply logic to the response. For example, you can filter the result and only return the data needed to the client.

In this tutorial I’m going to show how to expose an existing WSDL service as a REST API and then build a mobile using the API.

The WSDL service you are going to use allows to convert temperature. You can convert Fahrenheit to Celsius (and Celsius to Fahrenheit). You can find service description here.

  1. In Appery.io, click on API Express tab.
  2. Click Create new project. Name the project TempConvert and click Create. A blank API Express project is now created.
  3. To expose a WSDL service via a REST API you are going to use a visual service editor. To launch the visual editor click new service link.
    Screen Shot 2016-01-08 at 4.10.15 PM

    API Express visual editor for services

    Every service has input (top circle) and service output (bottom circle). On the left-hand side are various components you can drag and drop into the flow.

  4. You need to use the SOAP component. Select the SOAP component and drag and drop it inside the box in the flow

    Screen Shot 2016-01-08 at 4.13.53 PM

    SOAP component

  5. Select the SOAP component and enter this URL http://www.w3schools.com/xml/tempconvert.asmx?WSDL for WSDL URL in Properties.
  6. Click Retrieve link to learn about this service.
  7. After a few seconds, open Service list and select TempConvert.
  8. For Port select TempConvertSoap12 option.
  9. For Operation select FahrenheitToCelsius. Once you make this selection the Request XSL will be automatically loaded.
  10. In the Request XSL input scroll the response until you see this line:
  11. Replace the ? with <xsl:value-of select=”AE/PARAMS/QUERY/temperature”/>. It should look like this:
       <xsl:value-of select=”AE/PARAMS/QUERY/temperature”/>

The temperature to convert will be entered as the input to the service.  It will then be passed to the SOAP service. There is just one more thing to do and that’s to setup the service to accept one input parameter: temperature.

  1. Select the input component (top circle)
  2. For URI template enter tempconvert.
  3. With the input component still selected, under QUERY PARAMETERS section, add temperature parameter with String type.

    Screen Shot 2016-01-08 at 4.33.43 PM

    Setting service input

  4. You are done. Click Save. You will go back to main API page.

Now it’s time to test the API service you just created.

  1. From the main API page, click test link
  2. Enter a temperature  to convert and click the Test button
    Screen Shot 2016-01-11 at 1.34.35 PM

    Testing the API service

    In the above screenshot the service is tested with 98 Fahrenheit.

You can also copy the service URL and test it right in the browser (paste the URL into the address location) or using your favorite REST API client.

Screen Shot 2016-01-11 at 1.40.15 PM

Testing directly in the browser

Now that you have exposed a WSDL service as a REST API, it’s fast to build an Ionic mobile app that looks like this:

Screen Shot 2016-01-11 at 2.02.22 PM

To summarize, you have seen how fast it is to take a WSDL service and expose it via REST API. Once any data source is exposed via a REST API, it’s fast to build a mobile front end to the service. Want to try this yourself? Sign up for an Appery.io account and build your first app.

Read the original blog entry...

More Stories By Max Katz

Max Katz heads Developer Relations for Appery.io, a cloud-based mobile app platform. He loves trying out new and cool REST APIs in mobile apps. Max is the author of two books “Practical RichFaces” (Apress 2008, 2011), DZone MVB (Most Valuable Blogger), and is a frequent speaker at developer conferences. You can find out what Max is up to on his blog: http://maxkatz.org and Twitter: @maxkatz.

Latest Stories
"This week we're really focusing on scalability, asset preservation and how do you back up to the cloud and in the cloud with object storage, which is really a new way of attacking dealing with your file, your blocked data, where you put it and how you access it," stated Jeff Greenwald, Senior Director of Market Development at HGST, in this SYS-CON.tv interview at 18th Cloud Expo, held June 7-9, 2016, at the Javits Center in New York City, NY.
Enterprise architects are increasingly adopting multi-cloud strategies as they seek to utilize existing data center assets, leverage the advantages of cloud computing and avoid cloud vendor lock-in. This requires a globally aware traffic management strategy that can monitor infrastructure health across data centers and end-user experience globally, while responding to control changes and system specification at the speed of today’s DevOps teams. In his session at 20th Cloud Expo, Josh Gray, Chie...
FinTechs use the cloud to operate at the speed and scale of digital financial activity, but are often hindered by the complexity of managing security and compliance in the cloud. In his session at 20th Cloud Expo, Sesh Murthy, co-founder and CTO of Cloud Raxak, showed how proactive and automated cloud security enables FinTechs to leverage the cloud to achieve their business goals. Through business-driven cloud security, FinTechs can speed time-to-market, diminish risk and costs, maintain continu...
Docker containers have brought great opportunities to shorten the deployment process through continuous integration and the delivery of applications and microservices. This applies equally to enterprise data centers as well as the cloud. In his session at 20th Cloud Expo, Jari Kolehmainen, founder and CTO of Kontena, discussed solutions and benefits of a deeply integrated deployment pipeline using technologies such as container management platforms, Docker containers, and the drone.io Cl tool. H...
Kubernetes is a new and revolutionary open-sourced system for managing containers across multiple hosts in a cluster. Ansible is a simple IT automation tool for just about any requirement for reproducible environments. In his session at @DevOpsSummit at 18th Cloud Expo, Patrick Galbraith, a principal engineer at HPE, discussed how to build a fully functional Kubernetes cluster on a number of virtual machines or bare-metal hosts. Also included will be a brief demonstration of running a Galera MyS...
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
Amazon started as an online bookseller 20 years ago. Since then, it has evolved into a technology juggernaut that has disrupted multiple markets and industries and touches many aspects of our lives. It is a relentless technology and business model innovator driving disruption throughout numerous ecosystems. Amazon’s AWS revenues alone are approaching $16B a year making it one of the largest IT companies in the world. With dominant offerings in Cloud, IoT, eCommerce, Big Data, AI, Digital Assista...
"We work around really protecting the confidentiality of information, and by doing so we've developed implementations of encryption through a patented process that is known as superencipherment," explained Richard Blech, CEO of Secure Channels Inc., 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.
In his session at Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, presented a success story of an entrepreneur who has both suffered through and benefited from offshore development across multiple businesses: The smart choice, or how to select the right offshore development partner Warning signs, or how to minimize chances of making the wrong choice Collaboration, or how to establish the most effective work processes Budget control, or how to maximize project result...
The Founder of NostaLab and a member of the Google Health Advisory Board, John is a unique combination of strategic thinker, marketer and entrepreneur. His career was built on the "science of advertising" combining strategy, creativity and marketing for industry-leading results. Combined with his ability to communicate complicated scientific concepts in a way that consumers and scientists alike can appreciate, John is a sought-after speaker for conferences on the forefront of healthcare science,...
In his keynote at 19th Cloud Expo, Sheng Liang, co-founder and CEO of Rancher Labs, discussed the technological advances and new business opportunities created by the rapid adoption of containers. With the success of Amazon Web Services (AWS) and various open source technologies used to build private clouds, cloud computing has become an essential component of IT strategy. However, users continue to face challenges in implementing clouds, as older technologies evolve and newer ones like Docker c...
In IT, we sometimes coin terms for things before we know exactly what they are and how they’ll be used. The resulting terms may capture a common set of aspirations and goals – as “cloud” did broadly for on-demand, self-service, and flexible computing. But such a term can also lump together diverse and even competing practices, technologies, and priorities to the point where important distinctions are glossed over and lost.
When shopping for a new data processing platform for IoT solutions, many development teams want to be able to test-drive options before making a choice. Yet when evaluating an IoT solution, it’s simply not feasible to do so at scale with physical devices. Building a sensor simulator is the next best choice; however, generating a realistic simulation at very high TPS with ease of configurability is a formidable challenge. When dealing with multiple application or transport protocols, you would be...
As organizations shift towards IT-as-a-service models, the need for managing and protecting data residing across physical, virtual, and now cloud environments grows with it. Commvault can ensure protection, access and E-Discovery of your data – whether in a private cloud, a Service Provider delivered public cloud, or a hybrid cloud environment – across the heterogeneous enterprise. In his general session at 18th Cloud Expo, Randy De Meno, Chief Technologist - Windows Products and Microsoft Part...
Personalization has long been the holy grail of marketing. Simply stated, communicate the most relevant offer to the right person and you will increase sales. To achieve this, you must understand the individual. Consequently, digital marketers developed many ways to gather and leverage customer information to deliver targeted experiences. In his session at @ThingsExpo, Lou Casal, Founder and Principal Consultant at Practicala, discussed how the Internet of Things (IoT) has accelerated our abilit...