OData service can be called in Browsers but in Excel 2016 - excel

I got a sample servlet using Olingo lib: https://odata-demoservice.run.aws-usw02-pr.ice.predix.io/DemoService.svc/Products. It works fine in Chrome/IE/FF or in Postman. But when I query in Excel 2016/OS Windows 10 with the steps like:
New Query
From Other Sources
From OData Feed
Got the error like: "We encountered an error while trying to connect. Details: Invalid URI: The hostname could not be parsed"
Any ideas are appreciated.
Thanks

#RodolfoOliveira: yes, I resolved this issue. the reason is that when I deployed it to Cloud, the uri in metadata is still http. What I did is implement a CustomProcessor and correct the url.
More detail is here: https://issues.apache.org/jira/browse/OLINGO-758
just need to do the custom Processor. Do the same as the original source but change a bit about the url. Detail in here: https://olingo.apache.org/javadoc/odata4/org/apache/olingo/server/api/processor/DefaultProcessor.html
Register it with the Handler at first, then the issue should be solved.
ODataHttpHandler handler = odata.createHandler(edm);
handler.register(new CustomDefaultProcessor());
Hope this help.

Related

500(Internal Server Error): Forge deployed on Azure

I am new to this topic. I have deployed my app to Azure (following the tutorial from Autodesk). When I try to press to the login to BIM360 is return an error 500 (internal Server Error). I have changed the FORGE_CALLBACK_URL = "htttp://forgeSample1234.azurewebsite.net/api/forge/callback/oauth"
The code has no problem when in localhost.
Does anyone has the same problem?
Please note that when updating the callback URL, you actually have to change it in two places:
in your code (that's typically the FORGE_CALLBACK_URL)
in your Forge app page in https://forge.autodesk.com/myapps
And of course, the URL has to match exactly in both places.
Also, it looks like there might be a typo in your URL: you say htttp instead of http, and I'm also wondering if you shouldn't be using https?

application not found with luis api version 3.0 preview

I was testing the new preview 3.0 version for LUIS on the test console available at "https://westus.dev.cognitive.microsoft.com/docs/services/luis-endpoint-api-v3-0-preview/operations/5cb0a9459a1fe8fa44c28dd8/console" .
Despite I am using the same key and app id that correctly work for version 2.0 I get as response the error message "The application wasn't found. Please make sure that the application is published to this region".
The ID for the application I inserted in the console form is published for westus region, the error message seems not truthful.
Anybody else is having the same issue?
Thanks
It seems like a bug in the documentation. Please try adding /slot/{slotName}/ before the predict keyword, where slotName is either staging or production. So the url becomes:
https://westus.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/versions/{versionId}/slots/{slotName}/predict?query={query}
An example would be:
https://westus.api.cognitive.microsoft.com/luis/v3.0-preview/apps/a1fc3658-a4c5-4fb2-88d3-69ba49e7abad/versions/0.1/slots/production/predict?query={query}
Thanks for your reply.
I added the /slot/production or /slot/staging part to the URL but this seems not to be enough for me.
After this change I get a 404 error as answer:
{
"error": {
"statusCode": 404,
"message": "Resource not found"
}
}
This is a new feature introduced in v3. We now allow publishing to the endpoint using the version Id instead of publishing to a slot. Since the version publishing isn't supported in the UI currently, you won't be able to publish to a version (yet). For now, use the publishing slot as Omar suggests.
Below the working Request URL produced by the get published slot prediction console, available at https://westus.dev.cognitive.microsoft.com/docs/services/luis-endpoint-api-v3-0-preview/operations/5cb0a91e54c9db63d589f433/console :
https://westus.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{APPID}/slots/Production/predict?query={QUERY}&verbose=true&log=true&show-all-intents=true
Thanks

Uploading a file to SharePoint copyintoitems throws error

I am uploading files to SharePoint using the API Copy.CopyIntoItems. The upload works when the destination url is given as "http://sharepointserver/sitename". However, when the url is given with the domain name, like
"http://sharepointserver.domain/sitename", then the CopyIntoItems API call fails, and the error returned is "Object reference not set to an instance of an object".
Any idea on why there is a strange behavior when the url changes?
You can not use the url with the domain name, like "http://sharepointserver.domain/sitename" for Copying item
The following answer on SO links to a thread on MSDN, which explains in detail why this behaviour occurs: https://stackoverflow.com/a/2692212/274354
Link to the MSDN thread:
CopyIntoItems errors when using destination URI with FQDN

API Error Code: 100 using passport-facebook in nodejitsu

I've been developing this app during the last few weeks, which uses a login system based on passport-facebook, and everything was working fine on my dev computer until I decided to test it on nodejitsu.
The error that im getting is:
API Error Code: 100 API Error
Description: Invalid parameter Error
Message: redirect_uri URL is not properly formatted
The redirect_uri is: https://www.facebook.com/dialog/oauth?display=popup&response_type=code&redirect_uri=http%3A%2F%2Ftookie_beta.jit.su%2Fauth%2Ffacebook%2Fcallback&scope=email%2Cuser_website&client_id=399936936740982&type=web_server
Which looks fine to me, so I'm kinda lost.
This was the configuration that i was using on my local machine:
And this is the configuration that I have now:
Does anyone knows what's going on, or what i'm missing here ? Thanks !
I believe that your Site URL is wrong. Shouldn't it point to http://your-subdomain.jit.su?
Hasn't nodejitsu dropped its service as it was bought out by GoDaddy :(
Link: https://blog.nodejitsu.com/nodejitsu-joins-godaddy/

Sharepoint Lists.asmx: The request failed with an empty response

I'm writing a very small app to create and test caml querys for sharepoint. While executing the GetListItems method I'm receiving the following exception;
System.Net.WebException: "The request failed with an empty response."
The service is located on a https address (ssl). I setup the service as follows;
result = new ListService.Lists();
result.Url = siteUrl;
result.Credentials = new NetworkCredential(txtUserName.Text, txtPassword.Text, txtDomain.Text);
I invoke the GetListItems() method as follows;
xmlResult = spList.GetListItems(listName, string.Empty, camlQuery, null, string.Empty, null, string.Empty);
I'm trying to find out why I'm getting the empty result message. I've also tried other methods (i.e. GetListCollection) but to no avail.
At first I thought that the problem might be the URL (http instead of https), but that is not the case. I even checked it with wireshark to make sure the right URL is used.
Did someone come accross this problem and how did you solve it?
OMG...! I've solved it after all. After posting this question, I tried to get hold of the wsdl the check the service itself. When I checked it via internet explorer all was ok. When I tried to add it as a reference in VS it went wrong. So something was not ok. Then it occured to me that there was a new login screen for our company network.
After some quick phonecalls I learned what the problem was; IT Services installed a ISA 2006 server and 'forgot' to tell me. The ISA server was blocking all trafic on the HTTPS port (443) for unkown programs and or clients. That's why internet explorer presented me with a new and shiny login dialog.

Resources