*/
public Document getEndpointDescriptor(ServiceEndpoint endpoint) throws JBIException {
if (endpoint instanceof AbstractServiceEndpoint == false) {
throw new JBIException("Descriptors can not be queried for external endpoints");
}
AbstractServiceEndpoint se = (AbstractServiceEndpoint) endpoint;
Component component = componentRegistry.getComponent(se.getComponentNameSpace());
return component.getServiceDescription(endpoint);
}