how can one test if a remote Rest WS is alive? - web-services

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.

Related

Setting up a HTTP Receiver in Tibco Businessworks for an existing Web Service

So currently I managed to reach an existant Web Service and use one of it's functions to alter a database.
However, the Web Service does not respond with a Soap Response, but with just the HTTP Respond Code 200, which I want to use to create a "Success!"-like notification.
Using BusinessWorks I was able to to connect the process with a HTTP Receiver in the Modeler-View, but it doesn't work and gives me the error message
"Process configuration error. The activity [HTTPReceiver] in the process [webservices.module.IWSContract] cannot have an input transition."
My goal is to catch the HTTP Response Code 200 from the Web Service, and optionally display it to the user.
As you mention you use TIBCO BW 6. this should be the "Invoke" activity instead of SOAPRequestreply (Basic Palette -> Invoke)
You need to use a SOAP Request-Reply activity to invoke the web service. Technically, the "HTTP 200" response won't be visible but you will get an empty output in case of a success:
You can then choose to return whatever success message to the user.

How to create Callback in Webservice for non-browser client?

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

How can I get Fiddler to display information about a web service request made from my ASP.NET code behind?

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!

Fiddler - error when simulating modem speeds with Web Services

I have an application that pulls data from several web services.
The application is correctly using fiddler as a proxy for all these web service requests, and everything works as it should.
I would like to simulate the web services servers being slow, so I enabled "Simulate Modem Speeds" in fiddler (without modifying the default rules file). Now most of the responses I get back are:
ReadResponse() failed: The server did not return a response for this request.
If I disable the "Simulate Modem Speeds", everything works fine again.
Is there a way to get this to work, or a better way to simulate a web services response being slow?
Uh, it certainly sounds like your webservice is configured to timeout if it doesn't get a given request within a certain period of time, suggesting that the simulation has, in fact, turned up the sort of problem you'd want to be testing for.
If you want to adjust the "slowness", edit the Rules > Customize Rules file. Search for modem to see the latencies.

How to replay soap message?

I would like to replay soap message against my server. I've recorded a few messages and i've tampered with Timestamps, soapbodies etc and now I would like to see that my SecurityAssertions lites up like xmastrees. The deployed server will use clientcertificates and servercertifivcates for authentisation, and the whole messageflow will go encrypted with ssl. But I would still like to test the implementation with http and no authentication.
How would one do to replay a soapmessage? Is there any application around that can do this easy?
You could try soapUI. It has quite a few capabilities for interacting with web services including creating tests for them in which you can replay messages.