{"id":1451,"date":"2014-11-17T08:00:24","date_gmt":"2014-11-17T08:00:24","guid":{"rendered":"http:\/\/www.diogonunes.com\/blog\/?p=1451"},"modified":"2020-05-15T14:24:30","modified_gmt":"2020-05-15T13:24:30","slug":"calling-webservice-without-wsdl-or-web-reference","status":"publish","type":"post","link":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/","title":{"rendered":"Calling Web Service without WSDL or Web Reference"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?resize=580%2C387\" alt=\"\" width=\"580\" height=\"387\" class=\"aligncenter size-full wp-image-1528\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?w=675&amp;ssl=1 675w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?resize=400%2C266&amp;ssl=1 400w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>Once I had to test in C# a dozen of web services developed by a third-party. However they provided no WSDL and no ASMX &#8211; therefore it would be impossible to use Web References. They only provided the name of the web methods, their urls, calling credentials and an XML request example.<\/p>\n<p><!--more--><\/p>\n<ul>\n<li><strong>WSDL [FAIL]:<\/strong> I tried to <a href=\"http:\/\/stackoverflow.com\/questions\/1394930\/how-to-generate-web-service-out-of-wsdl\">obtain an wsdl by executing Visual Studio&#8217;s <code>wsdl.exe<\/code><\/a> but I got an error saying something like <code>\"The HTML document does not contain identifying information about the Web service.\"<\/code><\/li>\n<li><strong>Service Reference [FAIL]:<\/strong> On Visual Studio, I tried adding a Service Reference, providing the web service&#8217;s url. I got <code>an error downloading '&lt;url&gt;\/_vti_bin\/ListData.svc\/$metadata'. Metadata contains a reference that cannot be resolved.<\/code> Maybe the web service was an ASMX instead of a WCF?<\/li>\n<li><strong>SOAP [almost WIN]:<\/strong> My last hope on cleaning this mess was <a href=\"http:\/\/stackoverflow.com\/questions\/1277212\/how-to-call-a-web-service-with-no-wsdl-in-net\">SOAP<\/a> (pun intended). Indeed, I tried creating a class based on the <a href=\"http:\/\/mikehadlow.blogspot.pt\/2006\/05\/making-raw-web-service-calls-with.html\">code available here<\/a>. Sadly, when Visual Studio executed that class on IE11 I got a rather random <code>HTTP Error 403.14 - Forbidden, the Web server is configured to not list the contents of this directory<\/code>. However I was on the right track.<\/li>\n<\/ul>\n<p>After all those attempts&#8230; <strong>what is the right way, on Visual Studio, to call an external web service, without WSDL, ASMX or adding a web reference?<\/strong><\/p>\n<h3>Solution &#8211; SOAP Messages<\/h3>\n<p>Turns out SOAP was really the way to go. The <strong>execution flow<\/strong> I used was: create a Web\/SOAP request, set request method to POST (for some reason the 3rd party developed the webservices that way), convert the XML containing the WebService input into a byte array (payload), write the XML payload into the web request, use the web request to get a response from the WebService, return an XML with the WebService response (or an error XML).<\/p>\n<p>I had to call WebServices with an URL pattern of:<\/p>\n<p><code>http:\/\/www.client.com\/_ws\/&lt;METHOD_NAME&gt;?sso=&lt;AUTHENTICATION&gt;&amp;o=&lt;GET\/SET\/DEL&gt;<\/code>.<\/p>\n<p>For example: <code>http:\/\/www.client.com\/_ws\/products?sso=PASSword123&amp;o=GET<\/code><\/p>\n<p>Here is the C# code to call a WebService, through its URL, using SOAP alone:<\/p>\n<pre><code>\/\/\/ &lt;returns&gt;ResultCode, 1 if success.&lt;\/returns&gt;\nprivate XmlDocument CallWebService(string method, string operation, string xmlPayload)\n{\n    string result = \"\";\n    string CREDENTIALS = \"PASSword123\";\n    string URL_ADDRESS = \"http:\/\/www.client.com\/_ws\/\" + method + \"?sso=\" + CREDENTIALS + \"&amp;o=\" + operation +;  \/\/TODO: customize to your needs\n    \/\/ ===== You shoudn't need to edit the lines below =====\n\n    \/\/ Create the web request\n    HttpWebRequest request = WebRequest.Create(new Uri(URL_ADDRESS)) as HttpWebRequest;\n\n    \/\/ Set type to POST\n    request.Method = \"POST\";\n    request.ContentType = \"application\/xml\";\n\n    \/\/ Create the data we want to send\n    StringBuilder data = new StringBuilder();\n    data.Append(xmlPayload);\n    byte[] byteData = Encoding.UTF8.GetBytes(data.ToString());      \/\/ Create a byte array of the data we want to send\n    request.ContentLength = byteData.Length;                        \/\/ Set the content length in the request headers\n\n    \/\/ Write data to request\n    using (Stream postStream = request.GetRequestStream())\n    {\n        postStream.Write(byteData, 0, byteData.Length);\n    }\n\n    \/\/ Get response and return it\n    XmlDocument xmlResult = new XmlDocument();\n    try\n    {\n        using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)\n        {\n            StreamReader reader = new StreamReader(response.GetResponseStream());\n            result = reader.ReadToEnd();\n            reader.Close();\n        }\n        xmlResult.LoadXml(result);\n    }\n    catch (Exception e)\n    {\n        xmlResult = CreateErrorXML(e.Message, \"\");  \/\/TODO: returns an XML with the error message\n    }\n    return xmlResult;\n}\n<\/code><\/pre>\n<p>There&#8217;s an even <a href=\"http:\/\/www.diogonunes.com\/blog\/calling-a-web-method-in-c-without-a-service-reference\/\">better way here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once I had to test in C# a dozen of web services developed by a third-party. However they provided no WSDL and no ASMX &#8211; therefore it would be impossible to use Web References. They only provided the name of the web methods, their urls, calling credentials and an XML request example.<\/p>\n","protected":false},"author":1,"featured_media":1528,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[47,29,31,48],"class_list":["post-1451","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-c-sharp","tag-coding","tag-tutorial","tag-web-dev"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Calling Web Service without WSDL or Web Reference - The Geeky Gecko<\/title>\n<meta name=\"description\" content=\"What&#039;s the right way, on Visual Studio, to call an external web service, without WSDL, ASMX or adding a web reference? Solution: make a C# SOAP request!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Calling Web Service without WSDL or Web Reference - The Geeky Gecko\" \/>\n<meta property=\"og:description\" content=\"What&#039;s the right way, on Visual Studio, to call an external web service, without WSDL, ASMX or adding a web reference? Solution: make a C# SOAP request!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/\" \/>\n<meta property=\"og:site_name\" content=\"The Geeky Gecko\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-17T08:00:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-15T13:24:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"675\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Diogo Nunes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:site\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Diogo Nunes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/\"},\"author\":{\"name\":\"Diogo Nunes\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"headline\":\"Calling Web Service without WSDL or Web Reference\",\"datePublished\":\"2014-11-17T08:00:24+00:00\",\"dateModified\":\"2020-05-15T13:24:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/\"},\"wordCount\":301,\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1\",\"keywords\":[\"c#\",\"coding\",\"tutorial\",\"web dev\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/\",\"name\":\"Calling Web Service without WSDL or Web Reference - The Geeky Gecko\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1\",\"datePublished\":\"2014-11-17T08:00:24+00:00\",\"dateModified\":\"2020-05-15T13:24:30+00:00\",\"description\":\"What's the right way, on Visual Studio, to call an external web service, without WSDL, ASMX or adding a web reference? Solution: make a C# SOAP request!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1\",\"width\":675,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.diogonunes.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Calling Web Service without WSDL or Web Reference\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/\",\"name\":\"The Geeky Gecko\",\"description\":\"The Geeky Gecko\",\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\",\"name\":\"Diogo Nunes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"width\":799,\"height\":799,\"caption\":\"Diogo Nunes\"},\"logo\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.diogonunes.com\",\"https:\/\/x.com\/dialexnunes\"],\"url\":\"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Calling Web Service without WSDL or Web Reference - The Geeky Gecko","description":"What's the right way, on Visual Studio, to call an external web service, without WSDL, ASMX or adding a web reference? Solution: make a C# SOAP request!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/","og_locale":"en_US","og_type":"article","og_title":"Calling Web Service without WSDL or Web Reference - The Geeky Gecko","og_description":"What's the right way, on Visual Studio, to call an external web service, without WSDL, ASMX or adding a web reference? Solution: make a C# SOAP request!","og_url":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/","og_site_name":"The Geeky Gecko","article_published_time":"2014-11-17T08:00:24+00:00","article_modified_time":"2020-05-15T13:24:30+00:00","og_image":[{"width":675,"height":450,"url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1","type":"image\/jpeg"}],"author":"Diogo Nunes","twitter_card":"summary_large_image","twitter_creator":"@dialexnunes","twitter_site":"@dialexnunes","twitter_misc":{"Written by":"Diogo Nunes","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#article","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/"},"author":{"name":"Diogo Nunes","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"headline":"Calling Web Service without WSDL or Web Reference","datePublished":"2014-11-17T08:00:24+00:00","dateModified":"2020-05-15T13:24:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/"},"wordCount":301,"publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1","keywords":["c#","coding","tutorial","web dev"],"articleSection":["Technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/","url":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/","name":"Calling Web Service without WSDL or Web Reference - The Geeky Gecko","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#primaryimage"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1","datePublished":"2014-11-17T08:00:24+00:00","dateModified":"2020-05-15T13:24:30+00:00","description":"What's the right way, on Visual Studio, to call an external web service, without WSDL, ASMX or adding a web reference? Solution: make a C# SOAP request!","breadcrumb":{"@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#primaryimage","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1","width":675,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/www.diogonunes.com\/blog\/calling-webservice-without-wsdl-or-web-reference\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.diogonunes.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Calling Web Service without WSDL or Web Reference"}]},{"@type":"WebSite","@id":"https:\/\/www.diogonunes.com\/blog\/#website","url":"https:\/\/www.diogonunes.com\/blog\/","name":"The Geeky Gecko","description":"The Geeky Gecko","publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c","name":"Diogo Nunes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","width":799,"height":799,"caption":"Diogo Nunes"},"logo":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.diogonunes.com","https:\/\/x.com\/dialexnunes"],"url":"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/77043.jpg?fit=675%2C450&ssl=1","jetpack-related-posts":[{"id":1486,"url":"https:\/\/www.diogonunes.com\/blog\/calling-a-web-method-in-c-without-a-service-reference\/","url_meta":{"origin":1451,"position":0},"title":"Calling a Web Method in C# without Service Reference","author":"Diogo Nunes","date":"24 November, 2014","format":false,"excerpt":"Last week I gave you a method that, using SOAP and HttpWebRequest, allowed you to invoke a Web Method without a WSDL or a Web Reference. Well today, I'll give you an improved version of that method. In fact I'll give you a whole ready-to-use class with additional functionality. Recapping,\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/This-is-a-SOAP-request.png?fit=506%2C350&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2186,"url":"https:\/\/www.diogonunes.com\/blog\/webclient-vs-httpclient-vs-httpwebrequest\/","url_meta":{"origin":1451,"position":1},"title":"WebClient vs HttpClient vs HttpWebRequest","author":"Diogo Nunes","date":"20 April, 2015","format":false,"excerpt":"Just when I was starting to get used to call WebServices through WSDL - like I showed here and here - I had to call a RESTful API. If you don't know what I'm talking about you're like me a week ago. Let's just say that: a WSDL API uses\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/04\/restless.png?fit=510%2C350&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2650,"url":"https:\/\/www.diogonunes.com\/blog\/browserstack-cross-browser-testing-review\/","url_meta":{"origin":1451,"position":2},"title":"Cross-browser testing with BrowserStack: a review","author":"Diogo Nunes","date":"15 August, 2016","format":false,"excerpt":"These are BrowserStack's main services or tools: Automate: Where you run your automated Selenium tests and check the results. Screenshots: Paste an URL, select the browsers and version you want, and in a few minutes you get a batch of screenshots. Live: by connecting to their data center you are\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"browserstack-logo","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/07\/browserstack-logo.png?fit=1024%2C337&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/07\/browserstack-logo.png?fit=1024%2C337&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/07\/browserstack-logo.png?fit=1024%2C337&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/07\/browserstack-logo.png?fit=1024%2C337&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2702,"url":"https:\/\/www.diogonunes.com\/blog\/internet-button-tutorial-ide-atom-github\/","url_meta":{"origin":1451,"position":3},"title":"Internet Button: Web IDE, Atom, GitHub (tutorial #1)","author":"Diogo Nunes","date":"2 January, 2017","format":false,"excerpt":"First things first. Now that you can connect to your Photon, it's time to give it some intelligence - time to get coding! To manage that code let's create a git repo. GitHub The official documentation recommends that you fork their InternetButton repo. You don't have to, but it helps\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/Internet-Button-Tutorial1.jpg?fit=984%2C656&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/Internet-Button-Tutorial1.jpg?fit=984%2C656&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/Internet-Button-Tutorial1.jpg?fit=984%2C656&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/Internet-Button-Tutorial1.jpg?fit=984%2C656&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":4077,"url":"https:\/\/www.diogonunes.com\/blog\/ecosia-review\/","url_meta":{"origin":1451,"position":4},"title":"Ecosia search engine (review)","author":"Diogo Nunes","date":"6 September, 2021","format":false,"excerpt":"Plant trees while you search the web Last year I stumbled upon the search engine Ecosia. Their pitch is that every search you make contributes to plant trees across the world. On average, it takes 45 searches to plant a tree. I loved the concept, so I gave it a\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/12\/michael-tuszynski-_oSipyHQ9kc-unsplash.jpg?fit=1200%2C799&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/12\/michael-tuszynski-_oSipyHQ9kc-unsplash.jpg?fit=1200%2C799&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/12\/michael-tuszynski-_oSipyHQ9kc-unsplash.jpg?fit=1200%2C799&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/12\/michael-tuszynski-_oSipyHQ9kc-unsplash.jpg?fit=1200%2C799&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/12\/michael-tuszynski-_oSipyHQ9kc-unsplash.jpg?fit=1200%2C799&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2574,"url":"https:\/\/www.diogonunes.com\/blog\/how-to-use-browserstack-cross-browser-testing\/","url_meta":{"origin":1451,"position":5},"title":"Testing for cross-browser compatibility using BrowserStack","author":"Diogo Nunes","date":"12 September, 2016","format":false,"excerpt":"Learn how to do it with this example Recalling my BrowserStack review, their main tools are: Automate: Where you run your automated Selenium tests and check the results. Screenshots: Paste an URL, select the browsers and version you want, and in a few minutes you get a batch of screenshots.\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/6-Useful-Cross-Browser-Testing-Tools.png?fit=956%2C343&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/6-Useful-Cross-Browser-Testing-Tools.png?fit=956%2C343&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/6-Useful-Cross-Browser-Testing-Tools.png?fit=956%2C343&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/6-Useful-Cross-Browser-Testing-Tools.png?fit=956%2C343&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/1451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/comments?post=1451"}],"version-history":[{"count":1,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/1451\/revisions"}],"predecessor-version":[{"id":3825,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/1451\/revisions\/3825"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media\/1528"}],"wp:attachment":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media?parent=1451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/categories?post=1451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/tags?post=1451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}