if (endpointEl != null) {
Endpoint endpoint = EndpointFactory.getEndpointFromElement(endpointEl, factory, false, new Properties());
if(endpoint!=null && endpoint instanceof AddressEndpoint){
AddressEndpoint add = (AddressEndpoint) endpoint;
AddressEndpointData data = new AddressEndpointData();
data.setEpName(add.getName());
data.setAddress(add.getDefinition().getAddress());
data.setEpType(ADDRESS_EP);
//data.setFormat(add.getDefinition().getFormat());
data.setSoap11(add.getDefinition().isForceSOAP11());
data.setSoap12(add.getDefinition().isForceSOAP12());
data.setRest(add.getDefinition().isForceREST());
data.setGet(add.getDefinition().isForceGET());
data.setPox(add.getDefinition().isForcePOX());
data.setSwa(add.getDefinition().isUseSwa());
data.setMtom(add.getDefinition().isUseMTOM());
data.setSuspendDurationOnFailure(add.getDefinition().getInitialSuspendDuration());
data.setTimeoutAct(add.getDefinition().getTimeoutAction());
data.setTimeoutActionDur(add.getDefinition().getTimeoutDuration());
data.setWsadd(add.getDefinition().isAddressingOn());
data.setSepList(add.getDefinition().isUseSeparateListener());
data.setWssec(add.getDefinition().isSecurityOn());
data.setWsrm(add.getDefinition().isReliableMessagingOn());
data.setRmPolKey(add.getDefinition().getWsRMPolicyKey());
data.setSecPolKey(add.getDefinition().getWsSecPolicyKey());
data.setMaxSusDuration(add.getDefinition().getSuspendMaximumDuration());
data.setSusProgFactor(add.getDefinition().getSuspendProgressionFactor());
data.setErrorCodes(errorCodeListBuilder(add.getDefinition().getSuspendErrorCodes()).trim());
data.setRetryDisabledErrorCodes(errorCodeListBuilder(add.getDefinition().
getRetryDisabledErrorCodes()).trim());
data.setTimdedOutErrorCodes(errorCodeListBuilder(add.getDefinition().getTimeoutErrorCodes()));
data.setRetryTimeout(add.getDefinition().getRetryDurationOnTimeout());
data.setRetryDelay(add.getDefinition().getRetriesOnTimeoutBeforeSuspend());
return data;
//return EndpointSerializer.getElementFromEndpoint(
// synapseConfiguration.getEndpoint(endpointName.trim()));