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

Reply via email to