Source:
public void initialize(NamespaceRegistry registry, NodeTypeManager nodeTypeManager) throws RepositoryException, IOException { super.initialize(registry, nodeTypeManager); this.registry = registry; this.factories = getContext().getValueFactories(); properties = new Properties(getContext().getValueFactories()); nodes = new Nodes(); Map<String, String> parameter = new HashMap<String, String>(); parameter.put(SessionParameter.BINDING_TYPE, BindingType.WEBSERVICES.value()); parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE, aclService); parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, discoveryService); parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, multifilingService); parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, navigationService); parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, objectService); parameter.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, policyService); parameter.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, relationshipService); parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, repositoryService); parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, versioningService); parameter.put(SessionParameter.REPOSITORY_ID, repositoryId); SessionFactoryImpl factory = SessionFactoryImpl.newInstance(); session = factory.createSession(parameter, null, new StandardAuthenticationProvider() { @Override public Element getSOAPHeaders(Object portObject) { return super.getSOAPHeaders(portObject); } }, null); registry.registerNamespace(CmisLexicon.Namespace.PREFIX, CmisLexicon.Namespace.URI); importTypes(session.getTypeDescendants(null, Integer.MAX_VALUE, true), nodeTypeManager, registry); registerRepositoryInfoType(nodeTypeManager); InputStream cndStream = getClass().getClassLoader().getResourceAsStream("cmis.cnd"); nodeTypeManager.registerNodeTypes(cndStream, true); }

Target:
public void initialize(NamespaceRegistry registry, NodeTypeManager nodeTypeManager) throws RepositoryException, IOException { super.initialize(registry, nodeTypeManager); this.registry = registry; this.factories = getContext().getValueFactories(); properties = new Properties(getContext().getValueFactories()); nodes = new Nodes(); Map<String, String> parameter = new HashMap<String, String>(); parameter.put(SessionParameter.BINDING_TYPE, BindingType.WEBSERVICES.value()); parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE, aclService); parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, discoveryService); parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, multifilingService); parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, navigationService); parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, objectService); parameter.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, policyService); parameter.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, relationshipService); parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, repositoryService); parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, versioningService); parameter.put(SessionParameter.REPOSITORY_ID, repositoryId); SessionFactoryImpl factory = SessionFactoryImpl.newInstance(); session = factory.createSession(parameter, null, new StandardAuthenticationProvider() { @Override public Element getSOAPHeaders(Object portObject) { return super.getSOAPHeaders(portObject); } }, null); registry.registerNamespace(CmisLexicon.Namespace.PREFIX, CmisLexicon.Namespace.URI); importTypes(session.getTypeDescendants(null, Integer.MAX_VALUE, true), nodeTypeManager, registry); registerRepositoryInfoType(nodeTypeManager); }