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 "ant elder (JIRA)" <ji...@apache.org> on 2007/02/18 18:22:05 UTC

[jira] Created: (AXIS2-2211) Support Axis2 services implemented with script langauges invoked by Apache BSF

Support Axis2 services implemented with script langauges invoked by Apache BSF
------------------------------------------------------------------------------

                 Key: AXIS2-2211
                 URL: https://issues.apache.org/jira/browse/AXIS2-2211
             Project: Axis 2.0 (Axis2)
          Issue Type: New Feature
    Affects Versions: nightly
            Reporter: ant elder
             Fix For: nightly
         Attachments: scriptingPatch.txt

This patch adds support for Axis2 services implemented with script langauges. It uses Apache BSF so all script languages supported by BSF may be used. Its based on the same function used in Synapse and Tuscany. 

It supports two was of being used, either using the usual services.xml file with a script MessageReceiver, or as a script Module which monitors a script services directory and hot deploys / hot updates any script put in that directory. 

When using the script MessageReceiver there are two ways of defining the script in the services.xml, either with the script source defined in a seperate file or with the script source defined inline as a parameter value. See the javadoc comment in org.apache.axis2.scripting.ScriptReceiver for more details.

When using the script module scripts currently need to have an associated WSDL file to define the service. The script and wsdl need to have the same name so the two can be linked together. For example, you have scriptServices/stockquote.wsdl and scriptServices/stockquote.js in the Axis2 repository directory then an Axis2 service would be deployed at /axis2/services/stockquote. The script language is determined from the file extension of the script source file. Currently a single script function is called for all service operations, the Axis2 MessageContext is passed into that function decorated with helper methods to access the payload XML in a way appropriate for the script language, for example E4X for JavaScript or ReXML for Ruby. 

I'd like to continue working on this, hopefully with input from you guys. There's a few things that could be reviewed/improved and it needs things like samples and doc. Be really good to get it working with the wso2 axiom e4x impl. I'd also like to extend it to make it easy to implement handlers in script languages. 





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-2211) Support Axis2 services implemented with script langauges invoked by Apache BSF

Posted by "ant elder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder updated AXIS2-2211:
-----------------------------

    Attachment: scriptingPatch.txt

> Support Axis2 services implemented with script langauges invoked by Apache BSF
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-2211
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2211
>             Project: Axis 2.0 (Axis2)
>          Issue Type: New Feature
>    Affects Versions: nightly
>            Reporter: ant elder
>             Fix For: nightly
>
>         Attachments: scriptingPatch.txt
>
>
> This patch adds support for Axis2 services implemented with script langauges. It uses Apache BSF so all script languages supported by BSF may be used. Its based on the same function used in Synapse and Tuscany. 
> It supports two was of being used, either using the usual services.xml file with a script MessageReceiver, or as a script Module which monitors a script services directory and hot deploys / hot updates any script put in that directory. 
> When using the script MessageReceiver there are two ways of defining the script in the services.xml, either with the script source defined in a seperate file or with the script source defined inline as a parameter value. See the javadoc comment in org.apache.axis2.scripting.ScriptReceiver for more details.
> When using the script module scripts currently need to have an associated WSDL file to define the service. The script and wsdl need to have the same name so the two can be linked together. For example, you have scriptServices/stockquote.wsdl and scriptServices/stockquote.js in the Axis2 repository directory then an Axis2 service would be deployed at /axis2/services/stockquote. The script language is determined from the file extension of the script source file. Currently a single script function is called for all service operations, the Axis2 MessageContext is passed into that function decorated with helper methods to access the payload XML in a way appropriate for the script language, for example E4X for JavaScript or ReXML for Ruby. 
> I'd like to continue working on this, hopefully with input from you guys. There's a few things that could be reviewed/improved and it needs things like samples and doc. Be really good to get it working with the wso2 axiom e4x impl. I'd also like to extend it to make it easy to implement handlers in script languages. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-2211) Support Axis2 services implemented with script langauges invoked by Apache BSF

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-2211:
------------------------------------

    Assignee: Thilina Gunarathne

