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.
Related
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.
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.
I have a mock web service running in soapUI 4.5.1 which looks up peoples names and addresses. I have a large dataset of names and addresses in a .txt file which I need to search for and verify with the web service.
The idea is to produce a count of the names which are valid and invalid.
I've created a Netbeans project to code a file reader to read in the text file and I need to connect to the web service to perform a bulk search.
Does anyone know a good tutorial to follow? Or suggestions of the best way to approach the problem? I've looked all over the internet, but I'm not too sure what I'm looking for..
Thanks!
Your requirement as far as I understand:
"Read a name and address from a text file and send them to a web service to verify"
1) If you DO NOT want to use a Java EE container then read this:
http://today.java.net/pub/a/today/2007/07/03/jax-ws-web-services-without-ee-containers.html .... as mentioned here jax-ws-web-services-without-ee-containers
The only difference in your case will be that you will use SoapUI to interact with the endpoint.
2) If you want to use a Java EE container, which is available free with NetBeans if you have the free enterprise download of it.
The way I will do it; I will have a web service running on a server. I'll connect to the web service from SoapUI. I will send a username/address and the web service will return something for example a string "valid" or "invalid". So the mock code is on the server not in soapUI.
Since you are using NetBeans, you should create a web service using NetBeans;
http://netbeans.org/kb/docs/websvc/intro-ws.html
Develop a SOAP based web service and connect to it with SoapUI. The web service is where your MOCK code will go, making it a MOCK Service which you can replace with real code afterwards.
You can put your file on the server or make it part of the application as a property file. In that case, create a web service on server that will verify the name/address list and send you back a count of valid and invalid.
If the data is too huge and you want to keep it on a local file on your machine, then you need to use jax-ws clients appraoch. You will read the data file in a class and then use the clients to send one at a time to the web service and keep a valid/invalid count.
........................