Module module = tuscanyRuntime.getModuleComponent().getModuleImplementation();
for (Iterator i = module.getEntryPoints().iterator(); i.hasNext();) {
EntryPoint entryPoint = (EntryPoint) i.next();
Binding binding = (Binding) entryPoint.getBindings().get(0);
if (binding instanceof JbiBinding) {
JbiBinding jbiBinding = (JbiBinding) binding;
ScaEndpoint endpoint = new ScaEndpoint(entryPoint);
endpoint.setServiceUnit(this);
endpoint.setService(jbiBinding.getServiceName());
endpoint.setEndpoint(jbiBinding.getEndpointName());
endpoint.setInterfaceName(jbiBinding.getInterfaceName());
Definition definition = jbiBinding.getDefinition();
if (definition != null) {
endpoint.setDefinition(definition);
endpoint.setDescription(WSDLFactory.newInstance().newWSDLWriter().getDocument(definition));
}
addEndpoint(endpoint);