Last active
December 26, 2015 16:59
-
-
Save markis/7184221 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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