Does anyone have successful story ( examples ) to be shared with how to integrate Powerbuilder with Microsoft sharePoint on line ?
Does anyone have successful story ( examples ) to be shared with how to integrate Powerbuilder with Microsoft sharePoint on line ?
Good morning.
We solved this problem by creating a C&C class that interfaces with sharepoint DLLs ( NO REST ).
p.s.
Grazie Marco
We have done it using a c# assembly with standard CSOM and Azure API.
It works GREAT and STABLE in Pb2019R3.
Also we are using c# exe files that we Run() to execute tasks in the background on legacy sp platforms 07,10,13
Tell me what you want to do and I might be able to help.
//Steen
Good morning.
We solved this problem by creating a C&C class that interfaces with sharepoint DLLs ( NO REST ).
p.s.
Grazie Marco
Hi, do you mind sharing the method you use? Thanks
Hi Gimmy,
CoderObject and HttpClient already provide all the necessary for authenticating against SharePoint and perform operations, for example get items and upload files.
A mockup for authentication:
// Build authorization in Base64
ls_auth = coderObject.Base64Encode(Blob("username:password", EncodingANSI!))
// Set headers
httpClient.SetRequestHeader("Authorization", "Basic " + ls_auth)
httpClient.SetRequestHeader("Accept","application/json")
// etc....
// Send authentication request (check your SP URL)
li_rc = httpClient.SendRequest("POST", "http://sharepoint_server/sites/doc/_api/contextinfo")
// obtain the response data
if li_rc = 1 AND inv_HttpClient.GetResponseStatusCode() = 200 Then
// GetResponseBody and parse Json to get, for example, GetContextWebInformation, FormDigestValue, etc...
If you want to get SP's items, send a GET to http://sharepoint_server/sites/doc/_api/lists
If you want to upload files, send POST to SP's folder, e.g. http://sharepoint_server/sites/doc/prev/cf/_api/web/lists/getbytitle
and so on...
Best,
.m
I created a .NET COM dll that did all the SharePoint stuff I needed and then called that from PowerBuilder. There appears to be multiple ways to access SharePoint and I picked the SharePoint client object model.
Examples of how to call it can be found here: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-client-library-code
This has a walkthrough of creating a SharePoint project in Visual Studio: https://www.c-sharpcorner.com/article/sharepoint-client-object-modal-csom/ which would be a good place to start
Then it's just a matter of deciding what you need to do, how the SharePoint site is organised, and how to make your .NET dll in a COM object that can be called by PowerBuilder. We can help you with that here is that's the route you decide to go.