DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • MuleSoft Integrate With ServiceNow
  • Demystifying APIs for Product Managers
  • Update User Details in API Test Client Using REST Assured [Video]
  • Create User API Test Client With REST Assured [Video]

Trending

  • The 4 R’s of Pipeline Reliability: Designing Data Systems That Last
  • AI's Dilemma: When to Retrain and When to Unlearn?
  • Unlocking AI Coding Assistants Part 2: Generating Code
  • Breaking Bottlenecks: Applying the Theory of Constraints to Software Development
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. How to Expose a WSDL Service (SOAP) as REST API

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

Want to learn how to expose a WSDL Service as a REST API? Here's a quick guide to quickly connecting enterprise data sources with a REST API.

By 
Max Katz user avatar
Max Katz
·
Jan. 17, 16 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
24.5K Views

Join the DZone community and get the full member experience.

Join For Free

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

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 set up 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 PMSetting 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 PMTesting the API serviceIn 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.

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.

API REST Web Protocols SOAP

Published at DZone with permission of Max Katz, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • MuleSoft Integrate With ServiceNow
  • Demystifying APIs for Product Managers
  • Update User Details in API Test Client Using REST Assured [Video]
  • Create User API Test Client With REST Assured [Video]

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!