String endpointName = null;
QName serviceName = null;
EndpointMetaData emd = null;
ServiceEndpoint serviceEndpoint = messageExchange.getEndpoint();
if(serviceEndpoint != null) {
EndpointRegistry endpointRegistry = EndpointRegistry.getInstance();
endpointName = serviceEndpoint.getEndpointName();
serviceName = serviceEndpoint.getServiceName();
ServiceEngineEndpoint serviceEngineEndpoint = endpointRegistry.get(
serviceName, endpointName);
if(serviceEngineEndpoint != null && server)
emd = serviceEngineEndpoint.getEndpointMetaData();
}
if(!server && wsdlLocation != null) {