> Support Axis2 services implemented with script langauges invoked by Apache BSF
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-2211
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2211
>             Project: Axis 2.0 (Axis2)
>          Issue Type: New Feature
>    Affects Versions: nightly
>            Reporter: ant elder
>         Assigned To: Thilina Gunarathne
>             Fix For: nightly
>
>         Attachments: scriptingPatch.txt
>
>
> This patch adds support for Axis2 services implemented with script langauges. It uses Apache BSF so all script languages supported by BSF may be used. Its based on the same function used in Synapse and Tuscany. 
> It supports two was of being used, either using the usual services.xml file with a script MessageReceiver, or as a script Module which monitors a script services directory and hot deploys / hot updates any script put in that directory. 
> When using the script MessageReceiver there are two ways of defining the script in the services.xml, either with the script source defined in a seperate file or with the script source defined inline as a parameter value. See the javadoc comment in org.apache.axis2.scripting.ScriptReceiver for more details.
> When using the script module scripts currently need to have an associated WSDL file to define the service. The script and wsdl need to have the same name so the two can be linked together. For example, you have scriptServices/stockquote.wsdl and scriptServices/stockquote.js in the Axis2 repository directory then an Axis2 service would be deployed at /axis2/services/stockquote. The script language is determined from the file extension of the script source file. Currently a single script function is called for all service operations, the Axis2 MessageContext is passed into that function decorated with helper methods to access the payload XML in a way appropriate for the script language, for example E4X for JavaScript or ReXML for Ruby. 
> I'd like to continue working on this, hopefully with input from you guys. There's a few things that could be reviewed/improved and it needs things like samples and doc. Be really good to get it working with the wso2 axiom e4x impl. I'd also like to extend it to make it easy to implement handlers in script languages. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-2211) Support Axis2 services implemented with script langauges invoked by Apache BSF

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilina Gunarathne resolved AXIS2-2211.
---------------------------------------

    Resolution: Fixed

Applied the patch.
http://svn.apache.org/viewvc?view=rev&rev=518956

Thanx Ant...

> Support Axis2 services implemented with script langauges invoked by Apache BSF
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-2211
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2211
>             Project: Axis 2.0 (Axis2)
>          Issue Type: New Feature
>    Affects Versions: nightly
>            Reporter: ant elder
>         Assigned To: Thilina Gunarathne
>             Fix For: nightly
>
>         Attachments: scriptingPatch.txt
>
>
> This patch adds support for Axis2 services implemented with script langauges. It uses Apache BSF so all script languages supported by BSF may be used. Its based on the same function used in Synapse and Tuscany. 
> It supports two was of being used, either using the usual services.xml file with a script MessageReceiver, or as a script Module which monitors a script services directory and hot deploys / hot updates any script put in that directory. 
> When using the script MessageReceiver there are two ways of defining the script in the services.xml, either with the script source defined in a seperate file or with the script source defined inline as a parameter value. See the javadoc comment in org.apache.axis2.scripting.ScriptReceiver for more details.
> When using the script module scripts currently need to have an associated WSDL file to define the service. The script and wsdl need to have the same name so the two can be linked together. For example, you have scriptServices/stockquote.wsdl and scriptServices/stockquote.js in the Axis2 repository directory then an Axis2 service would be deployed at /axis2/services/stockquote. The script language is determined from the file extension of the script source file. Currently a single script function is called for all service operations, the Axis2 MessageContext is passed into that function decorated with helper methods to access the payload XML in a way appropriate for the script language, for example E4X for JavaScript or ReXML for Ruby. 
> I'd like to continue working on this, hopefully with input from you guys. There's a few things that could be reviewed/improved and it needs things like samples and doc. Be really good to get it working with the wso2 axiom e4x impl. I'd also like to extend it to make it easy to implement handlers in script languages. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-2211) Support Axis2 services implemented with script langauges invoked by Apache BSF

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480399 ] 

Thilina Gunarathne commented on AXIS2-2211:
-------------------------------------------

Great stuff Ant... 

