2009/5/21 Sebastián Groh <[email protected]>:
> Hello, I'm trying to work with an SCA Composite that use ws binding.
> My component definition:
>  <sca:component name="BiochemicalCircleComponent">
>    <sca:implementation.java class="services.bcircle.BiochemicalCircleImpl"/>
>    <sca:service name="BiochemicalCircle">
>        <sca:interface.java interface="services.bcircle.BiochemicalCircle"/>
>        <sca:binding.ws uri="http://localhost:8080/SCA1/MyServiceComponent"/>
>    </sca:service>
>  </sca:component>
>
>
>
> The service retrieve a SDO object (Laboratory) that I generated from
> XSD without problems.
> I deployed the project on Apache Tomcat/5.5.27 and I'm using this
> service from a jsp page as follows:
>
> (my includes)
> .
> .
> .
> <% SCADomain scaDomain = 
> SCADomain.newInstance("clinicalLaboratory.composite");
>       BiochemicalCircle service =
> scaDomain.getService(BiochemicalCircle.class,
> "BiochemicalCircleComponent");
>
>        Laboratory lab = (Laboratory) service.getLaboratory("Lab2");
> .
> .  (more logic)
> .
>
> %>
>
>
> In line
>          Laboratory lab = (Laboratory) service.getLaboratory("Lab2");
>
> I have the exception:
>        java.lang.ClassCastException:
> org.apache.tuscany.sdo.impl.AnyTypeDataObjectImpl
>        at $Proxy18.getLaboratory(Unknown Source)
>
> I have also tried to use the class commonj.sdo.helper.HelperContext to
> set a scope for my SDOFactory but I'm having the same exception.
>
> Anyone in this list know to solve this error?
> Regards,
>                Sebastián
>

Hi Sebastien

Is the XSD you generated the SDO from included in your contribution?
I'm looking at the 1.x sample helloworld-ws-sdo-webapp and can't
actually see that the SDO types are specified explicitly but the XSD
used to generate them is included. Any of the SDO experts out there
know how we should be describing the SDO context in SCA?

Simon

Reply via email to