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 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 {
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)); }
/** * 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)); } }
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)); }