private void initialize()

in source/com.microsoft.tfs.core/src/com/microsoft/tfs/core/config/webservice/DefaultWebServiceFactory.java [504:1186]


    private void initialize() {
        /*
         * Registration
         */
        serviceInterfaceClassToMetadata.put(
            _RegistrationSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.REGISTRATION,
                ServiceInterfaceIdentifiers.REGISTRATION,
                SpecialURLs.DEFAULT_REGISTRATION_ENDPOINT,
                _RegistrationSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _RegistrationSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Location
         *
         * Note the null endpoint. The full location service URI is always
         * passed to newLocationWebService().
         */
        serviceInterfaceClassToMetadata.put(
            _LocationWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.LOCATION,
                ServiceInterfaceIdentifiers.LOCATION,
                null,
                _LocationWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _LocationWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Common Structure (a.k.a. Classification)
         */
        serviceInterfaceClassToMetadata.put(
            _ClassificationSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.COMMON_STRUCTURE,
                ServiceInterfaceIdentifiers.COMMON_STRUCTURE,
                _ClassificationSoap12Service.getEndpointPath(),
                _ClassificationSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _ClassificationSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Common Structure (a.k.a. Classification) V4
         */
        serviceInterfaceClassToMetadata.put(
            _Classification4Soap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.COMMON_STRUCTURE_4,
                ServiceInterfaceIdentifiers.COMMON_STRUCTURE_4,
                _Classification4Soap12Service.getEndpointPath(),
                _Classification4Soap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _Classification4Soap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Reporting
         *
         * Note the lack of service identifier and default endpoint. This
         * service isn't located via the ServerDataProvider, so it doesn't need
         * these.
         */
        serviceInterfaceClassToMetadata.put(
            _ReportingService2005Soap.class,
            new WebServiceMetadata(
                null,
                null,
                _ReportingService2005SoapService.getEndpointPath(),
                _ReportingService2005SoapService.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        final _ReportingService2005SoapService service =
                            new _ReportingService2005SoapService(httpClient, endpoint, port);

                        // Reporting services are likely to have authentication
                        // misconfigured, don't prompt.
                        service.setPromptForCredentials(false);

                        return service;
                    }
                }));

        /*
         * Server Status
         */
        serviceInterfaceClassToMetadata.put(
            _ServerStatusSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.SERVER_STATUS,
                ServiceInterfaceIdentifiers.SERVER_STATUS,
                _ServerStatusSoap12Service.getEndpointPath(),
                _ServerStatusSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _ServerStatusSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Version Control
         */
        serviceInterfaceClassToMetadata.put(
            _RepositorySoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.VERSION_CONTROL,
                ServiceInterfaceIdentifiers.VERSION_CONTROL,
                _RepositorySoap12Service.getEndpointPath(),
                _RepositorySoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _RepositorySoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Version Control Extensions (TFS 2010 / Dev 10)
         */
        serviceInterfaceClassToMetadata.put(
            _RepositoryExtensionsSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.VERSION_CONTROL_3,
                ServiceInterfaceIdentifiers.VERSION_CONTROL_3,
                _RepositoryExtensionsSoap12Service.getEndpointPath(),
                _RepositoryExtensionsSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _RepositoryExtensionsSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Version Control Extensions (TFS 2012 / Dev 11)
         */
        serviceInterfaceClassToMetadata.put(
            _Repository4Soap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.VERSION_CONTROL_4,
                ServiceInterfaceIdentifiers.VERSION_CONTROL_4,
                _Repository4Soap12Service.getEndpointPath(),
                _Repository4Soap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _Repository4Soap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Version Control Extensions (TFS 2012 QU1 / Dev 11)
         */
        serviceInterfaceClassToMetadata.put(
            _Repository5Soap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.VERSION_CONTROL_5,
                ServiceInterfaceIdentifiers.VERSION_CONTROL_5,
                _Repository5Soap12Service.getEndpointPath(),
                _Repository5Soap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _Repository5Soap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Version Control Administration
         */
        serviceInterfaceClassToMetadata.put(
            _AdminSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.VERSION_CONTROL_ADMIN,
                ServiceInterfaceIdentifiers.VERSION_CONTROL_ADMIN,
                _AdminSoap12Service.getEndpointPath(),
                _AdminSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _AdminSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Security Service
         */
        serviceInterfaceClassToMetadata.put(
            _SecurityWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.SECURITY,
                ServiceInterfaceIdentifiers.SECURITY,
                _SecurityWebServiceSoap12Service.getEndpointPath(),
                _SecurityWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _SecurityWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Work Item Configuration Settings
         */
        serviceInterfaceClassToMetadata.put(
            _ConfigurationSettingsServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.WORK_ITEM_CONFIG,
                ServiceInterfaceIdentifiers.WORK_ITEM_CONFIG,
                _ConfigurationSettingsServiceSoap12Service.getEndpointPath(),
                _ConfigurationSettingsServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _ConfigurationSettingsServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Work Item Tracking
         */
        serviceInterfaceClassToMetadata.put(
            _ClientService2Soap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.WORK_ITEM,
                ServiceInterfaceIdentifiers.WORK_ITEM,
                _ClientService2Soap12Service.getEndpointPath(),
                _ClientService2Soap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        final _ClientService2Soap12Service service =
                            new _ClientService2Soap12Service(httpClient, endpoint, port);

                        service.setSOAPHeaderProvider(new WITRequestIDHeaderProvider());

                        return service;
                    }
                }));

        /*
         * Work Item Tracking (TFS 2010)
         */
        serviceInterfaceClassToMetadata.put(
            _ClientService3Soap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.WORK_ITEM_3,
                ServiceInterfaceIdentifiers.WORK_ITEM_3,
                _ClientService3Soap12Service.getEndpointPath(),
                _ClientService3Soap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        final _ClientService3Soap12Service service =
                            new _ClientService3Soap12Service(httpClient, endpoint, port);

                        service.setSOAPHeaderProvider(new WITRequestIDHeaderProvider());

                        return service;
                    }
                }));

        /*
         * Work Item Tracking (Dev11)
         */
        serviceInterfaceClassToMetadata.put(
            _ClientService5Soap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.WORK_ITEM_5,
                ServiceInterfaceIdentifiers.WORK_ITEM_5,
                _ClientService5Soap12Service.getEndpointPath(),
                _ClientService5Soap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        final _ClientService5Soap12Service service =
                            new _ClientService5Soap12Service(httpClient, endpoint, port);

                        service.setSOAPHeaderProvider(new WITRequestIDHeaderProvider());

                        return service;
                    }
                }));

        /*
         * Linking
         *
         * Note the lack of service identifier and default endpoint. This
         * service isn't located via the ServerDataProvider, so it doesn't need
         * these.
         */
        serviceInterfaceClassToMetadata.put(
            _IntegrationServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.LINKING,
                null,
                null,
                new QName(_IntegrationServiceSoapService.getPortQName().getNamespaceURI(), ""), //$NON-NLS-1$
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _IntegrationServiceSoapService(httpClient, endpoint, port);
                    }
                }));

        /*
         * Group Security Service
         */
        serviceInterfaceClassToMetadata.put(
            _GroupSecurityServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.GROUP_SECURITY,
                ServiceInterfaceIdentifiers.GROUP_SECURITY,
                _GroupSecurityServiceSoap12Service.getEndpointPath(),
                _GroupSecurityServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _GroupSecurityServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Windows Sharepoint Services
         *
         * Note the lack of interface ID. This service isn't located via the
         * ServerDataProvider, so it doesn't need one.
         */
        serviceInterfaceClassToMetadata.put(
            _ListsSoap.class,
            new WebServiceMetadata(
                null,
                null,
                _ListsSoapService.getEndpointPath(),
                _ListsSoapService.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        final _ListsSoapService service = new _ListsSoapService(httpClient, endpoint, port);

                        // Sharepoint services are likely to have authentication
                        // misconfigured, don't prompt.
                        service.setPromptForCredentials(false);

                        return service;
                    }
                }));

        /*
         * Build Service
         */
        serviceInterfaceClassToMetadata.put(
            _BuildServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD,
                ServiceInterfaceIdentifiers.BUILD,
                _BuildServiceSoap12Service.getEndpointPath(),
                _BuildServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _BuildServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Build Service v3 (BuildWebServiceSoap)
         */
        serviceInterfaceClassToMetadata.put(
            _BuildWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD_3,
                ServiceInterfaceIdentifiers.BUILD_3,
                _BuildWebServiceSoap12Service.getEndpointPath(),
                _BuildWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _BuildWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Build Service v4 (BuildServiceSoap)
         */
        serviceInterfaceClassToMetadata.put(
            ms.tfs.build.buildservice._04._BuildServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD_4,
                ServiceInterfaceIdentifiers.BUILD_4,
                ms.tfs.build.buildservice._04._BuildServiceSoap12Service.getEndpointPath(),
                ms.tfs.build.buildservice._04._BuildServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new ms.tfs.build.buildservice._04._BuildServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Build Queue Service (BuildQueueWebServiceSoap)
         */
        serviceInterfaceClassToMetadata.put(
            _BuildQueueWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD_QUEUE_SERVICE,
                ServiceInterfaceIdentifiers.BUILD_QUEUE_SERVICE,
                _BuildQueueWebServiceSoap12Service.getEndpointPath(),
                _BuildQueueWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _BuildQueueWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Build Queue Service v4 (BuildQueueServiceSoap)
         */
        serviceInterfaceClassToMetadata.put(
            _BuildQueueServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD_QUEUE_SERVICE_4,
                ServiceInterfaceIdentifiers.BUILD_QUEUE_SERVICE_4,
                _BuildQueueServiceSoap12Service.getEndpointPath(),
                _BuildQueueServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _BuildQueueServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Build Administration Service (AdministrationWebService)
         */
        serviceInterfaceClassToMetadata.put(
            _AdministrationWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD_ADMINISTRATION_SERVICE,
                ServiceInterfaceIdentifiers.BUILD_ADMINISTRATION_SERVICE,
                _AdministrationWebServiceSoap12Service.getEndpointPath(),
                _AdministrationWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _AdministrationWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Build Administration Service 4 (AdministrationWebService4)
         */
        serviceInterfaceClassToMetadata.put(
            _AdministrationServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD_ADMINISTRATION_SERVICE_4,
                ServiceInterfaceIdentifiers.BUILD_ADMINISTRATION_SERVICE_4,
                _AdministrationServiceSoap12Service.getEndpointPath(),
                _AdministrationServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _AdministrationServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Build Controller
         */
        serviceInterfaceClassToMetadata.put(
            _BuildControllerWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD_CONTROLLER,
                ServiceInterfaceIdentifiers.BUILD_CONTROLLER,
                _BuildControllerWebServiceSoap12Service.getEndpointPath(),
                _BuildControllerWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _BuildControllerWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Build Store
         */
        serviceInterfaceClassToMetadata.put(
            _BuildStoreWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.BUILD_STORE,
                ServiceInterfaceIdentifiers.BUILD_STORE,
                _BuildStoreWebServiceSoap12Service.getEndpointPath(),
                _BuildStoreWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _BuildStoreWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Catalog
         */
        serviceInterfaceClassToMetadata.put(
            _CatalogWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.CATALOG,
                ServiceInterfaceIdentifiers.CATALOG,
                _CatalogWebServiceSoap12Service.getEndpointPath(),
                _CatalogWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _CatalogWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Collection Identity Management v1
         */
        serviceInterfaceClassToMetadata.put(
            _IdentityManagementWebServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.IDENTITY_MANAGEMENT,
                ServiceInterfaceIdentifiers.COLLECTION_IDENTITY_MANAGEMENT,
                _IdentityManagementWebServiceSoap12Service.getEndpointPath(),
                _IdentityManagementWebServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _IdentityManagementWebServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Collection Identity Management v2
         */
        serviceInterfaceClassToMetadata.put(
            _IdentityManagementWebService2Soap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.IDENTITY_MANAGEMENT_2,
                ServiceInterfaceIdentifiers.COLLECTION_IDENTITY_MANAGEMENT_2,
                _IdentityManagementWebService2Soap12Service.getEndpointPath(),
                _IdentityManagementWebService2Soap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _IdentityManagementWebService2Soap12Service(httpClient, endpoint, port);
                    }
                }));

        /*
         * Team Configuration
         */
        serviceInterfaceClassToMetadata.put(
            _TeamConfigurationServiceSoap.class,
            new WebServiceMetadata(
                ServiceInterfaceNames.TEAM_CONFIGURATION,
                ServiceInterfaceIdentifiers.TEAM_CONFIGURATION,
                _TeamConfigurationServiceSoap12Service.getEndpointPath(),
                _TeamConfigurationServiceSoap12Service.getPortQName(),
                new WebServiceInstantiator() {
                    @Override
                    public Object newWebServiceImplementation(
                        final HttpClient httpClient,
                        final URI endpoint,
                        final QName port) {
                        return new _TeamConfigurationServiceSoap12Service(httpClient, endpoint, port);
                    }
                }));
    }