[snip]
Jean-Sebastien Delfino wrote:
I uploaded an updatesite for the plugins. To try it do the following:

1. In Eclipse, select Help / Software Updates / Find and Install / Search for new features to install.

2. Add a new Remote Site, http://people.apache.org/~jsdelfino/tuscany/tools/updatesite.

3. Select and install the Tuscany feature, it contains the Tuscany and all dependency JARs, about 40Mb.

After restarting your workbench Tuscany should be installed. You can now try this:

1. Create a new Java project, add the Tuscany User Library to it.

2. Create a new hello.Hello interface, add the SCA @Remotable annotation to it, and a method to say hello.

3. Create a new hello.HelloImpl class, implementing the Hello interface.

4. Create a new src/Hello.composite file, the XML editor will open.

5. In the editor, write:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";>
</composite>

I committed an update of the plugin adding wizards to create new .composite and .componentType files containing a skeleton <composite> or <componentType> element.

Steps 4 + 5 are now simpler:

Select New / Other / Tuscany / Composite. In the wizard's file name field, type Hello.composite. Press Enter

A new Hello.composite file is created, containing:

<composite    xmlns="http://www.osoa.org/xmlns/sca/1.0";
           xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0";
           xmlns:c="http://Hello";
           name="Hello">

</composite>


6. From now on you can use code assist to write your composite, declare your Hello component and configure it with a Web Service binding:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
   name="Hello"
   targetNamespace="http://hello";>

   <component name="Hello">
       <implementation.java class="hello.HelloImpl"/>
       <service name="Hello">
           <binding.ws/>
       </service>
   </component>
</composite>

7. You're now ready to run your composite. Right click Hello.composite, select Run As / Tuscany. You should see the following in the console view:
Tuscany starting...
Composite: Hello.composite
Sep 24, 2007 10:00:14 AM org.apache.tuscany.sca.node.impl.SCANodeImpl init INFO: Domain node will be started stand-alone as node and domain URIs are not provided
Sep 24, 2007 10:00:17 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
... more Tomcat info and warning messages
Sep 24, 2007 10:00:18 AM org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping
INFO: Added Servlet mapping: http://localhost:8085/Hello
Ready...
Press enter to shutdown

8 At this point your Hello service component is up and running. Point your browser to http://localhost:8085/Hello?wsdl. You should get the WSDL generated for the Hello service.

9 Use whatever Web Service tool you want to talk to the Hello service. If you have Eclipse WTP you can save the WSDL in another project, right-click on it and select Web Services / Test with Web Services Explorer.

A Test project created following these steps is available at http://people.apache.org/~jsdelfino/tuscany/tools/Test.zip

Let me know what you think.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to