Skip to content

Instantly share code, notes, and snippets.

@markis
Last active December 26, 2015 16:59
Show Gist options
  • Save markis/7184221 to your computer and use it in GitHub Desktop.
Save markis/7184221 to your computer and use it in GitHub Desktop.
var endpoint = new System.ServiceModel.EndpointAddress("http://www.ecubicle.net/gsearch_rss.asmx");
var binding = new System.ServiceModel.BasicHttpBinding();
var oProxy = System.ServiceModel.ChannelFactory.CreateChannel(binding, endpoint);
/* Code specific to service */
var request = new GetSearchResultsRequest() { Body = new GetSearchResultsRequestBody() };
request.Body.searchPage = "";
request.Body.gQuery = "Test";
request.Body.numOfResults = "50";
bool successfulCall = false;
try {
/* Service Call */
oProxy.GetSearchResults(request).Dump();
oProxy.Close();
successfulCall = true;
} finally {
if (!successfulCall)
{
oProxy.Abort();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment