summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/contrib/modules/binding-foo-runtime
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/contrib/modules/binding-foo-runtime')
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java9
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/runtime/FooServiceBindingProvider.java3
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/binding-foo.xsd1
-rw-r--r--sca-java-2.x/contrib/modules/binding-foo-runtime/src/test/resources/helloworld.composite2
4 files changed, 14 insertions, 1 deletions
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java
index 2312901c6c..c51413df88 100644
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java
+++ b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/FooBinding.java
@@ -33,6 +33,15 @@ public class FooBinding implements Binding {
private String name;
private String uri;
+ private String bindingType;
+
+ public String getBindingType() {
+ return bindingType;
+ }
+
+ public void setBindingType(String bindingType) {
+ this.bindingType = bindingType;
+ }
public String getName() {
return name;
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/runtime/FooServiceBindingProvider.java b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/runtime/FooServiceBindingProvider.java
index a31e7f850b..bace3efc6b 100644
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/runtime/FooServiceBindingProvider.java
+++ b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/java/org/apache/tuscany/sca/binding/foo/runtime/FooServiceBindingProvider.java
@@ -19,6 +19,7 @@
package org.apache.tuscany.sca.binding.foo.runtime;
+import org.apache.tuscany.sca.binding.foo.FooBinding;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
@@ -37,6 +38,8 @@ public class FooServiceBindingProvider implements ServiceBindingProvider {
// For this sample we'll just share it in a static
FooStash.addService(endpoint.getBinding().getURI(), new FooServiceInvoker(endpoint));
+
+ System.out.println("bindingType=" + ((FooBinding)endpoint.getBinding()).getBindingType());
}
public void stop() {
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/binding-foo.xsd b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/binding-foo.xsd
index a57baf9930..9322aabd6d 100644
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/binding-foo.xsd
+++ b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/main/resources/binding-foo.xsd
@@ -35,6 +35,7 @@
maxOccurs="unbounded"/>
</sequence -->
<!-- anyAttribute namespace="##other" processContents="lax"/-->
+ <attribute name="bindingType" type="string" use="optional"/>
</extension>
</complexContent>
</complexType>
diff --git a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/test/resources/helloworld.composite b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/test/resources/helloworld.composite
index 237273b4f2..e2de4e9528 100644
--- a/sca-java-2.x/contrib/modules/binding-foo-runtime/src/test/resources/helloworld.composite
+++ b/sca-java-2.x/contrib/modules/binding-foo-runtime/src/test/resources/helloworld.composite
@@ -25,7 +25,7 @@
<component name="HelloWorldComponent">
<implementation.java class="helloworld.HelloWorldImpl"/>
<service name="HelloWorldService" >
- <tuscany:binding.foo />
+ <tuscany:binding.foo bindingType="ws" />
</service>
</component>