http://www.capescience.com/articles/gsoap/Web Services for C and C++ Applications
Home: Articles: Web Services for C and C++ Applications
Web Services for C and C++ Applications
Darren Barefoot, Technology Evangelist @ CapeScience
These days, it seems like every programming language is getting a Web service
implementation. The languages C and C++ are no exception. Robert van Engelen,
an assistant professor in the Computer Science department at Florida State Uni
versity, has developed gSOAP, an open source set of Web service-enabling tools
for C and C++ applications.
Professor van Engelen began the project three years ago while working on high-
performance systems. "I was looking to integrate several systems running progr
ams written in different languages. Since C, C++, and Fortran are most often u
sed in high-performance computing, I decided to focus on Java, C, and C++ and
use a C-to-Fortran bridge when necessary. Not with SOAP, but our own XML seria
lization format. I adopted SOAP shortly after SOAP 1.1 was published and becam
e interesting." Frustrated by current solutions, van Engelen notes that "I was
also displeased with simple (class) library-based APIs. Writing wrapper code
is the last thing users want to work on."
One important aspect of gSOAP, and Web services in general, is their impact on
grid computing efforts. The concept of computational resource sharing is at t
he center of the Web services paradigm. Professor van Engelen believes grid co
mputing will benefit from Web services where the parties involved have radical
ly different configurations. "The impact in distributed computing between disp
arate parties will be significant. However, some P2P applications such as SETI
@Home won't change either as the single program approach to P2P (single peer p
orted to different platforms) doesn't require SOAP for interoperability."
The C programming language has been around for about 30 years now, so it's onl
y logical that a Web services implementation would emerge. There is a tremendo
us amount of intellectual capital invested in C and C++. Much of this, sooner
or later, will be exposed as Web services. In terms of building on that capita
l, van Engelen cites two important factors: ease-of-use and performance. "Tool
kits must be easy to use and offer more than a simple API. That was one of the
main reasons for building gSOAP. The other reason was performance. I don't be
lieve Java SOAP implementations will ever reach the speed of C/C++ application
s because of Java's fundamental design choices. They might be easier to progra
m though!"
In terms of performance, independent testing proves that while gSOAP may be sl
ower than some specialized SOAP implementations, it leaves other open source p
roducts like Apache Axis in the dust. Unlike these specialized SOAP stacks, gS
OAP is a complete SOAP implementation and therefore takes longer to fully proc
ess a SOAP message at runtime.
The gSOAP team have completed several rounds of interoperability testing on mo
re than 30 SOAP-based products, including Cape Clear's CapeConnect. "The inter
operability tests with CapeConnect fared very well," according to van Engelen.
"Nice work. Even SOAP 1.1 partial arrays are supported and can be exchanged,
unlike in many other toolkits."
For organizations like Adobe Systems and IBM alphaWorks, gSOAP has proven an e
xcellent strategy for developing Web services based on C and C++ applications.
In IBM's case, they've used gSOAP as part of their Web Services Tool Kit for
Mobile Devices. The following are a few highlights from the gSOAP feature list
. For the complete list, go to
http://www.cs.fsu.edu/~engelen/soapfeatures.html.
A unique SOAP-to-C/C++ binding enables gSOAP to provide an automated mapping o
f native C/C++ and user-definedapplication data types to SOAP data types throu
gh the use of compiler technology.
gSOAP includes a true RPC compiler for SOAP that supports application-specific
data types, enabling legacy application integration.
Small memory footprint means that Web services and client executables can be a
s small as 90 KB on Linux with a 150 KB total memory footprint.
Multi-threaded stand-alone SOAP servers: automatic C and/or C++ source code ge
neration for efficient SOAP Web services (gSOAP 2.0 and higher).
Operating systems supported include Windows, UNIX, Linux, Pocket PC, Mac OS X,
and so on.
Integrated WSDL generator for convenient Web Service publishing.
WSDL importer and proxy class generator for automated SOAP client application
development.
Supports HTTPS/SSL for robust security.
Supports HTTP cookies and SOAP headers.
SOAP in DIME attachments are fully automated.
SOAP 1.1 (except SOAP root) and 1.2 compliant.
--
FROM 202.114.1.108