Hi All, I'm very new to SCA and TUCANY.Here we are in the process of creating a POC for Tuscany - Spring web application. My target is to create SCA-Componets using Spring and invoke them from a simple JSP. Now, we are able make calls from our jsp to SCA-Components, but we are facing some issue with accessing Composite Services from jsp. Please have a look the code snippets.
WEB-INF/budget.composite ------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" targetNamespace="http://tcc/budget" name="BudgetComposite"> <sca:service name="BudgetSCAService" promote= "BudgetSpringComponent"> <sca:interface.java interface="com.tcc.BudgetDataService" /> </sca:service> <sca:component name="BudgetSpringComponent"> <implementation.spring location= "budget-spring-context.xml" /> </sca:component> </composite> META-INF/sca-contribution.xml ------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:budget="http://tcc/budget"> <deployable composite="budget:BudgetComposite"/> </contribution> budget-spring-context.xml --------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sca="http://www.springframework.org/schema/sca" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd"> <sca:service name="BudgetSpringService" type="com.tcc.BudgetDataService" target="budgetDataServiceBean"/> <bean id="budgetDataServiceBean" class= "com.tcc.budget.BudgetDataServiceImpl"/> </beans> JSP Client ---------------- <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> <sca:reference name="BudgetSpringComponent" type= "com.tcc.budget.BudgetDataService" /> <%= BudgetSpringComponent.init()%> The init method will just print a Hello World :). Now my issue is how can I make a call to "BudgetSCAService" which is Composite Service declared in my budget.composite,whether I'm missing something? Please guide us to solve this issue. Thanks in advance Best Regards San DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."
