public static InboundEndpoint defineInboundEndpoint(SynapseConfiguration config, OMElement elem, Properties properties) { InboundEndpoint inboundEndpoint = null; try { inboundEndpoint = InboundEndpointFactory.createInboundEndpoint(elem, config); config.addInboundEndpoint(inboundEndpoint.getName(), inboundEndpoint); } catch (Exception e) { String msg = "Inbound Endpoint configuration cannot be built"; handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_INBOUND_ENDPOINT, msg, e); } return inboundEndpoint; }
public void testCreateInboundEPWithEmptyName() throws Exception { ep = factory.createInboundEndpoint(AXIOMUtil.stringToOM(sampleEP4), config); Assert.assertNotNull("Serialized endpoint with empty name is null", ep); Assert.assertEquals(ep.getName().isEmpty(), true); }
public void testCreateValidInboundEP() throws Exception { ep = factory.createInboundEndpoint(AXIOMUtil.stringToOM(sampleEP), config); Assert.assertNotNull("Inbound Endpoint is null", ep); Assert.assertEquals("Invalid EP name for inbound endpoint", "HttpListenerEP1", ep.getName()); }
public void testCreateInvalidInboundEP() throws Exception { InboundEndpointFactory factory = new InboundEndpointFactory(); try { ep = factory.createInboundEndpoint(AXIOMUtil.stringToOM(invalidSampleEP), config); Assert.fail("Expected exception is not thrown for invalid inbound EP"); } catch (SynapseException e) { Assert.assertEquals(e.getMessage().contains("Inbound Endpoint name cannot be null"), true); } } }
public void testSerializeInboundEP() throws Exception { ep = factory.createInboundEndpoint(AXIOMUtil.stringToOM(sampleEP2), config); OMElement elm = serializer.serializeInboundEndpoint(ep); Assert.assertNotNull("Serialized endpoint is null", elm); Assert.assertEquals("Invalid EP name for serialized inbound endpoint", "HttpListenerEP2", ep.getName()); }
InboundEndpoint inboundEndpoint = InboundEndpointFactory.createInboundEndpoint(artifactConfig, getSynapseConfiguration()); if (inboundEndpoint != null) { inboundEndpoint.setArtifactContainerName(customLogContent);
public void testSerializeInboundEPWithParent() throws Exception { ep = factory.createInboundEndpoint(AXIOMUtil.stringToOM(sampleEP3), config); OMElement elm2 = serializer.serializeInboundEndpoint(AXIOMUtil.stringToOM(parentElm), ep); Assert.assertNotNull("Serialized endpoint with parent is null", elm2); Assert.assertEquals("Invalid EP name for serialized inbound endpoint", "HttpListenerEP3", ep.getName()); }
InboundEndpoint inboundEndpoint = InboundEndpointFactory.createInboundEndpoint(artifactConfig, getSynapseConfiguration());