Java Application to connect to sharepoint 2013 using webservices - java

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

Related

Java Rest API to connect to Sharepoint

I am trying to connect to Sharepoint using java of my web application.
I don't want to use Jshare or java-sharepoint as they are not in my organisations repository.
If anyone has done it previously without them please share the code snippets or any links that will be helpful.

Setting up a basic cloud for documents using Java EE 7

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

MS Project Server 2010 Java API

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.

What is the easiest way to generate a Java client from an RPC encoded WSDL

I’m new to the concept of web services and I’m currently working on a project where I need to retrieve some data from an external application via SOAP.
This application provides an RPC encoded WSDL. I’m currently finding it very difficult to create a client for this service in Java due to RPC being superseded.
The closest I’ve got so far is using JAX-RPC but every time I try to run the ws-compile programme I get an error which states “error code to large”.
I have researched on AXIS 2, and tried to compile it’s WSDL2JAVA but due to RPC encoding I keep getting exception on all the data binding methods.
I was wondering if I can have some advice or a guide on generating Java Clients from RPC encoded WSDLs. What are the steps? What should I consider before I even try to write the client?
I’m currently using netbeans 6.9.1
If you are trying to generate the client stub from the wsdl url, then follow this
Thank you

Does Spring support SharePoint

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

Categories

Resources