Hi,

You need to write a composite file to declare the component. Please see an 
example at:

https://svn.apache.org/repos/asf/tuscany/java/sca/samples/helloworld-ws-service

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"; 
targetNamespace="http://helloworld"; name="helloworldws">


<component name="HelloWorldServiceComponent">

    <implementation.java class="helloworld.HelloWorldImpl" />

    <service name="HelloWorldService">

        <binding.ws uri="http://localhost:8085/HelloWorldService"/>

    </service>

</component>


</composite>

In the sample above, we expose the HelloWorldServiceComponent as a web service.

If you want to consume SCA services from outside the SCA domain, you 
probably need to access the services using the protocols used for the 
bindings. For example, use web services to access a SCA service configured 
with binding.ws.

If the client code is in the same address space as the node, you can use 
org.apache.tuscany.sca.host.embedded.SCADomain.getService(cls, serviceName) to 
get a proxy representing the service.

Thanks,
Raymond


From: Adriana Verdejo 
Sent: Wednesday, July 02, 2008 1:19 AM
To: [email protected] 
Subject: Module or composite file? / Using SCA components from non SCA clients


Dear all

I am new using Tuscany. I would like to provide a remotable service in the Java 
language and publish it to remote clients over SOAP. I have the code ready, 
with my interfaces and implementations and I would like to use SCA for 
providing the service. 

I have added the correspondent annotations (@Remotable in the interfaces and 
@Service in the implementations), I underdstand I have to also generate the 
.composite file but from different sources/samples I have seen I should 
generate a .module file or a .composite file. Which is right? And where should 
it be located?

How do I know all is right?

Finally, how I should use my service from a non SCA client?

Thanks in advance and best regards,

Adriana

Reply via email to