'Hello ! I would like to upload datas on a already created cloudsearch domain.
I already process the datas by using a mapreduce job with hadoop to create a string in the JSON format.
I can't find how to upload a String directly to Amazon Cloud Search to get the data into the search domain.
You post the documents to the documents search endpoints. (search endpoints can be found in the AWS console dashboard for your domain).
You can do this using command line tools Amazon provides, or using their java API, use curl, or just write code in your favorite language to post. There's also boto, which is a python library for aws.
Details here http://aws.amazon.com/cloudsearch/faqs/#How_do_I_upload_documents_to_my_search_domain
Related
I am trying to connect from Java to the Sharepoint Online REST API.
I previously used a SharepointOnline ADD-IN registered directly in the Sharepoint system that has permissions to all the site collections (FullControl).
I got the token with the app credentials from the url:
https://accounts.accesscontrol.windows.net//tokens/OAuth/2
I can make requests to the Sharepoint REST API directly
Now I have to switch to an Azure registered app.
The code is written in Java and I use the Azure sdk-com.microsoft.azure (artifactId-azure). I can successfully retrieve a token, but this is not valid for later requests to the Sharepoint REST API.
I get this error:
'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."
Is there any possibility to get a valid token for Sharepoint REST API requests?
Yes this is possible. Check out the below document:
https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread
When using SharePoint Online you can define applications in Azure AD and these applications can be granted permissions to SharePoint, but also to all the other services in Office 365. This model is the preferred model in case you’re using SharePoint Online, if you’re using SharePoint on-premises you have to use the SharePoint Only model via based Azure ACS as described in here.
Hope this helps!
You can take a look of this project i've develop (and i'm currently working on it on my free time) where you have a working implementation of a java API to communicate with sharepoint rest api v1 and perfom common operations (rest api is still not fully covered but has most common operations and also provides a starting point with working examples). You can take a look of it at
https://github.com/kikovalle/PLGSharepointRestAPI-java
Can you provide any sample code available to access out-of-box web scripts( provided by Alfresco) from web application
(login to alfresco, create folders, upload documents)
Web-Scripts is new for me. I am used to code using plain java API (Example Filenet API). Does Alfresco provide JAR files containing JAVA API which I can use for all repository operations like login,create folder,upload/download documents etc……..
My requirement is to create folders(spaces) in Alfresco through custom web application and upload documents to those spaces.
You can access out-of-the-box web scripts using the following URL (use your own host and port).
http://localhost:8080/alfresco/s/index
You can refer docs.alfresco.com for more Java, JavaScript APIs and all about Alfresco development.
Thanks
Can you provide any sample code available to access out-of-box web scripts( provided by Alfresco) from web application
As #Kintu said you can access the list of the Alfresco's out of the box webscripts using this URL:
/alfresco/service/index/all
And to make you own web script This tutorial is a good way to get started.
From your web application you can consume them like any other plain old REST API.
Does Alfresco provide JAR files containing JAVA API
Alfresco provides a rich set of services that you can use in your web scripts.
My requirement is to create folders(spaces) in Alfresco through custom web application and upload documents to those spaces
- To create a folder you can use this endpoint:
POST /alfresco/service/api/site/folder/{site}/{container}/{path}
The minimum request body is of the form:
{ "name": "NewNodeName" }
The full set of parameters accepted in the request is of the form:
{
"name": "NewNodeName",
"title": "New Node Title",
"description": "A shiny new node",
"type": "cm:folder"
}
- To upload files you can use this endpoint (HTML form data):
POST /alfresco/service/api/upload
Check the docs for more informations about this endpoint.
I suggest starting with API Explorer, later on you can always use something not documented as nicely as this is.
https://api-explorer.alfresco.com/api-explorer/
As someone who is already familiar with Filenet maybe you are already familiar with CMIS? That is probably the easiest way to create folders and documents in Alfresco. There are a number of CMIS clients available at Apache Chemistry, including OpenCMIS, which is a Java client.
You can find a bunch of code samples at the Apache Chemistry web site as well.
One advantage of using CMIS to do this is that CMIS works on a variety of repositories, not just Alfresco. Why go to the trouble of learning an Alfresco-specific REST API when there is already an industry standard? Learn it once and use it often.
i am working in a IT Company and i need to learn Alfresco. Using Apache CMIS i am able to all operations like Creating Folder, Creating Document, Creating Link of Folder and Document and blah blah.
Now I need to do all the operation using alfresco own web service.
I did google a lot but not able to get a single link over that.
Can any body suggest link or contents from where i can do all the operations using Alfresco own webservice. Document is good but i have less time and i cannot go through the whole document.
It will be helpful if i can get an example build on maven(java)
If you are asking how to use Alfresco via a SOAP-based web service, that no longer exists.
If you are asking how to use Alfresco's native REST API, then you could start by looking at https://api-explorer.alfresco.com/api-explorer/.
If you need to write your own RESTful endpoints in Alfresco that you will then call remotely, you can read my tutorial on Web Scripts: http://ecmarchitect.com/alfresco-developer-series-tutorials/webscripts/tutorial/tutorial.html.
I am new to amazon kinesis so might be this question is very basic question.
But i need help on this,
I am having one use case where i need to pull the data from amazon kinesis into my web application which has been created in JAva, i need to obtain the connection between the kinesis and java so that i can take the data from amazon kinesis and do some of the analytics on the data and if the data is modified then i need to put the data back to amazon kinesis from java application.
here my java application is not on the amazon clould, it is on my private cloud. so how do i do the above task.
Kindly help me.
First of all, Amazon Kinesis API endpoints are on public IP addresses, so you don't need to have EC2 instances within AWS environment to access Kinesis.
To read data from Kinesis, you can use Amazon's own Kinesis Client Library (KCL).
https://github.com/awslabs/amazon-kinesis-client
On AwsLabs GitHub, there are also sample applications written in Java.
https://github.com/awslabs/amazon-kinesis-connectors/tree/master/src/main/samples
About your architecture; if you want to process raw data and create meaningful extracts, I recommend you do some ETL tasks (aka: post processing) and write your results to another place (ie. RDBMS). On the view layer (your web app) you can display the resulting output in any format you like by reading from your database.
In my SharePoint site, there are several document libraries, each assigned to a different group of people. Users need to transfer files between them often, and my boss wants a faster way than copy/pasting the files into another library then deleting the original, and he doesn't want anyone having direct access to the document hierarchy.
Someone had the idea to run Java code that would automatically transfer documents from one library to another, using inputs from a pop-up for the source and destination. Can Java code be stored on a SharePoint server and be executed by a user action?
Java code can not be used SharePoint directly. What you can try is using C# or VB.Net through which actions can be executed on SharePoint using object model of SharePoint.
Another option is using web services
1、You can use then Copy.asmx web service to upload document:http://msdn.microsoft.com/en-us/library/copy(v=office.12).aspx
2、upload large file:http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP
3、About authenication:http://msdn.microsoft.com/en-us/library/copy.copy.copyintoitems(v=office.12)
4、You can use these web services from java:
http://www.coderanch.com/t/478814/Web-Services/java/Microsoft-Sharepoint-web-service-Java
SharePoint Webservice from Java Webapp using CXF with Kerberos/NTLM authentication
Authentication failure calling SharePoint Web Service (JAX-WS client)
Regards
Hiren Gondhiya
You can create a WCF service in SharePoint and then consume it from your Java application.