new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "outSequence")); if (outSequenceElement != null) { proxy.setTargetInLineOutSequence(mediatorFactory .createAnonymousSequence(outSequenceElement, properties));
mediatorFactory.createAnonymousSequence(outSequenceElement, properties); outSequenceMediator.setSequenceType(SequenceType.PROXY_OUTSEQ); proxy.setTargetInLineOutSequence(outSequenceMediator);
public void testDebugManagerProcessCommandSetBreakPointProxyInSequence() throws Exception { ProxyService ps = new ProxyService("test_proxy_1"); TestMediator in1 = new TestMediator(); TestMediator in2 = new TestMediator(); TestMediator in3 = new TestMediator(); SequenceMediator inSeq = new SequenceMediator(); inSeq.addChild(in1); inSeq.addChild(in2); inSeq.addChild(in3); TestMediator out1 = new TestMediator(); TestMediator out2 = new TestMediator(); TestMediator out3 = new TestMediator(); SequenceMediator outSeq = new SequenceMediator(); outSeq.addChild(out1); outSeq.addChild(out2); outSeq.addChild(out3); ps.setTargetInLineInSequence(inSeq); ps.setTargetInLineOutSequence(inSeq); synConfig.addProxyService(ps.getName(), ps); String debug_command = "{\"command\":\"set\",\"command-argument\":\"breakpoint\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_1\",\"sequence-type\":\"proxy_inseq\",\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); assertTrue(((AbstractMediator) ps.getTargetInLineInSequence().getChild(0)).isBreakPoint()); }
/** * Tests starting a proxy service with correct axis configuration provided. * * @throws Exception if an exception occurs while configuring the axis configuration */ public void testStart() throws Exception { String proxyServiceName = "TestStartProxy"; SynapseConfiguration synCfg = new SynapseConfiguration(); AxisConfiguration axisCfg = new AxisConfiguration(); SynapseEnvironment synEnv = new Axis2SynapseEnvironment(new ConfigurationContext(axisCfg), synCfg); axisCfg.addParameter(SynapseConstants.SYNAPSE_ENV, synEnv); synCfg.setAxisConfiguration(axisCfg); ProxyService proxyService = new ProxyService(proxyServiceName); AxisService axisServiceForActivation = new AxisService(); axisServiceForActivation.setName(proxyServiceName); axisCfg.addToAllServicesMap(axisServiceForActivation); proxyService.setTargetInLineInSequence(new SequenceMediator()); proxyService.setTargetInLineOutSequence(new SequenceMediator()); proxyService.setTargetInLineFaultSequence(new SequenceMediator()); proxyService.start(synCfg); Assert.assertTrue("Underlying Axis service is not activated", axisServiceForActivation.isActive()); Assert.assertTrue("Proxy service is not running", proxyService.isRunning()); proxyService.stop(synCfg); }
public void testDebugManagerProcessCommandSetSkipProxyInSequence() throws Exception { ProxyService ps = new ProxyService("test_proxy_5"); TestMediator in1 = new TestMediator(); TestMediator in2 = new TestMediator(); TestMediator in3 = new TestMediator(); SequenceMediator inSeq = new SequenceMediator(); inSeq.addChild(in1); inSeq.addChild(in2); inSeq.addChild(in3); TestMediator out1 = new TestMediator(); TestMediator out2 = new TestMediator(); TestMediator out3 = new TestMediator(); SequenceMediator outSeq = new SequenceMediator(); outSeq.addChild(out1); outSeq.addChild(out2); outSeq.addChild(out3); ps.setTargetInLineInSequence(inSeq); ps.setTargetInLineOutSequence(inSeq); synConfig.addProxyService(ps.getName(), ps); String debug_command = "{\"command\":\"set\",\"command-argument\":\"skip\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_5\",\"sequence-type\":\"proxy_inseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); assertTrue(((AbstractMediator) ps.getTargetInLineInSequence().getChild(0)).isSkipEnabled()); }
public void testDebugManagerProcessCommandSetSkipProxyOutSequence() throws Exception { ProxyService ps = new ProxyService("test_proxy_6"); TestMediator in1 = new TestMediator(); TestMediator in2 = new TestMediator(); TestMediator in3 = new TestMediator(); SequenceMediator inSeq = new SequenceMediator(); inSeq.addChild(in1); inSeq.addChild(in2); inSeq.addChild(in3); TestMediator out1 = new TestMediator(); TestMediator out2 = new TestMediator(); TestMediator out3 = new TestMediator(); SequenceMediator outSeq = new SequenceMediator(); outSeq.addChild(out1); outSeq.addChild(out2); outSeq.addChild(out3); ps.setTargetInLineInSequence(inSeq); ps.setTargetInLineOutSequence(inSeq); synConfig.addProxyService(ps.getName(), ps); String debug_command = "{\"command\":\"set\",\"command-argument\":\"skip\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_6\",\"sequence-type\":\"proxy_outseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); assertTrue(((AbstractMediator) ps.getTargetInLineOutSequence().getChild(0)).isSkipEnabled()); }
public void testDebugManagerProcessCommandSetBreakPointProxyOutSequence() throws Exception { ProxyService ps = new ProxyService("test_proxy_2"); TestMediator in1 = new TestMediator(); TestMediator in2 = new TestMediator(); TestMediator in3 = new TestMediator(); SequenceMediator inSeq = new SequenceMediator(); inSeq.addChild(in1); inSeq.addChild(in2); inSeq.addChild(in3); TestMediator out1 = new TestMediator(); TestMediator out2 = new TestMediator(); TestMediator out3 = new TestMediator(); SequenceMediator outSeq = new SequenceMediator(); outSeq.addChild(out1); outSeq.addChild(out2); outSeq.addChild(out3); ps.setTargetInLineInSequence(inSeq); ps.setTargetInLineOutSequence(inSeq); synConfig.addProxyService(ps.getName(), ps); String debug_command = "{\"command\":\"set\",\"command-argument\":\"breakpoint\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_2\",\"sequence-type\":\"proxy_outseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); assertTrue(((AbstractMediator) ps.getTargetInLineOutSequence().getChild(0)).isBreakPoint()); }
public void testDebugManagerProcessCommandClearSkipProxyInSequence() throws Exception { ProxyService ps = new ProxyService("test_proxy_7"); TestMediator in1 = new TestMediator(); TestMediator in2 = new TestMediator(); TestMediator in3 = new TestMediator(); SequenceMediator inSeq = new SequenceMediator(); inSeq.addChild(in1); inSeq.addChild(in2); inSeq.addChild(in3); TestMediator out1 = new TestMediator(); TestMediator out2 = new TestMediator(); TestMediator out3 = new TestMediator(); SequenceMediator outSeq = new SequenceMediator(); outSeq.addChild(out1); outSeq.addChild(out2); outSeq.addChild(out3); ps.setTargetInLineInSequence(inSeq); ps.setTargetInLineOutSequence(inSeq); synConfig.addProxyService(ps.getName(), ps); String debug_command = "{\"command\":\"set\",\"command-argument\":\"skip\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_7\",\"sequence-type\":\"proxy_inseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); debug_command = "{\"command\":\"clear\",\"command-argument\":\"skip\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_7\",\"sequence-type\":\"proxy_inseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); assertTrue(!((AbstractMediator) ps.getTargetInLineInSequence().getChild(0)).isSkipEnabled()); }
public void testDebugManagerProcessCommandClearBreakPointProxyInSequence() throws Exception { ProxyService ps = new ProxyService("test_proxy_3"); TestMediator in1 = new TestMediator(); TestMediator in2 = new TestMediator(); TestMediator in3 = new TestMediator(); SequenceMediator inSeq = new SequenceMediator(); inSeq.addChild(in1); inSeq.addChild(in2); inSeq.addChild(in3); TestMediator out1 = new TestMediator(); TestMediator out2 = new TestMediator(); TestMediator out3 = new TestMediator(); SequenceMediator outSeq = new SequenceMediator(); outSeq.addChild(out1); outSeq.addChild(out2); outSeq.addChild(out3); ps.setTargetInLineInSequence(inSeq); ps.setTargetInLineOutSequence(inSeq); synConfig.addProxyService(ps.getName(), ps); String debug_command = "{\"command\":\"set\",\"command-argument\":\"breakpoint\"," + "\"mediation-component\":\"sequence\",\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_3\"," + "\"sequence-type\":\"proxy_inseq\",\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); debug_command = "{\"command\":\"clear\",\"command-argument\":\"breakpoint\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_3\"," + "\"sequence-type\":\"proxy_inseq\",\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); assertTrue(!((AbstractMediator) ps.getTargetInLineInSequence().getChild(0)).isBreakPoint()); }
public void testDebugManagerProcessCommandClearBreakPointProxyOutSequence() throws Exception { ProxyService ps = new ProxyService("test_proxy_4"); TestMediator in1 = new TestMediator(); TestMediator in2 = new TestMediator(); TestMediator in3 = new TestMediator(); SequenceMediator inSeq = new SequenceMediator(); inSeq.addChild(in1); inSeq.addChild(in2); inSeq.addChild(in3); TestMediator out1 = new TestMediator(); TestMediator out2 = new TestMediator(); TestMediator out3 = new TestMediator(); SequenceMediator outSeq = new SequenceMediator(); outSeq.addChild(out1); outSeq.addChild(out2); outSeq.addChild(out3); ps.setTargetInLineInSequence(inSeq); ps.setTargetInLineOutSequence(inSeq); synConfig.addProxyService(ps.getName(), ps); String debug_command = "{\"command\":\"set\",\"command-argument\":\"breakpoint\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_4\",\"sequence-type\":\"proxy_outseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); debug_command = "{\"command\":\"clear\",\"command-argument\":\"breakpoint\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_4\",\"sequence-type\":\"proxy_outseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); assertTrue(!((AbstractMediator) ps.getTargetInLineOutSequence().getChild(0)).isBreakPoint()); }
public void testDebugManagerProcessCommandClearSkipProxyOutSequence() throws Exception { ProxyService ps = new ProxyService("test_proxy_8"); TestMediator in1 = new TestMediator(); TestMediator in2 = new TestMediator(); TestMediator in3 = new TestMediator(); SequenceMediator inSeq = new SequenceMediator(); inSeq.addChild(in1); inSeq.addChild(in2); inSeq.addChild(in3); TestMediator out1 = new TestMediator(); TestMediator out2 = new TestMediator(); TestMediator out3 = new TestMediator(); SequenceMediator outSeq = new SequenceMediator(); outSeq.addChild(out1); outSeq.addChild(out2); outSeq.addChild(out3); ps.setTargetInLineInSequence(inSeq); ps.setTargetInLineOutSequence(inSeq); synConfig.addProxyService(ps.getName(), ps); String debug_command = "{\"command\":\"set\",\"command-argument\":\"skip\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_8\",\"sequence-type\":\"proxy_outseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); debug_command = "{\"command\":\"clear\",\"command-argument\":\"skip\",\"mediation-component\":\"sequence\"," + "\"sequence\":{\"proxy\":{\"proxy-key\":\"test_proxy_8\",\"sequence-type\":\"proxy_outseq\"," + "\"mediator-position\":\"0\"}}}"; dm.processDebugCommand(debug_command); assertTrue(!((AbstractMediator) ps.getTargetInLineOutSequence().getChild(0)).isSkipEnabled()); }