title: org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: Atom Entry
body: <p>Im trying to create a client application connmecting to Sharepoint 2013.</p>
  
  <p>Im receiving this kind of exception, seems the response cant be parsed by the library i used which is chemistry cmis library.</p>
  
  <p>Below is my code:</p>
  
  <pre><code>public Session fillParams() {//define some values for the connection string
  
      Map&lt;String, String&gt; parameter = new HashMap&lt;String, String&gt;();
  
      // Set the user credentials
      parameter.put(SessionParameter.USER, "**");
      parameter.put(SessionParameter.PASSWORD, "**");
  
      // Specify the connection settings
      parameter.put(SessionParameter.ATOMPUB_URL, "http://bbdurl.bbd.cloudappsportal.com/sites/_api/web");
      parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
  
      // Set the alfresco object factory
      parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");
  
      // Create a session
      SessionFactory factory = SessionFactoryImpl.newInstance();
      List&lt;Repository&gt; repositories = new ArrayList&lt;Repository&gt;();
      repositories = factory.getRepositories(parameter);
      Repository repository = repositories.get(0);
  
      Session session = factory.createSession(parameter);
      return session;
  }
  </code></pre>
  
  <p><strong>Full stack trace:</strong></p>
  
  <pre><code>Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: Atom Entry
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:602)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:783)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:65)
      at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:88)
      at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:133)
      at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:111)
      at sample.CMISConnect.fillParams(CMISConnect.java:59)
      at sample.CMISConnect.main(CMISConnect.java:70)
  </code></pre>