/** * Returns a Map containing all the "provide endpoints" - for which read "SCA services" * The map is keyed by partnerLink name and holds Endpoint objects * * TODO deal with reference callbacks on bidirectional references */ public Map<String, Endpoint> getProvideEndpoints() { //System.out.println("getProvideEndpoints called"); if( provideEndpoints == null ) { provideEndpoints = new HashMap<String, Endpoint>(); String componentURI = component.getURI(); // Get a collection of the services - note that the Component services include additional // "pseudo-services" for each reference that has a callback... List<ComponentService> theServices = component.getServices(); // Create an endpoint for each service, using the service name combined with // http://tuscany.apache.org to make a QName // Note that the key used for this put operation MUST be the name of one of the partnerLinks of the // BPEL process. The SCA service MAY have an alias for the name (can be given using the sca-bpel:service // element, if present) and this alias must not be used for( ComponentService service : theServices ) { String partnerlinkName = implementation.getServicePartnerlinkName( service.getName() ); // MJE 14/07/2009 - added componentURI to the service name to get unique service name provideEndpoints.put( partnerlinkName, new Endpoint( new QName( TUSCANY_NAMESPACE, componentURI + service.getName() ), "ServicePort")); } // end for } // end if return provideEndpoints; } // end getProvideEndpoints