• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Java to SharePoint

 
Ranch Hand
Posts: 971
10
  • 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: 42074
933
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 Hand
Posts: 971
10
  • 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
 
Bartender
Posts: 15737
368
  • 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 Hand
Posts: 971
10
  • 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
Bartender
Posts: 15737
368
  • 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 Hand
Posts: 971
10
  • 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: 28469
210
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
Bartender
Posts: 15737
368
  • 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
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic