ColdFusion and REST - rest

According to this blog entry, REST is available in ColdFusion.
However, I have multiple sites, so when I navigate to
localhost/rest/Example/hello
I get "Hello World", but if I go to
http://mysite.com/rest/Example/hello
I get HTTP Error 500.0 - Internal Server Error
Requested URL http://mysite.com:80/jakarta/isapi_redirect.dll
If I go to the IP address, I get "Hello World".
Aaron posted a comment referring to bug 3348765, but I'm not sure that helps me get this first Proof-Of-Concept working.
Q: How do I get REST to work in ColdFusion if I have multiple sites defined in IIS?

Have a look at this: http://blogs.coldfusion.com/post.cfm/rest-support-in-coldfusion-part-i tutorial.

Apparently, mysite.com is very unlucky domain name since lots of people trying to use it for learning or testing purposes. That's just a website and most likely they don't have a ColdFusion 10 REST webservice.
Your problem with localhost seems to be the web-server issue. If you open http://localhost, do you see the same website as http://127.0.0.1? These could easily be two different virtual hosts (websites, in terms of IIS).
Solution would be to check how your ColdFusion is installed with your IIS. Even better solution would be to set up some virtual host for playing with code, for example I've got virtual local hosts like localhost.coldfusion, localhost.railo, etc.
Hope this helps.

Related

How to use Google Action Builder with my own server

I want to develop an action to google assistant. So i red the documentation here https://developers.google.com/assistant/conversational/overview and i followed this tutorial https://www.youtube.com/watch?v=Z1hxvniJ18s
It s worked and i was allow to develop and test my app in the simulator. The problem is that when it's come to webhook i don't totaly understand how it's work. On the webhook icon i got this
The seconde one allow me to use Google cloud function and firebase but i had to add my billing account to make it available. I also get a console where i can code my fonctions and my responses.
And if i am correct, the first one allow me to connect to my own Api. But i can only enter one field that is the URL adresse and nothing else so how do i code it? Also i see everywhere people using node.js and i would like to use php is it possible?
To sum up my problem, i would like to know how i could connect my action builder to an other service(Api) than google ones? If it's possible to run my server in php and how do i interact with my google action?(I think it's by sending json back and forth but i'am not sure how to do it?) Finally i would like to know if it's possible to test it in local server with mamp and phpmyadmin for exemple to test the answer of the server?
I would be very grateful if someone could help me, show me how to set up all this.
But i can only enter one field that is the URL adresse and nothing else so how do i code it?
When you develop your webhook, you will need to have a single publicly accessible endpoint to connect with. This endpoint will receive an HTTP POST request and you will need to respond with an appropriate response.
Also i see everywhere people using node.js and i would like to use php is it possible?
Any language that can run on a web server can work. Node.js is one that is used a lot, but PHP can work just as well. You can create an actions.php file and then enter an endpoint address https://example.com/actions.php that will be called. You may need to refer to the Request and Response reference for the expected format.
if it's possible to test it in local server with mamp and phpmyadmin for exemple to test the answer of the server?
It's somewhat possible. You'll need to have some method of sending mock requests to your local server, which might be as easy as using cURL or other tools like Postman.
Unfortunately my personal experience with PHP tools is limited, so I can't necessarily walk-through the specifics. But it does seem like you know these tools a bit more and should be familiar enough to be able to get started.

How to configure Big Blue Button for Xirsys TURN server?

I run an self-hosted instance of BigBlueButton and signed up for Xirsys TURN server services because we need to serve clients behind (pretty restrictive) firewalls. Before I had been running my own instance of coturn, but as this led to problems recently, I thought I will got someone who does this for a living a try.
Now the configuration in BBB is explained here:
https://docs.bigbluebutton.org/2.2/setup-turn-server.html
Yet so far I completely failed to match the parameters I receive from Xirsys with what I have to put into the /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml file in the place of the <turn.example.com> and <secret_value>.
Did anyone ever make this work? I did try and find a tutorial but also failed.
bbb_web, is returning this the turn uris. passwords to the html5 client, that the client is using in sip.js
so you can either get bbb-web to send valid username/passwords is same method is used, or modify the html5 client to make a Xirsys api call, to get access to the turn candidates.
Would need to look at api docs. twilio has a similar service.
regards,
Stephen
not the most elegant solution but the easiest one for me:
modify the final bbb js bundle to load the stunturn info from a fixed url in
e.g.
/usr/share/meteor/bundle/programs/web.browser/f30716b2b57e2862c4db2325 b7aac63f4622842b.js
the minified part should then look somewhat like:
const r=Meteor.settings.public.media,i='https://<yourbbburl>/html5client/stunturn.json',a=r.cacheStunTurnServers,s=r.fallbackStunServer;
and put either the static credentials or generated ones in a file stunturn.json besides the js bundle.

