alfresco / alfresco-client-sdk Goto Github PK
View Code? Open in Web Editor NEWAlfresco Java Client SDK
License: Apache License 2.0
Alfresco Java Client SDK
License: Apache License 2.0
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
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>
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...).
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?
I have noticed that highlighting functionality is not implemented in this project. When do you plan to implement this functionality?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.