How about using the new pluggable deployer architecture to load the services from a script folder rather than using a module to load the services. 
More details about the custom deployers can be found in this thread http://www.mail-archive.com/axis-dev@ws.apache.org/msg27783.html...

You can configure the deployers by adding the mappings to the axis2.xml...
<deployer extension=".js" directory="script_services" class="org.apache.axis2.xxx.xxxx"/>



> Support Axis2 services implemented with script langauges invoked by Apache BSF
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-2211
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2211
>             Project: Axis 2.0 (Axis2)
>          Issue Type: New Feature
>    Affects Versions: nightly
>            Reporter: ant elder
>             Fix For: nightly
>
>         Attachments: scriptingPatch.txt
>
>
> This patch adds support for Axis2 services implemented with script langauges. It uses Apache BSF so all script languages supported by BSF may be used. Its based on the same function used in Synapse and Tuscany. 
> It supports two was of being used, either using the usual services.xml file with a script MessageReceiver, or as a script Module which monitors a script services directory and hot deploys / hot updates any script put in that directory. 
> When using the script MessageReceiver there are two ways of defining the script in the services.xml, either with the script source defined in a seperate file or with the script source defined inline as a parameter value. See the javadoc comment in org.apache.axis2.scripting.ScriptReceiver for more details.
> When using the script module scripts currently need to have an associated WSDL file to define the service. The script and wsdl need to have the same name so the two can be linked together. For example, you have scriptServices/stockquote.wsdl and scriptServices/stockquote.js in the Axis2 repository directory then an Axis2 service would be deployed at /axis2/services/stockquote. The script language is determined from the file extension of the script source file. Currently a single script function is called for all service operations, the Axis2 MessageContext is passed into that function decorated with helper methods to access the payload XML in a way appropriate for the script language, for example E4X for JavaScript or ReXML for Ruby. 
> I'd like to continue working on this, hopefully with input from you guys. There's a few things that could be reviewed/improved and it needs things like samples and doc. Be really good to get it working with the wso2 axiom e4x impl. I'd also like to extend it to make it easy to implement handlers in script languages. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-2211) Support Axis2 services implemented with script langauges invoked by Apache BSF

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481442 ] 

Davanum Srinivas commented on AXIS2-2211:
-----------------------------------------

Thilina,

Can you please pick this up?

thanks,
dims

> Support Axis2 services implemented with script langauges invoked by Apache BSF
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-2211
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2211
>             Project: Axis 2.0 (Axis2)
>          Issue Type: New Feature
>    Affects Versions: nightly
>            Reporter: ant elder
>         Assigned To: Thilina Gunarathne
>             Fix For: nightly
>
>         Attachments: scriptingPatch.txt
>
>
> This patch adds support for Axis2 services implemented with script langauges. It uses Apache BSF so all script languages supported by BSF may be used. Its based on the same function used in Synapse and Tuscany. 
> It supports two was of being used, either using the usual services.xml file with a script MessageReceiver, or as a script Module which monitors a script services directory and hot deploys / hot updates any script put in that directory. 
> When using the script MessageReceiver there are two ways of defining the script in the services.xml, either with the script source defined in a seperate file or with the script source defined inline as a parameter value. See the javadoc comment in org.apache.axis2.scripting.ScriptReceiver for more details.
> When using the script module scripts currently need to have an associated WSDL file to define the service. The script and wsdl need to have the same name so the two can be linked together. For example, you have scriptServices/stockquote.wsdl and scriptServices/stockquote.js in the Axis2 repository directory then an Axis2 service would be deployed at /axis2/services/stockquote. The script language is determined from the file extension of the script source file. Currently a single script function is called for all service operations, the Axis2 MessageContext is passed into that function decorated with helper methods to access the payload XML in a way appropriate for the script language, for example E4X for JavaScript or ReXML for Ruby. 
> I'd like to continue working on this, hopefully with input from you guys. There's a few things that could be reviewed/improved and it needs things like samples and doc. Be really good to get it working with the wso2 axiom e4x impl. I'd also like to extend it to make it easy to implement handlers in script languages. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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