Hi.

The Eclipse SCA Tools provide some features to allow you to simply call a web service in an SCA application.
It does not work with specific message structures, but your case seems pretty simple and it should work without any problem.

Basically, it generates you a WS client and then cleans up the code to remove all the unrequired elements.
This approach has already been tested with Tuscany 1.4 and it was even part of the SOA tutorial that was presented last week at EclipseCON.

You can find an example on the SCA Tools wiki [0].
The tutorial itself is available here [1]. Check the pages 9 and 10 in particular.

It shows in details how you can call a web service from an SCA application in few clicks (no need to create another SCA application).
There will be another tutorial soon on the STP wiki, to show how you can use JAX-B for more complex referenced web services.

Regards,

                    Vincent Zurczak.



[0] : http://wiki.eclipse.org/STP/SCA_Component
[1] : http://wiki.eclipse.org/images/7/72/EclipseCON_2009_SOA_Tutorial_Toward---SCA.pdf




santiago.ara...@telvent.com a écrit :

I have running Calculator sample included in apache-tuscany-sca-all-2.0-M1. I have added a new component to this composite service. This is called GetPersonaService. It only has a method "getPersona" that returns an object "Person". It is a complex type with three attributes , age, name, height.  I am publishing this component with my CalculatorService like Web Service.



    <component name="CalculatorServiceComponent">
                <implementation.java class="com.telvent.tuscany.server.CalculatorServiceImpl"/>
               
        <service name="CalculatorService">
            <binding.ws uri="http://localhost:8085/CalculatorServiceComponent"/>
        </service>
         <reference name="getPersonaService" target="GetPersonaServiceComponent"/>      
     </component>


    <component name="GetPersonaServiceComponent">
        <implementation.java class="com.telvent.tuscany.server.GetPersonaServiceImpl"/>
    </component>
...

I have done another little SCA application that is connecting to Web Service and using its funcionality. It works. I mean I can access to "getPersona" method through its WebService. Problem is client application need to know Persona class. It is necessary to have a copy of "Person.java" in the new bundle.

    <component name="CalculatorClient">
                <implementation.java class="com.telvent.tuscany.server.CalculatorClient"/>
        <reference name="calculatorService">
                <binding.ws uri="http://localhost:8085/CalculatorServiceComponent"/>
        </reference>
    </component>


But I want to connect to the Web service using a little client application that is not SCA. I mean it  haven´t developed using Tuscany. I followed this Steps.

* I ran SCA CalculatorService.
* I stored generated WSDL .
* I am trying generate client code using WSDL2Java but I obtain this error --> org.apache.axis2.SchemaCompiler findClassName.  Type persona missing!

When I run this client (with this autogenerated code) I can acess to methods that return primitive types values (int, double... add method for example). But the getPersona method that return a complex type Person is not working. I have seen that autogenerated code does not contain code for recovering of age, name, height attributes.

What can I do?

Thanks in advance

Un saludo.
Santiago Miguel Aranda Rojas
Telvent Interactiva
Extension: 35999


-- 
Vincent Zurczak
EBM WebSourcing
+33 (0) 4 38 12 16 77


Reply via email to