[ 
https://issues.apache.org/jira/browse/TUSCANY-3658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901963#action_12901963
 ] 

Raymond Feng commented on TUSCANY-3658:
---------------------------------------

Based on your SCA composite and Spring XML, now you have an SCA service named 
"userServices" which represent the "userServiceImpl" Spring bean. If DAO is not 
an SCA component, you can use SCA client API to access the userServices, for 
example,

        SCAClientFactory factory = 
SCAClientFactory.newInstance(URI.create("default"));
        IUser user = factory.getService(IUser.class, 
"UserComponent/userServices");

The other way is to add a binding to the userServices so that it can be 
accessed via a protocol such as jsonrpc, REST/HTTP or WS.

> SCA with JSF+Spring+Hibernate webapplication
> --------------------------------------------
>
>                 Key: TUSCANY-3658
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3658
>             Project: Tuscany
>          Issue Type: Test
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: WebApplication using JSF, Spring, Hibernate, Tuscany
>            Reporter: winston antony
>
> I am Implementing SCA in a Spring+JSF+Hibernate webapplication. I have done 
> the below steps to expose the service layer of our aplication as SCA...But 
> there is no help on how to access that SCA service in a controller layer 
> which is nothing but a java class.  the application strucuture is DAO --> 
> service (SCA)  --> Controller (Spring beans) -->....
> 1. Have written  a web.composite under web-inf directory
> <component name="UserComponent">
>         <implementation.spring location="/WEB-INF/applicationContext.xml"/>
>         <service name="userServices">
>             <interface.java interface="com.test.services.user.IUser"/>        
>        
>         </service>
>     </component>
> 2.  In an applicationContext file
> <bean id="userServiceImpl" class="com.test.services.user.impl.UserImpl">
>     </bean>    
>     <sca:service name="userServices"
>         type="com.test.services.user.IUser" target="userServiceImpl"/> 
>         
>     <bean id="userController" class="com.test.controller.user.UserController">
>       <property name="userServices" ref="userServices" />
>     </bean>  
> But it is not able to find the userServices which is an SCA service. how can 
> i access the sca services?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to