}
fac = OMAbstractFactory.getOMFactory();
OMElement endpointElement = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE);
ResolvingEndpoint resolvingEndpoint = (ResolvingEndpoint) endpoint;
SynapseXPathSerializer.serializeXPath(resolvingEndpoint.getKeyExpression(),
endpointElement, "key-expression");
if (resolvingEndpoint.getName() != null && !resolvingEndpoint.isAnonymous()) {
endpointElement.addAttribute("name", resolvingEndpoint.getName(), null);
}
// serialize the parameters
serializeProperties(resolvingEndpoint, endpointElement);