You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2009/10/27 22:04:54 UTC
svn commit: r830339 [2/2] - in /tuscany/java/sca:
modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/
modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/
modules/contribution/src/main/java/org/apache/tuscany/s...
Modified: tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/remote-service/calculator-service-descriptions.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/remote-service/calculator-service-descriptions.xml?rev=830339&r1=830338&r2=830339&view=diff
==============================================================================
--- tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/remote-service/calculator-service-descriptions.xml (original)
+++ tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/remote-service/calculator-service-descriptions.xml Tue Oct 27 21:04:51 2009
@@ -24,58 +24,38 @@
<!-- Describe a remote OSGi service -->
<service-description>
<provide interface="calculator.dosgi.operations.AddService" />
- <property name="service.exported.intents">sca:SOAP sca:HTTP</property>
- <property name="service.exported.configs">sca</property>
- <property name="sca.componentType">
- OSGI-INF/sca/bundle.componentType
- </property>
+ <property name="remote.exported.intents"></property>
+ <property name="remote.configs.supported">org.osgi.sca</property>
<property name="sca.reference">
addService
</property>
- <bindings>
- <tuscany:binding.rmi uri="rmi://localhost:8085/AddService" />
- </bindings>
+ <property name="org.osgi.sca.bindings">{http://sample}Add</property>
</service-description>
<service-description>
<provide interface="calculator.dosgi.operations.SubtractService" />
- <property name="service.exported.intents">sca:SOAP sca:HTTP</property>
- <property name="service.exported.configs">sca</property>
- <property name="sca.componentType">
- OSGI-INF/sca/bundle.componentType
- </property>
+ <property name="remote.exported.intents"></property>
+ <property name="remote.configs.supported">org.osgi.sca</property>
<property name="sca.reference">
subtractService
</property>
- <bindings>
- <tuscany:binding.rmi uri="rmi://localhost:8085/SubtractService" />
- </bindings>
+ <property name="org.osgi.sca.bindings">{http://sample}Subtract</property>
</service-description>
<service-description>
<provide interface="calculator.dosgi.operations.MultiplyService" />
- <property name="service.exported.intents">sca:SOAP sca:HTTP</property>
- <property name="service.exported.configs">sca</property>
- <property name="sca.componentType">
- OSGI-INF/sca/bundle.componentType
- </property>
+ <property name="remote.exported.intents"></property>
+ <property name="remote.configs.supported">org.osgi.sca</property>
<property name="sca.reference">
multiplyService
</property>
- <bindings>
- <tuscany:binding.rmi uri="rmi://localhost:8085/MultiplyService" />
- </bindings>
+ <property name="org.osgi.sca.bindings">{http://sample}Multiply</property>
</service-description>
<service-description>
<provide interface="calculator.dosgi.operations.DivideService" />
- <property name="service.exported.intents">sca:SOAP sca:HTTP</property>
- <property name="service.exported.configs">sca</property>
- <property name="sca.componentType">
- OSGI-INF/sca/bundle.componentType
- </property>
+ <property name="remote.exported.intents"></property>
+ <property name="remote.configs.supported">org.osgi.sca</property>
<property name="sca.reference">
divideService
</property>
- <bindings>
- <tuscany:binding.rmi uri="rmi://localhost:8085/DivideService" />
- </bindings>
+ <property name="org.osgi.sca.bindings">{http://sample}Divide</property>
</service-description>
</service-descriptions>
\ No newline at end of file
Added: tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/sca-config/calculator-config.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/sca-config/calculator-config.xml?rev=830339&view=auto
==============================================================================
--- tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/sca-config/calculator-config.xml (added)
+++ tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/sca-config/calculator-config.xml Tue Oct 27 21:04:51 2009
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+-->
+<scact:sca-config targetNamespace="http://sample"
+ xmlns:scact="http://www.osgi.org/xmlns/scact/v1.0.0"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+ <sca:binding.ws name="Calculator" uri="http://localhost:8086/CalculatorService"/>
+
+ <!-- bindings for the remote services -->
+ <tuscany:binding.rmi name="Add" uri="rmi://localhost:8085/AddService"/>
+ <tuscany:binding.rmi name="Divide" uri="rmi://localhost:8085/DivideService"/>
+ <tuscany:binding.rmi name="Subtract" uri="rmi://localhost:8085/SubtractService"/>
+ <tuscany:binding.rmi name="Multiply" uri="rmi://localhost:8085/MultiplyService"/>
+</scact:sca-config>
+
\ No newline at end of file
Propchange: tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/sca-config/calculator-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tuscany/java/sca/samples/dosgi-dynamic-calculator/OSGI-INF/sca-config/calculator-config.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: tuscany/java/sca/samples/dosgi-dynamic-calculator/src/main/java/calculator/dosgi/impl/CalculatorActivator.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/dosgi-dynamic-calculator/src/main/java/calculator/dosgi/impl/CalculatorActivator.java?rev=830339&r1=830338&r2=830339&view=diff
==============================================================================
--- tuscany/java/sca/samples/dosgi-dynamic-calculator/src/main/java/calculator/dosgi/impl/CalculatorActivator.java (original)
+++ tuscany/java/sca/samples/dosgi-dynamic-calculator/src/main/java/calculator/dosgi/impl/CalculatorActivator.java Tue Oct 27 21:04:51 2009
@@ -60,7 +60,7 @@
props.put("sca.service", "CalculatorComponent#service-name(Calculator)");
props.put("calculator", "Calculator");
props.put("service.exported.configs", new String[] {"org.osgi.sca"});
- props.put("sca.bindings", new String[] {"OSGI-INF/sca/calculator-service.bindings"});
+ props.put("org.osgi.sca.bindings", new String[] {"{http://sample}Calculator"});
props.put("service.exported.interfaces", new String[] {"*"});
logger.info("Registering " + CalculatorService.class.getName());
CalculatorService calculator = new CalculatorServiceImpl(context);