Forum Discussion
Data refresh not working : OK on desktop, NOK on Service - 'dynamic data sources'
- 1 year ago
I eventually found the cause why I still got the dynamic source error:
in the code above I simplified the code as
baseurl = "https://X.Y.Z/soap/3/orga_test"
But in reality baseURL was calculated based on a boolean 'useTestURL', which then choose between 2 parameters: the prodURL and the testURL.
So, the baseURL used in the web.Contents was indeed dynamic.
The solutions was: since test and prod have the same bare URI, I've split that part into a seperate parameter which is fixed. And the test/prod is now inserted are part of the relativePath.
baseurl = "https://X.Y.Z/soap/3/"
relPath = if useTest then testRelPath else prodRelPath
apiEndPoint = "getObjects"
cnt = Text.ToBinary("Some SOAP XML")
and then calling
Web.Contents(baseurl, [RelativePath=relPath & "/" & apiEndPoint, Content=cnt])
So stupid
Or does that imply I can not use 'manually written tables' inside a query to define a configuration?
Very likely but hard to tell without seeing the code.
I eventually found the cause why I still got the dynamic source error:
in the code above I simplified the code as
baseurl = "https://X.Y.Z/soap/3/orga_test"
But in reality baseURL was calculated based on a boolean 'useTestURL', which then choose between 2 parameters: the prodURL and the testURL.
So, the baseURL used in the web.Contents was indeed dynamic.
The solutions was: since test and prod have the same bare URI, I've split that part into a seperate parameter which is fixed. And the test/prod is now inserted are part of the relativePath.
baseurl = "https://X.Y.Z/soap/3/"
relPath = if useTest then testRelPath else prodRelPath
apiEndPoint = "getObjects"
cnt = Text.ToBinary("Some SOAP XML")
and then calling
Web.Contents(baseurl, [RelativePath=relPath & "/" & apiEndPoint, Content=cnt])
So stupid