public static ProxyService defineProxy(SynapseConfiguration config, OMElement elem, Properties properties) { ProxyService proxy = null; try { proxy = ProxyServiceFactory.createProxy(elem, properties); if (proxy != null) { config.addProxyService(proxy.getName(), proxy); } } catch (Exception e) { String msg = "Proxy Service configuration: " + elem.getAttributeValue(( new QName(XMLConfigConstants.NULL_NAMESPACE, "name"))) + " cannot be built"; handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_PROXY_SERVICES, msg, e); } return proxy; }
public static ProxyService defineProxy(SynapseConfiguration config, OMElement elem, Properties properties) { ProxyService proxy = null; try { proxy = ProxyServiceFactory.createProxy(elem, properties); if (proxy != null) { config.addProxyService(proxy.getName(), proxy); } } catch (Exception | NoClassDefFoundError e) { String msg = "Proxy Service configuration: " + elem.getAttributeValue(( new QName(XMLConfigConstants.NULL_NAMESPACE, "name"))) + " cannot be built"; handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_PROXY_SERVICES, msg, e); } return proxy; }
ProxyService proxy = ProxyServiceFactory.createProxy(artifactConfig, properties); if (proxy != null) { proxy.setFileName((new File(fileName)).getName());
ProxyService proxy = ProxyServiceFactory.createProxy(artifactConfig, properties); if (proxy != null) { proxy.setFileName((new File(fileName)).getName());
public void testProxyServiceSerializationSenarioFour() throws Exception { String inputXml = "<proxy xmlns=\"http://ws.apache.org/ns/synapse\" " + "name=\"name\" startOnLoad=\"true\" transports=\"http\"><description>" + "description</description><target><inSequence onError=\"ref\"><send/></inSequence>" + "<outSequence><send/></outSequence></target><enableAddressing/><publishWSDL key=\"key\"></publishWSDL>" + "<policy key=\"key\"/><parameter name=\"para\">text</parameter></proxy>"; OMElement inputOM = createOMElement(inputXml); ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties()); OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy); assertTrue(compare(resultOM, inputOM)); }
public void testProxyServiceSerializationSenarioTwo() throws Exception { String inputXml = "<proxy xmlns=\"http://ws.apache.org/ns/synapse\" startOnLoad=\"true\" " + "name=\"name\" transports=\"http\"><description>description</description>" + "<target endpoint=\"epr\" outSequence=\"out\"/><publishWSDL key=\"key\">" + "</publishWSDL><policy key=\"key\"/><parameter name=\"para\">text</parameter></proxy>"; OMElement inputOM = createOMElement(inputXml); ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties()); OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy); assertTrue(compare(resultOM, inputOM)); }
public void testProxyServiceSerializationSenarioFive() throws Exception { String inputXml = "<proxy xmlns=\"http://ws.apache.org/ns/synapse\" startOnLoad=\"true\" " + "name=\"name\" transports=\"http\"><description>description</description><target>" + "<endpoint><address uri=\"http://www.example.com/testepr\"/></endpoint><outSequence><send/>" + "</outSequence></target><publishWSDL uri=\"http://uri\"></publishWSDL><policy key=\"key\"/>" + "<parameter name=\"para\">text</parameter></proxy>"; OMElement inputOM = createOMElement(inputXml); ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties()); OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy); assertTrue(compare(resultOM, inputOM)); }
public void testProxyServiceSerializationSenarioOne() throws Exception { String inputXml = "<proxy xmlns=\"http://ws.apache.org/ns/synapse\" name=\"name\" " + "startOnLoad=\"true\" transports=\"http\"><description>description</description>" + "<target inSequence=\"inseqname\" outSequence=\"outseqname\" faultSequence=\"faultseqname\" />" + "<publishWSDL uri=\"http://uri\" ></publishWSDL><policy key=\"key\"/>" + "<parameter name=\"para\">text</parameter></proxy>"; OMElement inputOM = createOMElement(inputXml); ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties()); OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy); assertTrue(compare(resultOM, inputOM)); }
public void testProxyServiceSerializationSenarioThree() throws Exception { String inputXml = "<proxy xmlns=\"http://ws.apache.org/ns/synapse\" " + "name=\"name\" startOnLoad=\"true\" transports=\"http\"><description>" + "description</description><target><inSequence onError=\"ref\"><description>Test documentation</description><send/></inSequence>" + "<outSequence><send/></outSequence></target><publishWSDL key=\"key\"></publishWSDL>" + "<policy key=\"key\"/><parameter name=\"para\">text</parameter></proxy>"; OMElement inputOM = createOMElement(inputXml); ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties()); OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy); assertTrue(compare(resultOM, inputOM)); }
public void testProxyServiceSerializationScenarioSix() throws Exception { String inputXml = "<proxy xmlns=\"http://ws.apache.org/ns/synapse\" startOnLoad=\"true\" " + "name=\"name\" transports=\"http\"><description>description</description><target>" + "<endpoint><address uri=\"http://www.example.com/testepr\"/></endpoint><outSequence><send/>" + "</outSequence></target><publishWSDL endpoint=\"wsdl_ep\"></publishWSDL><policy key=\"key\"/>" + "<parameter name=\"para\">text</parameter></proxy>"; OMElement inputOM = createOMElement(inputXml); ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties()); OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy); assertTrue(compare(resultOM, inputOM)); } // public void testProxyServiceSerializationSenarioSix() throws Exception {
ProxyService proxy = ProxyServiceFactory.createProxy(artifactConfig, properties); if (proxy != null) { proxy.setLogSetterValue();
/** * Serialization of 'preserveProxy' attribute in PublishWSDL * * @throws Exception */ public void testProxyServiceSerializationWithPreserveProxy() throws Exception { String inputXml = "<proxy xmlns=\"http://ws.apache.org/ns/synapse\" startOnLoad=\"true\" " + "name=\"name\" transports=\"http\"><description>description</description><target>" + "<endpoint><address uri=\"http://www.example.com/testepr\"/></endpoint><outSequence><send/>" + "</outSequence></target><publishWSDL preservePolicy=\"true\" endpoint=\"wsdl_ep\"></publishWSDL><policy key=\"key\"/>" + "<parameter name=\"para\">text</parameter></proxy>"; OMElement inputOM = createOMElement(inputXml); ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties()); OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy); assertTrue(compare(resultOM, inputOM)); } }
ProxyService proxy = ProxyServiceFactory.createProxy(artifactConfig, properties); proxy.setArtifactContainerName(customLogContent); if (proxy != null) {
public void testProxyServiceSerializationWithResourceMap() throws Exception { String inputXml = "<proxy xmlns=\"http://ws.apache.org/ns/synapse\" name=\"name\" " + "startOnLoad=\"true\"><target><endpoint><address uri=\"http://www.example.com/testepr\"/>" + "</endpoint><outSequence><send/></outSequence></target><publishWSDL uri=\"http://uri\">" + "<resource location=\"test1.xsd\" key=\"test-key1\"/><resource location=\"test2.xsd\"" + " key=\"test-key2\"/></publishWSDL></proxy>"; OMElement inputOM = createOMElement(inputXml); ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties()); assertNotNull(proxy.getResourceMap()); OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy); assertTrue(compare(resultOM, inputOM)); }