You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Santhosh T R <Sa...@ibsplc.com> on 2009/03/24 16:17:13 UTC
Regarding Accessing Composite Service from a TUSCANY enabled web
application
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."
Re: Axis2 / Tuscany sample
Posted by Raymond Feng <en...@gmail.com>.
Hi,
Tuscany/SCA supports the following through a declarative binding.ws.
1) Access a web service
2) Expose an SCA component as a web service
At this moment, our web service binding is implemented using Axis2. Axis2 is transparent to our users. You don't have to deal with aar or services.xml.
http://tuscany.apache.org/sca-java-bindingws.html
There are a lot of examples in our svn repo or release distro. You can look for the modules with "ws" in the name.
http://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/samples/
Thanks,
Raymond
From: Ali, Haneef
Sent: Tuesday, March 24, 2009 12:16 PM
To: user@tuscany.apache.org
Subject: Axis2 / Tuscany sample
Hi ,
Do you have any sample for Tuscany using Axis2? I have a sample webservice running in Axis2. It uses wsdl first approach and the wsdl is full of complex types. I do have following questions
1) How to port this service to Tuscany? Do I need to change anything in web.xml?
2) Does the aar format used by axis2 still valid in Tuscany?
3) Where should I place my wsdl and axis2 service.xml?
Please point me to any sample do this? Otherwise please let know what is the easiest way to port Axis2 webservice ( which uses user defined wsdl) to Tuscany
Thanks,
Haneef
Axis2 / Tuscany sample
Posted by "Ali, Haneef" <ha...@hp.com>.
Hi ,
Do you have any sample for Tuscany using Axis2? I have a sample webservice running in Axis2. It uses wsdl first approach and the wsdl is full of complex types. I do have following questions
1) How to port this service to Tuscany? Do I need to change anything in web.xml?
2) Does the aar format used by axis2 still valid in Tuscany?
3) Where should I place my wsdl and axis2 service.xml?
Please point me to any sample do this? Otherwise please let know what is the easiest way to port Axis2 webservice ( which uses user defined wsdl) to Tuscany
Thanks,
Haneef