You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Heshan Suri <he...@gmail.com> on 2007/10/05 15:35:21 UTC

Python message receiver for Axis2/Java

>
> Hi,
>  I am working on writing a message receiver for Axis2/Java to support Web
> services,
>  written in python. I hope to use Jython to execute the Python service. I
> am really grateful if someone can give some suggestions on this.


Thanks in advance,
-Heshan

Re: Python message receiver for Axis2/Java

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Great! We have a Javascript (Rhino) receiver and also a BSF one .. one 
option is to get Jython to work thru the BSF receiver.

Sanjiva.

Heshan Suri wrote:
>     Hi,
>      I am working on writing a message receiver for Axis2/Java to
>     support Web services,
>      written in python. I hope to use Jython to execute the Python
>     service. I am really grateful if someone can give some suggestions
>     on this.
> 
> 
> Thanks in advance,
> -Heshan

-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Python message receiver for Axis2/Java

Posted by Saliya Ekanayake <es...@gmail.com>.
Hi,

Python services would be cool !

I worked on the particular  JavaScript messageReceiver with Rhino. So here
goes few tips to start with.

1. Write Java code using Jython to execute a python script containing just a
function.
    (You can pass a string into the function and return a string too)

2. Extend the AbstractInOutMessageReceiver class and implement
invokeBusinessLogic(MessageContext
inMessage, MessageContext outMessage) method. You can simply implement a
test version by just returning the in coming payload as the body of the out
going message

Then modify your message receiver to execute the python service with the in
coming payload and returning the result as the body of the out going message
(yea you would need to do few modifications :)).


Good luck with the project
--Saliya
On 10/5/07, Heshan Suri <he...@gmail.com> wrote:
>
> Hi,
> >  I am working on writing a message receiver for Axis2/Java to support
> > Web services,
> >  written in python. I hope to use Jython to execute the Python service.
> > I am really grateful if someone can give some suggestions on this.
>
>
> Thanks in advance,
> -Heshan
>



-- 
Saliya Ekanayake
http://www.esaliya.blogspot.com
http://www.esaliya.wordpress.com

Re: Python message receiver for Axis2/Java

Posted by keith chapman <ke...@gmail.com>.
Hi Heshan,

We have done something similar to what you are trying to do. We at WSO2 have
written a messageReceiver to support web services written in JavaScript
which is executed via Rhino.  Its in the wsf Javascript (Web services
framework for javaScript) project. The project is open source and hence you
can have a look at our code. Here is the URL to the svn
http://wso2.org/repos/wso2/trunk/wsf/javascript/rhino/

Thanks,
Keith.

On 10/5/07, Heshan Suri <he...@gmail.com> wrote:
>
> Hi,
> >  I am working on writing a message receiver for Axis2/Java to support
> > Web services,
> >  written in python. I hope to use Jython to execute the Python service.
> > I am really grateful if someone can give some suggestions on this.
>
>
> Thanks in advance,
> -Heshan
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: Python message receiver for Axis2/Java

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Great! We have a Javascript (Rhino) receiver and also a BSF one .. one 
option is to get Jython to work thru the BSF receiver.

Sanjiva.

Heshan Suri wrote:
>     Hi,
>      I am working on writing a message receiver for Axis2/Java to
>     support Web services,
>      written in python. I hope to use Jython to execute the Python
>     service. I am really grateful if someone can give some suggestions
>     on this.
> 
> 
> Thanks in advance,
> -Heshan

-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Python message receiver for Axis2/Java

Posted by Saliya Ekanayake <es...@gmail.com>.
Hi,

Python services would be cool !

I worked on the particular  JavaScript messageReceiver with Rhino. So here
goes few tips to start with.

1. Write Java code using Jython to execute a python script containing just a
function.
    (You can pass a string into the function and return a string too)

2. Extend the AbstractInOutMessageReceiver class and implement
invokeBusinessLogic(MessageContext
inMessage, MessageContext outMessage) method. You can simply implement a
test version by just returning the in coming payload as the body of the out
going message

Then modify your message receiver to execute the python service with the in
coming payload and returning the result as the body of the out going message
(yea you would need to do few modifications :)).


Good luck with the project
--Saliya
On 10/5/07, Heshan Suri <he...@gmail.com> wrote:
>
> Hi,
> >  I am working on writing a message receiver for Axis2/Java to support
> > Web services,
> >  written in python. I hope to use Jython to execute the Python service.
> > I am really grateful if someone can give some suggestions on this.
>
>
> Thanks in advance,
> -Heshan
>



-- 
Saliya Ekanayake
http://www.esaliya.blogspot.com
http://www.esaliya.wordpress.com