Search in sources :

Example 6 with DefaultEndpoint

use of org.apache.synapse.endpoints.DefaultEndpoint in project wso2-synapse by wso2.

the class DefaultEndpointSerializerTest method test.

public void test() throws Exception {
    String inputXml = "<endpoint  xmlns=\"http://ws.apache.org/ns/synapse\">" + "<default format=\"soap11\" />" + "</endpoint>";
    OMElement inputElement = createOMElement(inputXml);
    DefaultEndpoint endpoint = (DefaultEndpoint) DefaultEndpointFactory.getEndpointFromElement(inputElement, true, null);
    OMElement serializedResponse = DefaultEndpointSerializer.getElementFromEndpoint(endpoint);
    assertTrue("Endpoint not serialized!", compare(serializedResponse, inputElement));
}
Also used : DefaultEndpoint(org.apache.synapse.endpoints.DefaultEndpoint) OMElement(org.apache.axiom.om.OMElement)

Aggregations

DefaultEndpoint (org.apache.synapse.endpoints.DefaultEndpoint)6 EndpointDefinition (org.apache.synapse.endpoints.EndpointDefinition)4 OMElement (org.apache.axiom.om.OMElement)3 SynapseException (org.apache.synapse.SynapseException)2 QName (javax.xml.namespace.QName)1 OMAttribute (org.apache.axiom.om.OMAttribute)1 AxisFault (org.apache.axis2.AxisFault)1 MessageContext (org.apache.synapse.MessageContext)1 SynapseLog (org.apache.synapse.SynapseLog)1 AddressEndpoint (org.apache.synapse.endpoints.AddressEndpoint)1 BlockingMsgSender (org.apache.synapse.message.senders.blocking.BlockingMsgSender)1 Test (org.junit.Test)1