• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java to SharePoint

 
Ranch Foreman
Posts: 883
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are successfully creating results from test scripts from Selenium / Java scripts.    Now we want to automatically send the results into SharePoint.    
I have been looking at code I find by Googling.  The Java examples are not understandable.   I don't know the SharePoint API.   I did see one example written in .vbs that makes more sense to me but then I found out that .vbs is no longer automatically available in Windows 10.  
One idea I have been considering is converting the example to VBA and trying it inside of Excel.

I tried mapping to the SharePoint drive but Windows wont allow it.   I thought perhaps I could just copy files to the URL after it was mapped.

I was also thinking of navigating to SP with Selenium but I'd rather do this through code or the API or something like that.

Does anyone have code available for copying a file into a specific area in SP?
If not, could you give me some guidance of how to get started?

Thanks,

Kevin
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kevin,
There might be an easier way. If you are adding the file to a Sharepoint library, you can email it! You set up a unique email address in the library settings on SharePoint. Then you use Java mail (for which there are lots of examples online) to email the file to that address. The file then gets added to the Sharepoint library automatically.
 
kevin Abel
Ranch Foreman
Posts: 883
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't know that Sharepoint has this feature.  I'll look for it.  I'm thinking that the feature lets the user set to where the files should go.

This is a great idea!

Thanks,

Kevin
 
Saloon Keeper
Posts: 15535
364
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the past, I've relatively easily saved files to SharePoint using the Microsoft Graph API.

It appears Microsoft Graph has some developer resources dedicated to Java: https://developer.microsoft.com/en-us/graph/get-started/java
 
kevin Abel
Ranch Foreman
Posts: 883
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stephan,
I took a look at the site.  I don't know enough to know how to use the information on it.
I thank you for the information.
Kevin
 
Stephan van Hulst
Saloon Keeper
Posts: 15535
364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are you having issues with? It's there anything we can do to help?
 
kevin Abel
Ranch Foreman
Posts: 883
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stephan,

I'm going through old posts of mine.  You offered to assist me on this and I never got back to you.  I don't remember the details of the situation and I'm not on that project any longer.
Maybe I'll need to work with Java and SharePoint in the future.

Thanks,

Kevin
 
Saloon Keeper
Posts: 27809
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kevin Abel wrote:Maybe I'll need to work with Java and SharePoint in the future.



Note if you're lucky.  

But these days. the first thing I'd look for when talking to almost any server would be a ReST API. Two years ago, I might have thought about a DCOM native interface library, but I think that approach is pretty much dead now. Especially since it only worked for Microsoft Windows OS.
 
Stephan van Hulst
Saloon Keeper
Posts: 15535
364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just in case somebody else stumbled upon this topic looking for help: the Java SDK for the Graph API can be found here: https://github.com/microsoftgraph/msgraph-sdk-java
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic