Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Mock Web services with Apache Synapse to develop and test Web services

Do more with Apache Synapse Enterprise Service Bus

Upul Godage (upulgodage@yahoo.com), Senior Software Engineer, WSO2
Upul Godage photo
Upul Godage works as a senior software engineer at WSO2. He's experienced in enterprise Java, SOA, open source technologies, and Linux. He's involved in Apache Web Services Project, Apache Axis2, and Apache Synapse ESB.

Summary:  Apache Synapse is a simple, lightweight, high-performance enterprise service bus (ESB) released under the Apache License, Version 2.0 from the Apache Software Foundation. Using Apache Synapse, you can filter, transform, route, manipulate, and monitor SOAP, binary, XML, and plain text messages that pass through your large-scale enterprise systems by HTTP, HTTPS, Java™ Message Service (JMS), Simple Mail Transfer Protocol (SMTP), Post Office Protocol Version 3 (POP3), FTP, file systems, and many other transport mediums. But for an individual developer, what's the use of an ESB product in your day-to-day life? The simplicity of the configuration, out-of-the-box feature set, extensible architecture, and the minimal footprint makes it a versatile and powerful tool that you can use for a variety of tasks. This article examines how you can use Apache Synapse to create mock Web services.

Date:  01 May 2008
Level:  Intermediate PDF:  A4 and Letter (104 KB | 20 pages)Get Adobe® Reader®

Activity:  22334 views
Comments:  

Before you start

About this tutorial

This tutorial discusses how to create mock Web services using Apache Synapse ESB. The target Web service clients and services can be in any language, such as Microsoft® .NET, Java, or PHP. You work with several samples, starting from the most basic configuration and gradually building more complex solutions to create mock Web services.

Prerequisites

This tutorial is written mainly for Web services developers, so you should have a general familiarity with Web services concepts. Prior knowledge of Apache Synapse is helpful. You should also have at least an elementary knowledge of XSL Transformation (XSLT) and JavaScript code. If this is an unfamiliar area to you, there are many resources on the Web that can provide you with the basic information.

System requirements

Apache Synapse requires JDK 1.5 and can run in Linux®, Microsoft Windows®, and Solaris environments. The memory and disk space requirements are minimal, as you can easily run it on low-end systems without any issues.

In this tutorial, commands and directory names are given in a Linux-compatible format. If your operating system is different, please change the commands and the directory names accordingly. For example, in Windows you have to use the synapse.bat script instead of synapse.sh to start the Synapse instance.

1 of 15 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and Web services, Open source
ArticleID=305878
TutorialTitle=Mock Web services with Apache Synapse to develop and test Web services
publish-date=05012008
author1-email=upulgodage@yahoo.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.