Search in sources :

Example 26 with API

use of org.apache.synapse.rest.API in project wso2-synapse by wso2.

the class APISerializationTest method testAPISerialization4.

public void testAPISerialization4() throws Exception {
    String xml = "<api name=\"test\" context=\"/dictionary\" transports=\"https\" hostname=\"apache.org\" port=\"8243\"" + " xmlns=\"http://ws.apache.org/ns/synapse\"><resource url-mapping=\"/admin/view\" " + "outSequence=\"out\"><inSequence><log/><send/></inSequence></resource></api>";
    OMElement om = AXIOMUtil.stringToOM(xml);
    API api = APIFactory.createAPI(om);
    OMElement out = APISerializer.serializeAPI(api);
    assertXMLEqual(xml, out.toString());
}
Also used : OMElement(org.apache.axiom.om.OMElement) API(org.apache.synapse.rest.API)

Aggregations

API (org.apache.synapse.rest.API)26 OMElement (org.apache.axiom.om.OMElement)10 DeploymentException (org.apache.axis2.deployment.DeploymentException)4 SynapseException (org.apache.synapse.SynapseException)4 ProxyService (org.apache.synapse.core.axis2.ProxyService)4 InboundEndpoint (org.apache.synapse.inbound.InboundEndpoint)4 PriorityExecutor (org.apache.synapse.commons.executors.PriorityExecutor)3 Endpoint (org.apache.synapse.endpoints.Endpoint)3 TemplateMediator (org.apache.synapse.mediators.template.TemplateMediator)3 MessageProcessor (org.apache.synapse.message.processor.MessageProcessor)3 MessageStore (org.apache.synapse.message.store.MessageStore)3 Resource (org.apache.synapse.rest.Resource)3 File (java.io.File)2 Iterator (java.util.Iterator)2 ManagedLifecycle (org.apache.synapse.ManagedLifecycle)2 Mediator (org.apache.synapse.Mediator)2 APIMediationFlowPoint (org.apache.synapse.debug.constructs.APIMediationFlowPoint)2 SynapseMediationFlowPoint (org.apache.synapse.debug.constructs.SynapseMediationFlowPoint)2 SynapseSequenceType (org.apache.synapse.debug.constructs.SynapseSequenceType)2 AbstractMediator (org.apache.synapse.mediators.AbstractMediator)2