ENOTFOUND - soap into rest with loopback - node.js

Few days ago I was looking for a way to consume SOAP Webservices with nodesjs. So after some researches, I've found loopback-connector-soap, it looks very amazing tool with a lot of possibilities.
So I "get started" here https://strongloop.com/strongblog/soap-into-rest-apis-with-loopback-node-js/
everything seems to be ok except two things :
1/ I have a ENOTFOUND when I launch the weather-rest server with an http link to the wsdl.
So I copy/paste the wsdl in a file and called it with 'path'
2/ now it's working but when I try the link :
"/api/WeatherServices/forecast?zip=94555"
I have this page :
testing soap connector rest
it's the same ENOTFOUND I had in 1/
So what could be the problem ?
Thanks for your help (and sorry for my english...)

Related

MS Teams | Microsoft bot framework - Returns 502 error on task/fetch

I have an MS Teams adapter written using the botframeworks sdk v4 for node js which works perfectly for normal conversations. But when I try to do a task/fetch, it returns an error message "Unable to reach app. Please try again." on the task module popup
I can see from the inspector that it returns 502 response for the request to invoke the task module
The task module returns a simple adaptive card and I can see that I get a callback on my handleTeamsTaskModuleFetch function from the logs
The adapter runs on a docker container with an nginx proxy and the nginx logs shows that, it returns a 200 response whenever I click on the task module launch button
I have a similar setup in my dev and taskmodule works perfect there
Any help is highly appreciated
Update
I have tried hardcoding the adaptive card. That doesnt help either
Eventually it was found that there was a problem with one of the csp headers and microsoft was not happy about it.
I removed the CSP headers and the taskmodule started working
Thanks to #gousia-msft for your help in debugging the issue

OData service can be called in Browsers but in Excel 2016

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.

Microsoft sample WordCount does not work on Local Cluster

I am trying to learn the development process for Service Fabric
by using one of the popular samples from Microsoft, called WordCount.
I do not have Azure account yet, so I installed the Local Cluster
on my Windows 10. I went through the instructions on Microsoft
website and most of it works. I can see the Cluster Manager with:
http://localhost:19080/Explorer
where I can see the application:
fabric:/WordCount WordCount 1.0.0 OK Ready
From inside the Powershell I can connect to the Local Cluster
and run the cmdlets with output as expected
Get-ServiceFabricApplication
Get-ServiceFabricService -ApplicationName 'fabric:/WordCount'
Get-ServiceFabricPartition 'fabric:/WordCount/WordCountService'
The problem is when I run
http://localhost:8081/wordcount/index.html
the browser does not display anything. It is supposed to display
the counts of words generated by client-side JavaScript
and processed by ASP.NET Web API. My browser has JavaScript enabled.
I do not know yet enough about the code in the sample but I have its solution with 4 projects loaded in VS2017. I just want to make it work ASAP.
Below I attach a part of console output in my browser (FireFox). Apparently, the JS script is getting
[HTTP/1.1 404 Not Found 0ms]
in response to all requests.
POST
XHR
http://localhost:8081//wordcount/index.html/api/AddWord/WYVyl [HTTP/1.1 404 Not Found 0ms]
XML Parsing Error: no root element found
Location: http://localhost:8081//wordcount/index.html/api/AddWord/WYVyl
Line Number 1, Column 1: WYVyl:1:1
POST
XHR
http://localhost:8081//wordcount/index.html/api/AddWord/YcIMv [HTTP/1.1 404 Not Found 0ms]
XML Parsing Error: no root element found
Location: http://localhost:8081//wordcount/index.html/api/AddWord/YcIMv
Line Number 1, Column 1: YcIMv:1:1
GET
XHR
http://localhost:8081//wordcount/index.html/api/Count [HTTP/1.1 404 Not Found 0ms]
XML Parsing Error: no root element found
Location: http://localhost:8081//wordcount/index.html /api/Count?c=0.7465426272903215
Line Number 1, Column 1: Count:1:1
The problem is that you're trying to open up "http://localhost:8081/wordcount/index.html" while you should use "http://localhost:8081/wordcount/". Otherwise the javascript code builds incorrect url to access the services.

Nest Javascript Thermostat sample not working - 400 Bad Request

I've built the sample app from here: https://developer.nest.com/documentation/cloud/control/
I've created a Client configuration on the developer site with the callback url http://localhost:8080.
The app loads and brings you to the Nest login screen. After entering details it should redirect back but instead the URL https://home.nest.com/session fails with a 400 Bad Request and the response:
{"error":"invalid_request","error_description":"missing user credentials"}
Has anyone got this sample working lately? I believe it's failing in the server.js file at this line (but I'm no Node expert unfortunately):
app.get('/auth/nest', passport.authenticate('nest'));
I've replaced the firebase.js file with the version from the Nest site. Could this be a bug in a recent version of Express or the Nest Passport library?
Tried on OSX, Linux and Windows and getting the same issue.
Thanks!
The OAuth Redirect URI in your client for this example should be http://localhost:8080/auth/nest/callback and be sure that your permissions are set for Thermostat read/write.

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/

Resources