I'm planning to setup an Enterprise application where the Java standalone client can upload and download .doc and .odt documents from an application server (WildFly). I'm evaluating different solutions such as:
Using a Servlet as bridge to upload documents and download using an HttpConnection.
Using a REST Web service to upload and download the document
Using an EJB and passing the document as argument and returning the document from the EJB call
I think all of the above solutions should somehow work, but which is more fit for a Desktop application, which also needs some level of authentication during the communication?
Thanks
I agree all of the above solutions should work, however instead of using plain Servlets, why not using HttpClient libraries from Apache which make fairly simple to upload and download files ? There is even a library written on the top of HttpClient which is named Awake file which is opensource and allows secure upload and download of documents from Java Desktop applications and Android clients as well.
Hope it helps
Related
We are trying to write a standalone java application (got sample from web ) which will push the files from a source folder to a sharepoint location using published sharepoint webservices.
Reason for using java is : This will be later plugged-in to another code.
Below are some points:
wsdl2java utility has generated java bindings for our sharepoint's copy service.
https://abc.sample.com/site1/_vti_bin/copy.asmx
Trying to use the generated stubs in my code to connect to sharepoint.
I getting below error
com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 403: Forbidden
This seems to be related with Sharepoint oline authentication mechanism. Given limitation I cannot use C#, can anyone please help me in solving this problem in java. .
I could see similar C# example... but not sure if such functions are readily available in java.
Upload document to Sharepoint 2013 Online using webservices
You can take a look to this project i've created as i think it will save you a lot of time in this tasks. I faced up similar problems and was not able to find a working solution, so i created this rest api wrapper fort he sharepoint online rest api v1 (not fully implemented)
https://github.com/kikovalle/PLGSharepointRestAPI-java
we are working on our graduation project project that has two main block
1- A website that is written in ASP.NET
2- A webservice that access the database (mySQL DB) , do some processing on data and communicate with that website to show the results.
We are using a java library [Apache Mahout] in that webservice to help us do that processing and that's why we need to write this webservice in JAVA
How can we create and host a Restful java webservice on Windows Azure ? What are the available options ?
Also , Is it possible to start the processing and stop it depending on a request that is sent from the website or another block (another webservice for example) ?
I hope the situation is now clear.I would appreciate if you could provide us with any resources that could help us understand how Restful java Webservice in Azure works :)
Today you have two options for running Java on Windows Azure: Cloud Services and Virtual Machines. Cloud Services (Platform as a Service) enable you to package up a web deployment (WAR) along with a JDK and your java server of choice (Jetty, tomcat, Jboss, etc) and deploy it. Your other option is to use a virtual machine (Infrastructure as a Service). You have a few different options for virtual machines (including officially supported Oracle images: http://www.windowsazure.com/en-us/campaigns/oracle/).
Your easiest option will be looking at Cloud Services (though this does require packaging no a Windows computer). There is a great Windows Azure plugin for Eclipse that will help you out tremendously (http://msdn.microsoft.com/en-us/library/windowsazure/hh694271.aspx). There are also a lot of tutorials, resources, and links to references here: http://www.windowsazure.com/en-us/develop/java/.
Azure websites now supports Java web applications - check it out - http://azure.microsoft.com/en-us/documentation/articles/web-sites-java-get-started/ - you use the default JDK 7 with Tomcat 7.0.50 or Jetty 9.1.0 OR you can even upload your own web container and configure it as per your requirements. Please refer to the link above.
I have created a Java web service using Axis2 Framework/Eclipse and deployed it on Azure Websites.
I'm looking for a way to write a Java application interacting with an MS Project Server 2010. I've read that a web API exists for MS Project Server, but could find no documentation on it. All the examples I've found so far use some C# library hiding all the API calls.
I'll be thankful for your advice on what tech to use to make this interaction possible.
There is no Java API for Project Server.
Project Server API is based on SOAP web services, but it uses non-standard data structure .NET DataSets to exchange data with clients. And actually the only problem - there is no implementation of the DataSets for Java.
The most common solution is to write a proxy web service using .NET which converts the DataSets to something supported by Java and write a Java client which works with the proxy.
Until today I used RESTFul Api to extract content from Alfresco repository so, with an Alfresco Web Script I was able to get the right contented I need. Until today. Now, I need to extract translated content from Alfresco but it seems that Alfresco Javascript API doesn't support the multilingual translation of a content. Do you know it there is another way to get Alfresco content from my web application?
I tried using Alfresco Web Service API for Java with:
WebServiceFactory.setEndpointAddress(alfresco_webservicefactory);
AuthenticationUtils.startSession(getAlfrescoLogin(session), getAlfrescoPassword(session));
but I get this exception:
05:41:25,576 ERROR ApplicationProperty [72] - Can not initiate session with Alfresco server.
java.lang.NullPointerException
at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
it seems it's not possible to open a connection from my Tomcat to Alfresco because trying from a simple Java main class it works (but really slow and not applicable to a web application)
Any suggestion?
Does Spring support SharePoint?
In my Spring Application, i would like to SAVE data in ShaePoint.
In another (java) application of ours, we are using CAML to read/update the data in SharePoint.
Do you think I should use the same(CAML) or does Spring provides any APIs which makes my job easy.
Thank You :)
EDIT: Its SharePoint 2003 and WSS 2.0
Using your Java application you should be able to send XML to the SharePoint webservices. Check this link for the WSS 3.0 web services SDK: WSS 3.0 Webservices SDK (MSDN)
AFAIK SharePoint should also support HTTP GET/POST for reading/writing data. However, in my own experience, reading/saving data from Java to SharePoint usually involves problem at the authentication level. In fact SharePoint usually uses NTLM authentication, which is hard to implement in Java. I did some experiments in the past using HttpClient and implementing NTML authentication as described here, which requires jCIFS.
Another quicker, but dirtier, option is the following. Since SharePoint ultimately stores files on the file system, just expose that path as a Windows UNC Path, and make it available from the machine where your Java application runs. Then, Java can just open a File on the UNC Path in the usual way, and everything is transparent for you application (A UNC Path will look something like \\machine-name\path\to\store). This is not very elegant, and possibly not very secure.
Here is the download link for WSS 2.0 WSS 2.0 SDK Download