axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chintana Wilamuna" <>
Subject [Axis2] Axis2 Ruby extension
Date Mon, 21 Aug 2006 05:20:52 GMT

I'm trying to build a Ruby module for doing web services using
Axis2/C.  My approach is to build a one-to-one mapping to the Axis2/C
functions from Ruby and abstract it a bit more to create a more high
level API.  I've come to a stage where I could write the echo client
program using my wrapper.

I used SWIG to generate it and I believe that this could be used to
generate the wrappers for Python, Perl and a host of other languages
that SWIG has support for, without changing my existing SWIG interface

I was looking for an API and found out that PHP SOAP API
( to be good enough so I went with that.  However
the API is far from complete.

So echo client could be written as,

myClient =
myClient.__call("echoString", "echo5")

Currently I have the address where the service reside, hard coded but
I'm on my way to parameterize all the items and implement other
functions.  Here's an exerpt from the low level Axis2/C functions
invoked from Ruby,

env = AxisC.axis2_env_create_all("echo.log", AxisC::AXIS2_LOG_LEVEL_TRACE)

address = "http://localhost:9090/axis2/services/echo"

endpoint_ref = AxisC.axis2_endpoint_ref_create(env, address)

options = AxisC.axis2_options_create(env)

AxisC.axis2_options_set_to(options, env, endpoint_ref)

AxisC.axis2_options_set_action(options, env,

What I did was to write another module 'Axis' ('AxisC' is for low
level functions) encapsulating all the low level functions providing
the functions which exactly look like the PHP SOAP API.  This could
easily be changed to anything.

My previous approach was to use Ruby/DLX which is mighty elegant in
it's own right to make a wrapper but it does have some problems with
forward delcarations and function pointers (however Marcel is doing a
fantastic job of getting those to work in the 0.9.x branch)




To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message