Nginx access log problems

I followed a course on skillshare where the instructor went over how to create a blog using the Mezzanine CMS for Django. I have my blog deployed on DigitalOcean.
I have issues when trying to use my contact form. I have looked into my access.log file to see what was wrong, but found that nginx only returns a 500 status code, and nothing else. So, I can't troubleshoot any further.
My question is how can I get a more verbose error message? I want to know if my password isn't working, or if the email host isn't correct. I am using smtp.gmail.com as the host in my settings. At the moment, I can't tell what exactly is wrong with my configuration. I've looked into many posts, and have tried multiple things. I am sort of lost at the moment, because I want to get my contact page working.

wget "awaiting response..." forever. Works fine for other sites or from another server

I have spent hours and hours on this. I have contacted my server provider who assures me they cannot block me. I have contacted multiple people at NOAA and have been assured I am not blocked. But about two weeks ago a script that has been working for 5 years quit working. The script works from home but not from 1and1. I see differences in what wget does but cannot see anything wrong. The main difference is that one server translates the encoding to UTF-8 while the one that works does not. I do not think that is the problem as I am not getting a file not found error and I see the same thing with sites that work fine. I am pasting the same exact text in both servers so no difference in my command. I get no error message, just waiting for response.
This diagram is a summary of my tests. It does not point to an obvious source of the problem so I am asking the experts here. Local and 1and1 are the servers, ndbc and noaa are the data sources. As you can see, the data only fails with 1and1 but 1and1 only fails with one data source. By fail I mean connected but no response.
Here is what I see on my home server.
Everything is correct and the file is saved.
If I paste the exact same text into my 1and1 server I get this
No matter how long I wait, no response.
The interesting thing is that if I ask for an invalid file, I correctly get an ERROR 404 so I know they are responding to me. ndbc says they can see my traffic and that they are not blocking me.
And finally, to show that wget works on other domains here is a fetch of the noaa home page:
Does anyone know what is going wrong either with something I am doing or with what ndbc.noaa might be doing or what might be wrong at 1and1 so I can get a handle on where the problem is?
I have implemented a kludge workaround by downloading the data to my myth server and using sftp to upload it to the 1and1 server but this is not a long term fix.
By the way, I see the same thing if I try using lynx to access www.ndbc.noaa.gov. I can download their home page from my myth server but not from the 1and1 server. I can use lynx to get home pages from www.noaa.gov from either server.

Deploying a web service to my Google App Engine application

We made a simple application and using GoogleAppEngineLauncher (GAEL) ran that locally. Then we deployed, using GAEL again, to our appid. It works fine.
Now, we made a web service. We ran that locally using GAEL and a very thin local python client. It works fine.
We deployed that, and we get this message when we try to visit our default page:
"Move along people, there is nothing to see here"
We modified our local client and tried to run that against our google site and we got an error that looked like:
Response is "text/plain", not "text/xml"
Any ideas where we are falling down in our deployment or config for using a web service with google app engine?
Any help appreciated!
Thanks // :)
Looks like you're not setting the Content-Type header correctly in your service (assuming you ARE actually trying to send XML -- e.g. SOAP, XML-RPC, &c). What code are you using to set that header? Without some indication about what protocol you're implementing and via what framework, it's impossible to help in detail...!
Looks like we aren't going to get to the bottom of this one. Just not enough information available at debug time. We've managed to affect a fix on the service, although I hate ot admit it we never found out what was causing this bug.