를 사용하지 않고 화학 CMIS를 사용하여 프레스코 저장소에 연결 난 내가 아래 atompuburl www.myalfresco.com 내 AWS의 야외 URL을이다포트
https://www.myalfresco.com/alfresco/api/-default-/public/cmis/versions/1.1/atom
를 사용하여 프레스코 저장소에 연결해야하는 요구 사항이있다.
나는 내가 atompul URL에 위에서 언급 한 URL을 사용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<String, String> connectionParameters = new HashMap<String, String>();
// 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)
{
}
야외
의 세션을 얻기 위해 아래의 조각을 사용합니다.포트가없는 Alfresco Repository에 연결할 수있는 방법이 없습니다 (나와 제공되지 않음).
화학 Cmis에 대한 다른 방법이 있습니까?
친절히 도움.
이
은 당신의 URL 프로토콜은 "HTTPS"당신이 포트를 지정하지 않기 때문에이 기본 SSL 포트해야합니다 귀하의 포트가, 443처럼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.<init>(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
이 오류를 업데이트했습니다. – user2361591
은 내 답변에 약간의 수정을했습니다. –
브라우저를 사용하여 https://www.myalfresco.com/alfresco/api/-default-/public/cmis/versions/1.1/atom에 접속하면 호스트를 방문하고 atompub 파일을 다운로드 할 수 있습니다. – user2361591