Hi Chintana,

You need to do following to deploy a webservice from a scripting language.

1. Need to define a service api from the scripting language
    For example you can decide to expose a functon written in the scripting language as a webservice or a class whose public functions exposed as the websevice
 follwing api is an example written in php code

    function service1()
    {
        /* implementation */
    }       

    $svc = new Axis2Service();
    $svc->addFunction("service1");
    $svc->process();

    ( the api can be expanded to add many more functionality)

2. Identify the existence of the function service1 to make sure
    that user specifed an actually existing function.

3. create a conf_ctx (configuration context ) instance using build_conf_ctx() function.
   need to specify the location of the axis2c repository. It is better if you can retain the conf_ctx
   accross requests.   

4. need to write your own message receiver. Massage receiver is the piece of code that execute the buisness logic.Here you need to call the function in the script that corresponds to the opeation being invoked by passing the xml that is received from soap body. You have access to both in_message_context and out_message_context in message_receiver.
obtain the soap_envelope from the message context.

5. Create a axis2_svc_t struct instance using  axis2_svc_create_with_qname()  function.
   You need to decide what to use as the sevice name, (may be the file name containing the script )
   Idenfity the added functions to the service and create corresponding axis2_op_t struct instances and add them to the axis2_svc_instance.
create your message receiver instance and set it to each operation created using
   AXIS2_OP_SET_MSG_RECV() macro.

when process() function is executed (from above script), add the service to conf (configuratiion ) using  AXIS2_CONF_ADD_SVC() function by obtaining conf from conf_ctx.
       
6  need to write your own transport_out_info file , please refer to apache module of axis2c for an example

7 need to implement a process_request() function , please refer to apache_worker.c
  axis2_apache2_worker_process_request() function.Within this function you need to add the above created svc (service )  instance to message context to bypass dispatchers.

8 Finally get the result soap message from stream and send it back to the client using the transport sender. Here you need to use the scripting language API's http or other transport handling Mechanism.

I suggest you to study how the apache module of axis2c works to better understand how to embed axis2c.

Thanks
nandika

On 8/24/06, Chintana Wilamuna <[EMAIL PROTECTED]> wrote:
Hi,

How can I create a web service from a scripting language and deploy
it?  Since there is no .so involved I don't know how to deploy a
service.  Any pointers would be greatly appreciated.

Thanks,

Bye,

    -Chintana

--
http://www.linux.lk/~chintana/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to