public void init(SynapseEnvironment synapseEnvironment) { ConfigurationContext cc = ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext(); if (!initialized) { // The check for clustering environment ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent(); if (clusteringAgent != null && clusteringAgent.getStateManager() != null) { isClusteringEnabled = Boolean.TRUE; } else { isClusteringEnabled = Boolean.FALSE; } context = new EndpointContext(getName(), getDefinition(), isClusteringEnabled, cc, metricsMBean); } initialized = true; if (children != null) { for (Endpoint e : children) { e.init(synapseEnvironment); } } contentAware = definition != null && ((definition.getFormat() != null && !definition.getFormat().equals(SynapseConstants.FORMAT_REST)) || definition.isSecurityOn() || definition.isAddressingOn()); }
public void init(SynapseEnvironment synapseEnvironment) { ConfigurationContext cc = ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext(); if (!initialized) { // The check for clustering environment ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent(); if (clusteringAgent != null && clusteringAgent.getStateManager() != null) { isClusteringEnabled = Boolean.TRUE; } else { isClusteringEnabled = Boolean.FALSE; } context = new EndpointContext(getName(), getDefinition(), isClusteringEnabled, cc, metricsMBean); } initialized = true; if (children != null) { for (Endpoint e : children) { e.init(synapseEnvironment); } } contentAware = definition != null && ((definition.getFormat() != null && !definition.getFormat().equals(SynapseConstants.FORMAT_REST)) || definition.isSecurityOn() || definition.isReliableMessagingOn() || definition.isAddressingOn() || definition.isUseMTOM()|| definition.isUseSwa()); }
null, configurationContext.getAxisConfiguration(), endpointDefinition.isAddressingOn() | endpointDefinition.isReliableMessagingOn(), endpointDefinition.isReliableMessagingOn(), endpointDefinition.isSecurityOn(),
if (endpointDefinition.isAddressingOn()) { OMElement addressing = fac.createOMElement( "enableAddressing", SynapseConstants.SYNAPSE_OMNAMESPACE);
configurationContext.getAxisConfiguration(), endpointDefinition.isAddressingOn(), endpointDefinition.isSecurityOn(), false); anonymousService.getParent().addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true");
inboundWsSecPolicyKey = endpoint.getInboundWsSecPolicyKey(); outboundWsSecPolicyKey = endpoint.getOutboundWsSecPolicyKey(); wsAddressingEnabled = endpoint.isAddressingOn(); wsAddressingVersion = endpoint.getAddressingVersion();
if (endpointDefinition.isAddressingOn()) { OMElement addressing = fac.createOMElement( "enableAddressing", SynapseConstants.SYNAPSE_OMNAMESPACE);
inboundWsSecPolicyKey = endpoint.getInboundWsSecPolicyKey(); outboundWsSecPolicyKey = endpoint.getOutboundWsSecPolicyKey(); wsAddressingEnabled = endpoint.isAddressingOn(); wsAddressingVersion = endpoint.getAddressingVersion();
if (endpoint.isAddressingOn()) { String wsAddressingVersion = endpoint.getAddressingVersion(); if (wsAddressingVersion != null &&
public void testAddressEndpointSerialization() { String sendConfig = "<send xmlns=\"http://ws.apache.org/ns/synapse\">" + "<endpoint>" + "<address uri='http://localhost:9000/services/MyService1'>" + "<enableAddressing/>" + "<timeout>" + "<duration>60</duration>" + "<responseAction>discard</responseAction>" + "</timeout>" + "</address>" + "</endpoint>" + "</send>"; OMElement config1 = createOMElement(sendConfig); SendMediator send1 = (SendMediator) factory.createMediator(config1, new Properties()); OMElement config2 = serializer.serializeMediator(null, send1); SendMediator send2 = (SendMediator) factory.createMediator(config2, new Properties()); assertTrue("Top level endpoint should be a address endpoint.", send1.getEndpoint() instanceof AddressEndpoint); AddressEndpoint ep1 = (AddressEndpoint) send1.getEndpoint(); assertTrue("Top level endpoint should be a WSDL endpoint.", send2.getEndpoint() instanceof AddressEndpoint); AddressEndpoint ep2 = (AddressEndpoint) send2.getEndpoint(); assertEquals("Address URI is not serialized properly", ep1.getDefinition().getAddress(), ep2.getDefinition().getAddress()); assertEquals( "Addressing information is not serialized properly", ep1.getDefinition().isAddressingOn(), ep2.getDefinition().isAddressingOn()); }
public void testAddressEndpointSerialization() { String callConfig = "<call xmlns=\"http://ws.apache.org/ns/synapse\">" + "<endpoint>" + "<address uri='http://localhost:9000/services/MyService1'>" + "<enableAddressing/>" + "<timeout>" + "<duration>60</duration>" + "<responseAction>discard</responseAction>" + "</timeout>" + "</address>" + "</endpoint>" + "</call>"; OMElement config1 = createOMElement(callConfig); CallMediator call1 = (CallMediator) factory.createMediator(config1, new Properties()); OMElement config2 = serializer.serializeMediator(null, call1); CallMediator call2 = (CallMediator) factory.createMediator(config2, new Properties()); assertTrue("Top level endpoint should be a address endpoint.", call1.getEndpoint() instanceof AddressEndpoint); AddressEndpoint ep1 = (AddressEndpoint) call1.getEndpoint(); assertTrue("Top level endpoint should be a address endpoint.", call2.getEndpoint() instanceof AddressEndpoint); AddressEndpoint ep2 = (AddressEndpoint) call2.getEndpoint(); assertEquals("Address URI is not serialized properly", ep1.getDefinition().getAddress(), ep2.getDefinition().getAddress()); assertEquals( "Addressing information is not serialized properly", ep1.getDefinition().isAddressingOn(), ep2.getDefinition().isAddressingOn()); }
public void testWSDLEndpointSerialization() { String callConfig = "<call xmlns=\"http://ws.apache.org/ns/synapse\">" + "<endpoint>" + "<wsdl uri='file:src/test/resources/esbservice.wsdl' service='esbservice' port='esbserviceSOAP11port_http'>" + "<enableAddressing/>" + "</wsdl>" + "</endpoint>" + "</call>"; OMElement config1 = createOMElement(callConfig); CallMediator call1 = (CallMediator) factory.createMediator(config1, new Properties()); OMElement config2 = serializer.serializeMediator(null, call1); CallMediator call2 = (CallMediator) factory.createMediator(config2, new Properties()); assertTrue("Top level endpoint should be a WSDL endpoint.", call1.getEndpoint() instanceof WSDLEndpoint); WSDLEndpoint ep1 = (WSDLEndpoint) call1.getEndpoint(); assertTrue("Top level endpoint should be a WSDL endpoint.", call2.getEndpoint() instanceof WSDLEndpoint); WSDLEndpoint ep2 = (WSDLEndpoint) call2.getEndpoint(); assertEquals("Service name is not serialized properly.", ep1.getServiceName(), ep2.getServiceName()); assertEquals("Port name is not serialized properly", ep1.getPortName(), ep2.getPortName()); assertEquals("WSDL URI is not serialized properly", ep1.getWsdlURI(), ep2.getWsdlURI()); assertEquals( "Addressing information is not serialized properly", ep1.getDefinition().isAddressingOn(), ep2.getDefinition().isAddressingOn()); }
null, configurationContext.getAxisConfiguration(), endpointDefinition.isAddressingOn() | endpointDefinition.isReliableMessagingOn(), endpointDefinition.isReliableMessagingOn(), endpointDefinition.isSecurityOn(),
public void testWSDLEndpointSerialization() { String sendConfig = "<send xmlns=\"http://ws.apache.org/ns/synapse\">" + "<endpoint>" + "<wsdl uri='file:src/test/resources/esbservice.wsdl' service='esbservice' port='esbserviceSOAP11port_http'>" + "<enableAddressing/>" + "</wsdl>" + "</endpoint>" + "</send>"; OMElement config1 = createOMElement(sendConfig); SendMediator send1 = (SendMediator) factory.createMediator(config1, new Properties()); OMElement config2 = serializer.serializeMediator(null, send1); SendMediator send2 = (SendMediator) factory.createMediator(config2, new Properties()); assertTrue("Top level endpoint should be a WSDL endpoint.", send1.getEndpoint() instanceof WSDLEndpoint); WSDLEndpoint ep1 = (WSDLEndpoint) send1.getEndpoint(); assertTrue("Top level endpoint should be a WSDL endpoint.", send2.getEndpoint() instanceof WSDLEndpoint); WSDLEndpoint ep2 = (WSDLEndpoint) send2.getEndpoint(); assertEquals("Service name is not serialized properly.", ep1.getServiceName(), ep2.getServiceName()); assertEquals("Port name is not serialized properly", ep1.getPortName(), ep2.getPortName()); assertEquals("WSDL URI is not serialized properly", ep1.getWsdlURI(), ep2.getWsdlURI()); assertEquals( "Addressing information is not serialized properly", ep1.getDefinition().isAddressingOn(), ep2.getDefinition().isAddressingOn()); }