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 profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

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]

developerWorks Community:

  • Close [x]

Developing web services, Part 3: File uploading web service built with Apache CFX

Kuntal Ganguly (kuntalganguly86@gmail.com), Jr. Developer, Protech Infosystems Pvt. Ltd
Kuntal Ganguly
Currently associated as a Junior Developer at Protech Infosystems Pvt. Ltd, Kolkata. Kuntal has expertise in using a wide range of open source and commercial tools (WAS CE, Eclipse, Mule ESB, EZlegacy , Active MQ , Birt , and DB2 express C) and technologies(GWT and Android).
Partha Goswami (partha.ext@gmail.com), Jr. Developer, Protech Infosystems Pvt. Ltd
Partha Goswami
Currently associated as a Junior Developer at Protech Infosystems Pvt. Ltd, Kolkata. Has expertise in using a wide range of open source and commercial tools (WASCE, Eclipse, Mule ESB, EZlegacy , Active MQ , Birt , and DB2 express C) and technologies(GWT and RSS).

Summary:  This tutorial demonstrates how to develop a CXF web service which can upload a submitted file from the user and store it in a specific directory. The example is built with widely used Eclipse IDE.

View more content in this series

Date:  17 Jun 2011
Level:  Intermediate

Activity:  43051 views
Comments:  

Introduction

What is a web service?

A web service is a network accessible interface to application functionality, built using standard Internet technologies.

The fundamental concept behind web services is the SOA (service-oriented architecture), where an application is no longer a large monolithic program, but is divided into smaller, loosely coupled programs, and provided services are loosely coupled together with standardized and well-defined interfaces. These loosely coupled programs make the architecture very extensible, as it acquires the ability to add or remove services with limited costs. Therefore, new services can be created by combining and reusing existing services.

Because of the abstraction provided by the standards-based interfaces, it does not matter whether the application services are written in Java and the browser written in C++, or the application services deployed on a UNIX box while the browser is deployed on Windows. Web services allow for cross-platform interoperability in a way that makes the platform irrelevant. Interoperability is one of the key benefits gained from implementing web services. See the basic web service architecture shown in figure A.


Figure 1. The web service architecture
The web service architecture

In the web services architecture, the service provider publishes a description of the service(s) it offers via the service registry. The service consumer searches the service registry to find a service that meets their needs. The service consumer could be a person or a program.

The service provider offers business processes in the form of services. The services offered by the provider are called by the consumer to achieve certain sets of business goals. The process of services being provided and consumed is achieved by using directory services that lie between the provider and the consumer, in the form of broker. The service to be made available to the consumer is published to the directory services in the broker. The consumer wanting to achieve the set of business goal(s) will discover the service from the broker. If the service is found, it will bind to the service and execute the processing logic.


What is CXF?

Apache CXF is an open source framework that provides a robust infrastructure for conveniently building and developing web services. It lets you create high-performance and extensible services, which you can deploy in the Tomcat and Spring-based lightweight containers as well as on a more advanced server infrastructure, such as JBoss, IBM® WebSphere®, or Oracle WebLogic.

CXF provides you with many options to build services. CXF support all three major types of services:

  • SOAP - this page summarizes the options for creating SOAP services.
  • REST-ful - REST support
  • CORBA

2 of 7 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and web services
ArticleID=680526
TutorialTitle=Developing web services, Part 3: File uploading web service built with Apache CFX
publish-date=06172011
author1-email=kuntalganguly86@gmail.com
author1-email-cc=
author2-email=partha.ext@gmail.com
author2-email-cc=