I have a codeunit that worked well in BC on premise (before the need for OAuth) - it took the contents of a file and processed it using the following procedure in a codeunit exposed as a web service:
procedure FromWebService(BigTextVar: BigText) ErrorsReturned: Text[1024];
by using .Net - reading in the data from a file (My.Computer.FileSystem.ReadAllText into a string variable) and calling a Web Service object passing this variable.
What I'm struggling with is how to call this using OAuth.
I have set up the connections ok (I can successfully call a Page web service with some sample code I found).
But I can't find sample .Net code that gets an OAuth token then calls a codeunit that has parameters (note my file data with contain carriage returns and spaces etc).
Has anything done this type of thing please, and can point me in the right direction for some sample code?

Report
All responses (
Answers (