An example is GoogleCL non-browser client as explained here :
http://www.maketecheasier.com/beginner-guide-googlecl/2010/06/23
When you attempt to use the google command for a service for the first
time, it will open your web browser and ask you to authenticate it.
Click “grant access” and then press Enter back in the terminal window.
How Google webservice transfer data back to GoogleCL from the browser ?
I want to do the same kind of callback with my own webservice so I'd like to understand how.
By using a Redirect URI of http://localhost and starting up a local webserver to wait for that redirect. See the code for the tools.run_flow() function in the Google API Python Client library that does this kind of flow:
https://code.google.com/p/google-api-python-client/source/browse/oauth2client/tools.py#110
Related
I was wondering - is it possible to capture requests with Postman standalone app, when requests are issued NOT by a browser, but a Console App or a Windows service? My app is making AJAX calls to a server, I want these calls to be captured with Postman app.
Can you set a proxy for your Console App/Windows service? If yes, then it might be possible.
You need to get the port number from Postman's proxy setting and the IP address from your computer. Apply these two as the proxy for your app, and Postman should hopefully be able to listen in to your requests.
Here's the blogpost from where I found this out.
as I mentioned in the title, I'ld like to know if Web Socket and Web Service can run on the same Server together.
I think that I know your problem because I have just know this since a few hour ago.You need a main code webservice include handler websocket.
Example URL websocket connection: ws://site.com:8080/ws
you can create a handler method GET with uri site.com:8080/ws and take to function websocketHandler
And another Handle work normally
I was trying to deploy a back-end web service to IBM Message Broker. Then create a Java client to call Broker, which in turn calls the back-end web service.
If the Java client can call Broker, then so can any other Java app.
The IBM documentation on the subject is massive. So here are the steps that I took, plus a couple of issues I struggled with, and then resolved.
Two useful links:
Setting up a flow:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fad64230_.htm
Deploying a flow:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Faa40160_.htm
Create a new Application.
Within the Application, create a new Message Flow.
On the flow workspace, on the left menu column, select Web Services.
Select a SOAPInput, SOAPRequest, SOAPReply.
Connect the input to the request, and the output of the request to the reply.
When you double-click on the Request, it will be looking for a WSDL. Select import/create new at the bottom of the window. On the next window, select the bottom option to select a WSDL from outside the environment. Paste in the entire URL to your back-end web service.
Click next and finish on the following windows to get back to the Flow work space.
One point that I struggled with and was not obvious in the documentation, is that you will need to create a new flow for each method in your back-end web service.
In the SOAPRequest properties, set the "binding operation" to the method behind that flow.
Once you build and deploy the bar, you can right-click anywhere on the Flow work space and select Test...
The test tool will display the WSDL of the web service that is deployed to your Broker instance. You can grab that WSDL and use Ant or Maven to create a Java client and call your web service (which in turn calls the back-end service)
That's not strictly speaking true, you can route to a label based on the operation name in the wsdl or even use the SOAPInput node in generic gateway mode. Generally you'll want a flow per "service" not per method.
I write corrective actions for our cutomers (IT people) and one of the steps I'd like to provide them is to easily check if some Remote REST service is up and running.
What is the easiest way to reach this ALIVE() logic?
Can they open web browser and do something like
Http://<Server>:<Port>
or something?
Good solution will be simple console application that will request your rest service with control request and check response of this request.
Update:
If you cannot create this console application, you can give instruction to your customers:
Open browser;
Request Http://:
It should response control response.
I have an ASPX page. When the page is loaded there is code in the code behind that uses an API. The API makes an HTTPS call out to a third party, commercial web service. I am trying to troubleshoot why the API calls are not working properly. Apparently the API actually constructs an XML request that is sent out over HTTPS to the web service. I've been told by the support rep that I need to provide them with the XML that is being sent. The only way I can figure out how to get the XML is to use a tool like Fiddler to see what is being sent out. So how can I use Fiddler to see the contents of the XML request that is being sent from the server out to the web service? I am running everything directly on the server but all I am seeing is the GET request for the ASPX file itself. I am not seeing anything in relation to the HTTPS request that the server code is sending out to the web service. I have not used Fiddler much so I am hoping that maybe I just don't have it set up right to monitor that traffic.
Corey
After mucking around with it a bit I found this post: Why isn't fiddler capturing request when invoking XMLRPC from iis?. That seemed to do the trick! Basically it sounds like the default proxy settings in Win7 are on a per user basis. So I went in and changed the identity of the AppPool for my site to a local user (Administrator) and then it worked great. I started up Fiddler. Then I started up my ASP.NET app and then when I loaded the page I saw the request that went out to the web service from my code behind! Yay!