Connecting to Alfresco Repository using Chemistry cmis without using port
<p>I have a requirement where i need to connect to Alfresco Repository using the below atompuburl</p>

<pre><code>https://www.myalfresco.com/alfresco/api/-default-/public/cmis/versions/1.1/atom
</code></pre>

<p>where www.myalfresco.com is my aws alfresco url.</p>

<p>I use the below snippet to get a session of alfresco</p>

<pre><code>public Session connectToRepository(String username,String password,String atompuburl)
    {
        // Create session.
        Session session = null;
        try
        {
            // Default factory implementation of client runtime.
            final SessionFactory sessionFactory = SessionFactoryImpl.newInstance();

            // prepare connection parameters
            final Map&lt;String, String&gt; connectionParameters = new HashMap&lt;String, String&gt;();

            // User credentials.
            connectionParameters.put(SessionParameter.USER,username);
            connectionParameters.put(SessionParameter.PASSWORD,password);

            // Connection settings.
            connectionParameters.put(SessionParameter.ATOMPUB_URL,atompuburl);
            connectionParameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
            session = sessionFactory.getRepositories(connectionParameters).get(0).createSession();
        } catch (CmisConnectionException ce){
            System.out.println("CMIS error=========");
            ce.printStackTrace();
        } catch (CmisPermissionDeniedException cmisPermissionDeniedException)
        {

        }
</code></pre>

<p>where i use the above mentioned url in the atompul url.</p>

<p>Is there any way to connect to the Alfresco Repository without the ports(as it is not given to me).</p>

<p>Is there any other way than this for Chemistry Cmis.</p>

<p>Kindly help.</p>

<p>This is the exception it gives</p>

<p><code>org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot access "https://www.myalfresco.com:443/alfresco/api/-default-/public/cmis/versions/1.1/atom": Connection timed out: connect
    at org.apache.chemistry.opencmis.client.bindings.spi.http.DefaultHttpInvoker.invoke(DefaultHttpInvoker.java:230)
    at org.apache.chemistry.opencmis.client.bindings.spi.http.DefaultHttpInvoker.invokeGET(DefaultHttpInvoker.java:57)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:641)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:808)
    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:90)
    at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:135)
    at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:112)
    at com.ge.test.CMISConnector.connectToRepository(CMISConnector.java:35)
    at com.ge.test.MyApp.main(MyApp.java:10)
connected
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
    at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.protocol.https.HttpsClient.&lt;init&gt;(HttpsClient.java:264)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    at org.apache.chemistry.opencmis.client.bindings.spi.http.DefaultHttpInvoker.invoke(DefaultHttpInvoker.java:205)
    ... 9 more</code></p>