I hope that worked - i've tried to attached and uploaded - however there
no real indication of success.
just incase heres the copies of simplest version (all at top level /src
) (project called demoV1SCA in eclipse)
demoSCA.composite :
<?xml version="1.0" encoding="UTF-8"?>
<sca:composite xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="demoSCA"
targetNamespace="http://will.org/demoSCA">
<sca:component name="HelloWorldComponent">
<sca:implementation.java class="HelloWorldImpl"/>
<sca:service name="HelloWorld"/>
</sca:component>
<sca:service name="HelloWorld" promote="HelloWorldComponent/HelloWorld"/>
</sca:composite>
client to start the test demoV1Main.java
import org.apache.tuscany.sca.host.embedded.SCADomain;
public class demoV1Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
//create new Tuscany node
System.out.println("starting new domain\n");
// Locate the service using SCA APIs
SCADomain domain = SCADomain.newInstance("demoSCA.composite");
System.out.println("lookup service\n");
HelloWorld hello = domain.getService(HelloWorld.class,
"HelloWorld");
// Calculate
System.out.println("say " + hello.helloWorld());
try
{
System.in.read();
} catch (Exception e)
{
System.exit(0);
}
SCADomain.removeInstance(domain);
}
}
HelloWorld.java - interface spec import org.osoa.sca.annotations.*;
@Remotable
public interface HelloWorld {
String helloWorld ();
}
HelloWorldImpl.java - component implementation
import org.osoa.sca.annotations.*;
@Service (HelloWorld.class)
@Scope ("COMPOSITE")
public class HelloWorldImpl implements HelloWorld
{
public String helloWorld ()
{
return "hello William";
}
}
classpath setting in gallileo eclipse project
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="
org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte
rnal.debug.ui.launcher.StandardVMType/JavaSE-1.6 "/>
<classpathentry kind="lib" path="
C:/eclipse/eclipse/plugins/org.eclipse.stp.sca.osoa.java_2.0
.0.200906170710.jar "/>
<classpathentry kind="con"
path="org.eclipse.jdt.USER_LIBRARY/tuscany v1 libs"/>
<classpathentry kind="output" path="bin"/>
</classpath>
help that helps show what i have