summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-02-09 17:46:50 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-02-09 17:46:50 +0000
commit59412d176cd4e7950cb48e48580a6de6fb8fec70 (patch)
tree2b41f3020605fe14c7ec709aa9b241dfcd8c7d0d /sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding
parenta9891d03be69d7daab14d273f3209c178fcb086e (diff)
TUSCANY-4011 - stop the SCDL callback binding configuration from being overwritten. The JMS binding strangely relied on this so required some surgery. I've also simplified CallbackServiceReference and added a CALLBACK message header and CallbackHandler object to make is simpler to pass the callback address down the message chain. The existing approach of creating a CallbackEndpoint model is still supported at the moment.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1242412 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding')
-rw-r--r--sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java b/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java
index a8980c8031..d5cfbb9c0e 100644
--- a/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java
@@ -22,13 +22,22 @@ package org.apache.tuscany.sca.binding.ws.launcher.axis2;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.Reference;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.binding.ws.jaxws.external.client.HelloWorldClientLauncher;
import org.apache.tuscany.sca.binding.ws.jaxws.external.service.HelloWorldServiceLauncher;
import org.apache.tuscany.sca.binding.ws.jaxws.sca.Bar;
import org.apache.tuscany.sca.binding.ws.jaxws.sca.Foo;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.policy.PolicySubject;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
@@ -71,6 +80,7 @@ public class CallbackFullSpecTestCase {
@Test
public void testGetGreetings() throws Exception {
assertEquals("Hello Fred", externalClient.getGreetings("Fred"));
+ assertEquals("Hello Fred", externalClient.getGreetings("Fred"));
}
@Test
@@ -101,6 +111,18 @@ public class CallbackFullSpecTestCase {
assertTrue(f2.getBars().get(2).isB().booleanValue());
}
+ @Test
+ public void testCallbackBindingConfig() throws Exception {
+ Component helloWorldCallbackServiceComponent = ((NodeImpl)node).getDomainComposite().getComponent("HelloWorldCallbackService");
+ Service helloWorldService = helloWorldCallbackServiceComponent.getService("HelloWorldCallbackService");
+ Reference callbackReference = ((RuntimeComponentService)helloWorldService).getCallbackReference();
+ for (EndpointReference epr : callbackReference.getEndpointReferences()){
+ Binding callbackBinding = epr.getBinding();
+ assertEquals(WebServiceBinding.TYPE, callbackBinding.getType());
+ assertEquals(1, ((PolicySubject)callbackBinding).getPolicySets().size());
+ }
+ }
+
@After
public void tearDown() throws Exception {
node.stop();