Giter Club home page Giter Club logo

alfresco-client-sdk's People

Contributors

gavincornwell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfresco-client-sdk's Issues

Maven

Hi,

I came up with library after searching for any Java lib utilizing the Alfresco REST API.
Unfortunately the library seems to be not activiley devloped.
The Maven dependency is gone ...

@gavincornwell could you please give me a status update?
Should I use the library in projects?

Thanks

Project does not build.

There is a small mistake in client-samples/client-samples-java/pom.xml:

diff --git a/client-samples/client-samples-java/pom.xml b/client-samples/client-samples-java/pom.xml
index 3da3547..205b78c 100644
--- a/client-samples/client-samples-java/pom.xml
+++ b/client-samples/client-samples-java/pom.xml
@@ -24,7 +24,7 @@
         <groupId>org.alfresco.client</groupId>
         <artifactId>alfresco-client</artifactId>
         <version>1.0.0-beta1</version>
-        <relativePath>../../../</relativePath>
+        <relativePath>../../</relativePath>
     </parent>
     <artifactId>client-samples-java</artifactId>
     <name>Alfresco Client Samples - Java</name>

Missing properties in the NodeRepresentation properties list

The call to get the node/document -> client.getNodesAPI().getNodeCall(nodeId) does not retrieve all properties from alfresco (only 40 properties).

Is there any limit set up or the problem is somewhere else ? Properties array list is missing some of ours properties (not all, some of them are in the node(NodeRepresentation)).

And i did not find any connections why some properties are missing. (i check by value, by name...).

Resolve the issue SSLPeerUnverifiedException

Hi this use case it's just for test purpose. I'm trying to make same lucene query on my remote machine alfresco, at first i encounter the classic excpetion:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

but i solved by simply importing on my truststore the certificates of alfresco from the classic url "https://192.168.1.134:443" (where 192.168.1.134 is the ip of my remote machine alfresco)

but when i invoke the retrofit2 Response call the application try to resolve the ip address of the machine with the Alfresco Certificate, and giving the following error:

javax.net.ssl.SSLPeerUnverifiedException: Hostname 192.168.1.134 not verified:
    certificate: sha256/vhtZEDTK/2nCBJ6ESUWbQR+w2F1HMqiMvpTjPW2k7ZE=
    DN: CN=Alfresco Repository, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB
    subjectAltNames: []

So for avoid the exception i'm trying to force the use of a Noop HostnameVerifier, like in the following piece of code i'm tring to make it work:

	   AlfrescoClient client = new AlfrescoClient.Builder().connect(urlAlfresco, username, password).build();

	    //TRUST ALL CERTIFICATE Create a trust manager that does not validate certificate chains
		X509TrustManager[] trustAllCerts = new X509TrustManager[] { 
				new X509TrustManager() {			
					public java.security.cert.X509Certificate[] getAcceptedIssuers() {return new java.security.cert.X509Certificate[0];}
					public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {}
					public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) {}
				} 
		};
		//TRUST ALL HOST Ignore differences between given hostname and certificate hostname
	    HostnameVerifier hv = new HostnameVerifier(){
	    	public boolean verify(String hostname, SSLSession session) { return true; }
	    };
	     	
		SSLContext sc = SSLContext.getInstance("SSL");
		sc.init(null, trustAllCerts, new SecureRandom());
	   
       client.getOkHttpClient().newBuilder()
       .hostnameVerifier(hv)
       .sslSocketFactory(sc.getSocketFactory(),trustAllCerts[0])
       .build();

	   RequestQuery query = new RequestQuery().query(queryLucene).language(RequestQuery.LanguageEnum.LUCENE);
       QueryBody body = new QueryBody().query(query);

       // Request
       retrofit2.Response<ResultSetRepresentation<ResultNodeRepresentation>> response = client.getSearchAPI().searchCall(body).execute();
       if(response==null || !response.isSuccessful()){
    	   throw new IOException();
       }

but the javax.net.ssl.SSLPeerUnverifiedException still going up for unknow reason.
There is some error in my use of the OkHttpClient of Alfresco Client?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.