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.
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
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 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 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.
........................
My plan is to set up a php-based website except all the dynamic data would be loaded through a local RESTful webservice.
The local RESTful webservices would be created using Java Jersey, which will access a MySQL database. The reason behind this is because I would like all the logic to be handled by Java.
Would this perform poorly? I have created RESTful services before and created php websites but never used them together...would calling a webservice on localhost be a terrible way to set this up?
Yes and no. If you plan to extend this beyond a website, e.g. if you plan to have other applications consume your web services, then I'd say it would be an appropriate design. Otherwise, no need for the overhead.