axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandika Jayawardana" <jayaw...@gmail.com>
Subject Re: [Axis2] Axis2 Ruby extension
Date Mon, 21 Aug 2006 05:36:17 GMT
Hi Chintana ,
Nice work.
I think it is better to use ServiceClient instead of SoapClient and we used
same kind of API in writing php extension for Axis2C. How does Ruby handle
XML ?
Thanks,
nandika



On 8/21/06, Chintana Wilamuna <chintanaw@gmail.com> wrote:
>
> Hi,
>
> 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
> file.
>
> I was looking for an API and found out that PHP SOAP API
> (http://php.net/soap) to be good enough so I went with that.  However
> the API is far from complete.
>
> So echo client could be written as,
>
> myClient = Axis::SoapClient.new
> 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,
>         "http://ws.apache.org/axis2/c/samples/echoString")
>
> 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)
>
> Bye,
>
>     -Chintana
>
> --
> http://www.linux.lk/~chintana/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

Mime
View raw message