{"id":1679,"date":"2014-04-04T15:03:11","date_gmt":"2014-04-04T13:03:11","guid":{"rendered":"http:\/\/www.switchbl8.nl\/blog\/?p=1679"},"modified":"2014-04-04T15:03:11","modified_gmt":"2014-04-04T13:03:11","slug":"dynamic-webservices-in-wcf-iis","status":"publish","type":"post","link":"https:\/\/www.switchbl8.nl\/blog\/2014\/04\/dynamic-webservices-in-wcf-iis\/","title":{"rendered":"Dynamic webservices in WCF \/ IIS"},"content":{"rendered":"<p>First things first: my trial period is over, so since this month I&#8217;m a &#8220;real&#8221; employee of <a href=\"http:\/\/www.olbico.nl\/\" title=\"The Data Quality Company\">Olbico<\/a> \ud83d\ude09<\/p>\n<p>I&#8217;ve created dynamic web services. Turned out to be a bit more difficult then I expected, since the requirements were quite strict: secure communication, but no client-installs, and the response had to be dynamic, specific for the user that logged in. <\/p>\n<p>First problem was that the default serializing of dynamic objects in WCF doesn&#8217;t quite work like you would expect (you can&#8217;t deserialize the XML to a proper object anymore), so a custom serializer for the dynamic objects (to be used in the response).<\/p>\n<p>To further complicate things, the WSDL needed to be user-specific. A users logs in and request his\/her WSDL. This turned out to be not too difficult, except for the &#8220;logs in&#8221; part. We didn&#8217;t want to work with client certificates, but we had decided to create some security by communicating over HTTPS. To do that with WCF, I needed to create a custom user-authenticator that supports a username\/password digest in the request-headers. Google is your friend!<\/p>\n<p>So customers now have (well: will have, it&#8217;s not in production yet) their own WSDL, and they can create strong-typed clients on their side, and all data is transferred over in an encrypted way. YEAH!<\/p>\n<p>From our point of view, we only have to maintain one web service\/endpoint. All configuration is done in the database. So a new customer gets a login, we define what can be requested (that&#8217;s a subscription\/payment thing), and the web service now does the rest. No reconfiguration needed. Double YEAH!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First things first: my trial period is over, so since this month I&#8217;m a &#8220;real&#8221; employee of Olbico \ud83d\ude09 I&#8217;ve created dynamic web services. Turned out to be a bit more difficult then I expected, since the requirements were quite strict: secure communication, but no client-installs, and the response had to be dynamic, specific for <a href='https:\/\/www.switchbl8.nl\/blog\/2014\/04\/dynamic-webservices-in-wcf-iis\/' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[128,92,138],"class_list":["post-1679","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-c","tag-development-2","tag-microsoft","category-1-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/1679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/comments?post=1679"}],"version-history":[{"count":1,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/1679\/revisions"}],"predecessor-version":[{"id":1680,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/1679\/revisions\/1680"}],"wp:attachment":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/media?parent=1679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/categories?post=1679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/tags?post=1679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}