From 200a40b332420f94992eb39a6d0ea1cf1490ffc4 Mon Sep 17 00:00:00 2001 From: coreyg Date: Fri, 21 Nov 2014 09:30:19 +0000 Subject: Adding tuscany's website to their svn repo for svnpubsub git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1640879 13f79535-47bb-0310-9956-ffa450edef68 --- .../site-publish/javascaimplementationscript.html | 136 +++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 site/trunk/site-publish/javascaimplementationscript.html (limited to 'site/trunk/site-publish/javascaimplementationscript.html') diff --git a/site/trunk/site-publish/javascaimplementationscript.html b/site/trunk/site-publish/javascaimplementationscript.html new file mode 100644 index 0000000000..9200c6f453 --- /dev/null +++ b/site/trunk/site-publish/javascaimplementationscript.html @@ -0,0 +1,136 @@ + + + + + + + Java+SCA+implementation.script : Apache Tuscany + + + + + + + + + + + + + +
+ + +   + +
+ + +
+
+ + + + + + + +
+  Apache Tuscany > Java+SCA+implementation.script + + User List | Dev List | Issue Tracker   +
+ + + + + +
+
+ +
+
+ + +
+ + + + +
Development
+ +

<implementation.script>

+ +

The Tuscany Java SCA runtime supports implementing SCA components in a wide variety of dynamic or scripting languages by using the <implementation.script> SCDL extension.

+ +

Any language that supports the "Scripting for Java" APIs defined by JSR-223 is supported, this includes Groovy, JavaScript, JRuby, Jython, and many others.

+ +

To use these languages the SCA assembly SCDL is extended with an "implementation.script" element which has the following options:

+ + +
+
<implementation.script [ script="" | language="" ] >
+     [inline src]
+</implementation.script>
+
+ +

The source code for the script maybe defined in a seperate file pointed to by the 'script=' attribute, or the source code maybe embedded within the SCDL inline inside the <implementation.script> element.

+ +

The 'language=' attribute defines the language of the program. The language attribute is optional when the source code is in a separate file in which case the file extension of the file is used to determine the language.

+ +

Some examples:

+ + +

A Ruby program defined in a file 'myScript.rb' in a folder named 'test':

+ +
+
<implementation.script script="test/myScript.rb"/>
+
+ + +

A JavaScript program defined inline:

+ +
+
<implementation.script language="js">
+      function sayHello(name) {
+         return "Hello " + name;
+      }
+</implementation.script>
+
+ + +

When using inline scripts which contain special characters such as XML markup you may need to enclose the source within a CDATA region, for example:

+ +
+
<implementation.script language="js"><![CDATA[
+      function sayHello(inXML) {
+         return <sayHelloResponse>Hello { inXML..name }</sayHelloResponse>;
+      }
+]]></implementation.script>
+
+ +
+
+
+
+
+ + + + + \ No newline at end of file -- cgit v1.2.3