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.
Related
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.
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.
I have a requirement where I need to integrate OBIEE reports with my J2EE based web application. On going through the available documentation, I have understood there are various ways of integration. I am particularly looking for below two methods:
Go-URL
Web service
I wanted to know how will I get to know which web service to use and how. Also, what is the response format of web services, can it be a PDF or image document? I want to integrate using web services because I want control of the report document in my web application and store it in database or a DMS system or digitally sign it before providing it to end user.
How will I know the web service WSDL and pass the filter parameters in the web service request and also specify the response format of the report?
You can find the Web Services documented here: http://docs.oracle.com/cd/E28280_01/bi.1111/e16364/soa_overview.htm#BABHJJAC
Update:
From what I can see, the OBIEE web services don't support export to PDF/image.
If you want to work directly with PDFs, you might need to look at using BI Publisher (BIP) instead, which also supports Web Services. BI Publisher can query existing OBIEE analyses and RPDs. You can also call BIP directly from within a Java application using the available APIs.
I have investiagted Alfresco media-viewers project and also read a lot of documentation on WebScripts.
My idea is to create a Java-backed viewer for the Alfresco Share.
The underlying Java code will be a bit complicated - it has to handle additional URLs to load own resources form the bundle to use them.
The ideal solution is to integrate Java code as Spring Controller and handle URL mapping with #RequestMapping annotation (or through servlet-mapping xml node).
If someone know how Programming with Surf can be used in this case it also would be very helpful.
Have you considered using CMIS to access the Alfresco resource? If your Java runtime will run in a separate process than the Alfresco installation (or on a separate machine) then the CMIS interface would let you do that.
You would write your Spring controller inside a Java web application and then access the documents and metadata using CMIS.
Take a look at Apache Chemistry. which is the CMIS client reference implementation.
Our new start-up company is trying to build a mobile app with an accompanied website. We are trying to setup our application on Amazon Web Services.
We have Java code running in an EC2 instance, which will store data in S3. We want clients (iOS and Web for now) to communicate with the Java Backend via a REST API. Ideally the website would be hosted under the same AWS account.
The Java Code and REST API are already set up in a very basic form, but the setup of the Website is unclear, since this is new to us all. We also would like to evaluate beforehand if such a setup is even feasible.
Since I am in charge of the Website i have already spend hours researching this specific setup, but i simply lack experience in cloud/backend development to come to a conclusion.
Here are some questions we would like to answer:
Where would the HTML files and accompanied JavaScript etc. files be stored?
How can data (images etc.) that is stored within S3 by the JAVA code be accessed from the Website directly?
How could something like bootstrapping of data within HTML files be achieved (in JSON format preferably)?
How could the server be set up to compress certain files like CSS or JavaScript?
Please point me into the right direction, any comment is appreciated.
Where would the HTML files and accompanied JavaScript etc. files be
stored?
Either on the same AWS EC2 box or a different one, just give it a static IP and link that IP to the domain you want, done. Just remember to have port 80 open as a firewall rule.
How can data (images etc.) that is stored within S3 by the JAVA code
be accessed from the Website directly?
The files will have some url that you can link to directly in your html so it's essentially just a url.
How could something like bootstrapping of data within HTML files be
achieved (in JSON format preferably)?
You have a number of choices here. You could potentially create some JSP files to generate the HTML and load the JSP files on access and cache them so they load up super fast. You could argue however, this is overkill and in some ways, the REST endpoint should be robust enough to handle the requests.
Part of me thinks you should endeavor to use the REST API for this information so you just have to manage one endpoint, why make an extra endpoint or over engineered solution for the HTML that you then have to maintain? Build once and reuse.
How could the server be set up to compress certain files like CSS or
JavaScript?
During the build process, run the files through a minify process. This is built into maven so you could do it automatically or by hand using something like jscompress. This Minify plugin shows how to automatically minify your resources. Consider you'll need to be using Maven though as your build tool.