Wow, so I had 32 views on this post with no solutions!
Anyways, I'm happy I literally stumbled on the solution. I found that the invocation code I was using had "https://" in it when the destination was http://. All I did was to delete the "s" and voila!
Please note that it wasn't the https:// in the commented section of the code but within the script body itself.
Hope this helps someone.