How to set a timeout for Luasoap using https - https

Im developing an sdk to connect to a soap server. (Under https)
Im using LuaSoap to do it and its working as espected with the xml request but now i need to be able to configure the timeout (im in online payments industry and its really important) but I dont know how to do it in LuaSoap.
To be able to enable the https requests i followed the instructions of LuaSoap documentation using this code
local soap = require"soap.client"
soap.https = require"ssl.https"
from this point i dont know what to do or where to set the timeout.
Tnx for ur help.
PD.
LuaSoap uses LuaSec to send the request.

Related

how to use the proxy service without tryit tool in wso2 esb?

I am learning and working on building some wso2 sample prototypes.
I have created a proxy service and tried using it with the tryit tool inside.
But i don't know how to use it externally. i mean how to send data to the proxy service because in API there is a endpoint created where the request is sent.
Is there anything like link to request or how to use it externally in some application.
You can use SOAP UI. Please check the article.
The easiest way to call Your proxy service is to use some Rest Client on Your Browser. I use Add-On in Firefox (RestClient i think). U can create there whole request (json, xml), add headers, Authentications or Content Type. It should helps U to call any services in wso2.

How do I capture https requests with Postman native app using Windows 10?

I am using the Postman native app on Windows 10 and am struggling with trying to capture https requests. Postman's Documentation for this is for Mac and not Windows.
In particular, I am working on a web application that creates a session cookie upon login that needs to be included in most requests in order to be authorized. When I was using the Chrome App, Postman Interceptor achieved this (see https://stackoverflow.com/a/32436131/3816779).
Here's what I've tried so far:
Turn on the Proxy in Postman with port 5555.
Configured windows to send http and https requests through Postman's proxy server (127.0.0.1:5555).
This allows http requests to be captured in Postman
But when trying to connect to https sites, I get an error
Here are my Postman settings if that helps.
Update I ended up switching back to the Chrome App, which uses the "Interceptor" instead of a "Proxy Server" to capture traffic.
Unfortunately, capture https requests with postman native app is impossible in some case according to the official doc: Capturing HTTP requests
Note: for the Postman native apps, request captures over HTTPS will not work if the website has HSTS enabled. Most websites have this check in place.
Postman's proxy now supports HTTPS traffic - https://blog.postman.com/postmans-proxy-now-fully-supports-https-endpoints/
Once you install a CA certificate that Postman generates for your installation, capturing HTTPS requests should be seamless.
Disclaimer: I work at Postman
With Google Chrome i don't know how to fix the issue. But you can use to open the web page for example IE..
EDIT:
Or MAYBE you can start Google Chrome with parameter --ignore-certificate-errors to ignore the error message.
Postman Interceptor is available for Postman native apps which supports both features:
1. Capturing requests
2. Syncing cookies
Learn more here.
Just check HTTPS in setting and will work for you

CORS Issue in WSO2 DSS By using Ajax

Calling Wso2 Dss Services by using ajax is not working like Rest Resource or SOAP UI it causes
Cors Issue , Even i did not get any relevant information about that after a long research What i have to edit in my Configuration File or is some other option is there to fix this issue.
This Case For my apache tomcat Server , i can Simply add Access Control Orgin header as * , but in wso2 its not working out .I dont know even where to add it ..plz give me a good solution for this
You may set up WSO2 ESB on before of your DSS server and you may call your service using ESB proxy or REST end point.If you do that you can set CORS parameters inside outSequence tag.
Same question asked here Call WSO2 DSS service using ajax?

Google checkout callback can't seem to reach https server

I am trying to implement Google Check out (GCO) on a new server, the process seemed to work fine on the old server.
The error from GCO integration console is the timeout error you might expect if there is load on the server and/or the response takes longer than 3 seconds to respond.
To perform a test (not integrating with my database), I have set some code to send an email to me instead. If I hit the https url manually, I get the email and I can see an output to the screen. If I then leave it as that, Google still returns the Timeout error and I don't get an email. So I have doubts as to whether google is even able to hit the https url.
I did temporarily attempt to use the unsecure url for testing and indeed I received the email, however this solution isn't the route we've developed for, so the problem is something to do with the secure url specifically.
I have looked into the certificate which is a UTN-USERFirst-Hardware which is listed as accepted on http://checkout.google.com/support/sell/bin/answer.py?answer=57856 . I have also tried to temporarily disable the firewall with no joy. Does anyone have any sugestions?
Good to hear you figured out the problem.
I'm adding the links below to add a litle more context for future readers about how Google Checkout uses HTTP Basic Authentication:
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API.html#urls_for_posting
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API.html#https_auth_scheme
http://code.google.com/apis/checkout/developer/Google_Checkout_HTML_API_Notification_API.html#Receiving_and_Processing_Notifications

Is it possible to add HTTP headers to a Socket.io handshake?

I'm trying to secure the channel between my socket.io client and the node.js side. The main web application is in Drupal so I can't pass the cookies to node.js if node.js is on another host. I'd like to add some custom headers to he Socket.io HTTP handshake (like the PHP session).
Do you know if it is possible?
Using Socket.io 0.7
P.S: I am just brainstorming here a little bit. I like this problem and am going to think a little bit more about this. I only thought about it yet from node.js same domain only...
Github issue
I don't know(don't think so) if it is possible to add headers.
P.S: I think you should also try to fill issue at https://github.com/LearnBoost/socket.io/issues. The nice thing about github is that author will receive an email when somebody posts an issue. Also the people at learnboost are really nice people who like to help you out.
Proxy
Proxy all your request so that request come from same domain.
Refererer
The refererer is passed so you can pass information from this. This can also be spoofed so you better create something you can validate(only once) from Drupal. I guess this would be pretty easy to implement...
only allow message-flowing after verification.
What I know you can do is disconnect sockets via socket.disconnect(). Open connection and retrieve socket.io's id, but only accept messages after identity has been approved. I would make a route available via express which Drupal can curl post socket.io's id to to (keep route private). Because you are inside Drupal's domain you can access Drupal's session information.
// v0.7.x
var sid = socket.id;
To make this secure the only option is to use SSL(that is the only way you can make any communication link secure anyway). If you trust both domain's SSL is probably not really necessary. Then if socket.io's id is allowed you will allow message-flowing else I would just disconnect the connection.
PusherApp
Another option would be to implement/clone pusherapp authentication => http://pusher.com/docs/client_api_guide/client_channels#subscribe-private-channels
P.S: I will to try and upload an example later, but for now it is time for me sleep. Hopefully this made any sense :)...

Resources