<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DUUHRX8zfip7ImA9WhVUGE4.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808</id><updated>2012-05-24T08:27:14.186+03:00</updated><category term="CXF" /><category term=".Net 2.0" /><category term="Visual Studio" /><category term="OpenGIS" /><category term="design patterns" /><category term="tools" /><category term="Performance" /><category term="JBossWS" /><category term="Gml" /><category term="AXIS2" /><category term="Security" /><category term="Azure" /><category term="ClearUsernameBinding" /><category term="Unit Tests" /><category term="c#" /><category term="BindingBox" /><category term="WSDL" /><category term="Community" /><category term="TDD" /><category term="Cryptic error messages" /><category term="windows" /><category term="JAX-WS" /><category term="SSL" /><category term="XML Schema" /><category term="wsdl2" /><category term="gSOAP" /><category term="WSE VS2008" /><category term="WS-*" /><category term="NUnit" /><category term="WSE" /><category term="Html5" /><category term="MIME" /><category term="MTOM" /><category term="Asp.Net" /><category term="wif" /><category term="WCF proxy" /><category term="MVP" /><category term="federation" /><category term="WSE VS2005" /><category term="Session" /><category term="WSIT" /><category term="WebSphere" /><category term="quiz" /><category term="Google" /><category term="Rest" /><category term="Attachments" /><category term="SOAP" /><category term="X.509" /><category term="DIME" /><category term="iPhone" /><category term="WSO" /><category term="WCF" /><category term="Penetration" /><category term="WCF VS2008" /><category term="log4net" /><category term="Hacking" /><category term="Web Services Interoperability" /><category term="Spring-WS" /><category term="ws-security" /><category term="blogging" /><category term="Silverlight" /><category term="rampart" /><category term="WSI" /><category term="EULA" /><title>Yaron Naveh's Web Services 2.0 Blog</title><subtitle type="html">Web Services Security, Interoperability and Performance - WCF, Axis2, WSIT, Node.js...</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://webservices20.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>159</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/WebServices20" /><feedburner:info uri="webservices20" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>WebServices20</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DkEBRHk6fSp7ImA9WhVUFU4.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-4599516058725050406</id><published>2012-05-20T20:24:00.000+03:00</published><updated>2012-05-20T20:24:15.715+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-20T20:24:15.715+03:00</app:edited><title>Xml-Crypto: An Xml digital signature library for Node.js</title><content type="html">&lt;b&gt;Get &lt;a href="https://github.com/yaronn/xml-crypto"&gt;xml-crypto&lt;/a&gt; on github&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Node.js does not always have the right libraries for Xml operations. When such libraries exist they are &lt;a href="http://webservices20.blogspot.com/2012/03/xml-stack-for-nodejs-that-works-on.html"&gt;not always cross platform&lt;/a&gt; (read: work on windows). I've just published &lt;a href="https://github.com/yaronn/xml-crypto"&gt;xml-crypto&lt;/a&gt;, the first xml digital signature library for node. As a bonus this library is written in pure javascript so it is cross platform.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is Xml Digital signature?&lt;/b&gt;&lt;br /&gt;
There's a tl;dr version &lt;a href="http://www.xml.com/pub/a/2001/08/08/xmldsig.html"&gt;here&lt;/a&gt;. The essence is that dig-sig allows to protect content from unauthorized modification by telling us who created that content and if anyone had altered it since. Xml dig-sig is a special flavour which has some interesting implementation aspects.&lt;br /&gt;
&lt;br /&gt;
A typical xml signature looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2758720.js?file=gistfile1.xml"&gt;&lt;/script&gt;&lt;br /&gt;
&lt;b&gt;Installing Xml-Crypto&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Install with &lt;a href="http://github.com/isaacs/npm"&gt;npm&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;npm install xml-crypto&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
A pre requisite it to have &lt;a href="http://www.openssl.org/"&gt;openssl&lt;/a&gt; installed and its /bin to be on the system path. I used version 1.0.1c but it should work on older versions too.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Signing an xml document&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Use this code:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2758727.js?file=gistfile1.js"&gt;&lt;/script&gt;&lt;br /&gt;
    The result wil be:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2758732.js?file=gistfile1.xml"&gt;&lt;/script&gt;&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
sig.getSignedXml() returns the original xml document with the signature pushed as the last child of the root node (as above). This assumes you are not signing the root node but only sub node(s) otherwise this is not valid. If you do sign the root node call sig.getSignatureXml() to get just the signature part and sig.getOriginalXmlWithIds() to get the original xml with Id attributes added on relevant elements (required for validation).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Verifying a signed document&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can use any dom parser you want in your code (or none, depending on your usage). This sample uses xmldom so you should install it first:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;npm install xmldom&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2758734.js?file=gistfile1.js"&gt;&lt;/script&gt;&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
The xml-crypto api requires you to supply it separately the xml signature ("&amp;lt;Signature&amp;gt;...&amp;lt;/Signature&amp;gt;", in loadSignature) and the signed xml (in checkSignature). The signed xml may or may not contain the signature in it, but you are still required to supply the signature separately.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Supported Algorithms&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The first release always uses the following algorithems:&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt; Exclusive Canonicalization http://www.w3.org/2001/10/xml-exc-c14n#&lt;br /&gt;
&lt;li&gt; SHA1 digests http://www.w3.org/2000/09/xmldsig#sha1&lt;br /&gt;
&lt;li&gt; RSA-SHA1 signature algorithm http://www.w3.org/2000/09/xmldsig#rsa-sha1&lt;br /&gt;
&lt;br /&gt;
you are able to extend xml-crypto with further algorithms. I will author a post about it soon.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Key formats&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You need to use .pem formatted certificates for both signing and validation. If you have pfx x.509 certificates there's an easy way to &lt;a href="http://travisspencer.com/blog/2009/10/exporting-keys-from-a-jks-and.html"&gt;convert them&lt;/a&gt; to pem. I will author a post about this soon.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The code&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Get &lt;a href="https://github.com/yaronn/xml-crypto"&gt;&lt;b&gt;xml-crypto&lt;/b&gt;&lt;/a&gt; on github&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-4599516058725050406?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PAkN07TFzc9fAmKPdX86Z2i0iS0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PAkN07TFzc9fAmKPdX86Z2i0iS0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PAkN07TFzc9fAmKPdX86Z2i0iS0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PAkN07TFzc9fAmKPdX86Z2i0iS0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/zmb--5CNPhs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/4599516058725050406/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=4599516058725050406" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/4599516058725050406?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/4599516058725050406?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/zmb--5CNPhs/xml-crypto-xml-digital-signature.html" title="Xml-Crypto: An Xml digital signature library for Node.js" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/05/xml-crypto-xml-digital-signature.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIGQXs_eSp7ImA9WhVVEkk.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-7650934550837704339</id><published>2012-05-05T21:28:00.000+03:00</published><updated>2012-05-05T21:28:40.541+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-05T21:28:40.541+03:00</app:edited><title>How to fix Wcf cache of dynamic Wsdls</title><content type="html">One of the least used Wcf extension points is &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.iwsdlexportextension.aspx"&gt;IWsdlExportExtension&lt;/a&gt;. This extension allows to customize the wsdl document which Wcf emits. Since you rarely want to do that, this extension is not commonly used. When it is already used it is usually in the context of flattening the wsdl. A different use case I have recently seen is to push dynamic content into the wsdl. More specifically a user was trying to generate xsd schemas from a live database table and to put it to the wsdl so clients would always get the latest schema. The Wcf service itself was treating the request as Xml anyway so it did not care for such changes. The requirement was for the wsdl to reflect the latest db changes at any time. Our problem was that once the wsdl was generated for the first time it would not be regenerated. This resulted in a stale schema.&lt;br /&gt;
&lt;br /&gt;
This is how we created the wsdl exporter:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2604494.js?file=gistfile1.cs"&gt;&lt;/script&gt;&lt;br /&gt;
When we run this service and open the wsdl we get this:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2604486.js?file=p.xml"&gt;&lt;/script&gt;&lt;br /&gt;
When we refresh the wsdl after a few seconds we still get this:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2604486.js?file=p.xml"&gt;&lt;/script&gt;&lt;br /&gt;
This is not a browser or proxy cache. Wcf does not recreate the wsdl - which can also be seen by putting a breakpoint (which is only called once) on the exporter.&lt;br /&gt;
&lt;br /&gt;
This behavior makes since when you consider the case where there is no importer extension - then the wsdl is generated based on the data contract assembly, and as long as that assembly does not change the wsdl will not also. However we have chose to put dynamic logic in ExportEndpoint method so that default behavior did not work well for us.&lt;br /&gt;
&lt;br /&gt;
One way to fix that is to use a message inspector to update the wsdl before it is sent to the client. In this case IWsdlExportExtension is not required at all. This approach is &lt;a href="http://lifecodeeverything.wordpress.com/2008/11/18/flatten-your-wsdl-or-not/"&gt;described here&lt;/a&gt;.&lt;br /&gt;
An alternative could be to build a Wcf rest endpoint in the same service to act as a proxy to the real wsdl.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-7650934550837704339?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kogDQSC0CXn8kyUP2EKIdOqhYSg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kogDQSC0CXn8kyUP2EKIdOqhYSg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kogDQSC0CXn8kyUP2EKIdOqhYSg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kogDQSC0CXn8kyUP2EKIdOqhYSg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/I9aC_VYfnPY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/7650934550837704339/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=7650934550837704339" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7650934550837704339?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7650934550837704339?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/I9aC_VYfnPY/how-to-fix-wcf-cache-of-dynamic-wsdls.html" title="How to fix Wcf cache of dynamic Wsdls" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/05/how-to-fix-wcf-cache-of-dynamic-wsdls.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EDQXcycCp7ImA9WhVVEUs.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-4491276757158781511</id><published>2012-05-05T00:07:00.000+03:00</published><updated>2012-05-05T00:07:50.998+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-05T00:07:50.998+03:00</app:edited><title>Tweets of the week: It's DevOps Borat</title><content type="html">Borat likes DevOps:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-uZqBSAi8t3o/T6RCEZNQRgI/AAAAAAAABuc/aFjU6myNL5s/s1600/a1.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-uZqBSAi8t3o/T6RCEZNQRgI/AAAAAAAABuc/aFjU6myNL5s/s1600/a1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-pZigPSSB7oc/T6RBr6E_lAI/AAAAAAAABuQ/m2VHWJFSHfU/s1600/a6.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-pZigPSSB7oc/T6RBr6E_lAI/AAAAAAAABuQ/m2VHWJFSHfU/s1600/a6.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Soap / Rest / Wsdl still a hot topic:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-A0uKJ4Gozco/T6RDzzHXVvI/AAAAAAAABuo/4S28FL-3QyM/s1600/a2.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-A0uKJ4Gozco/T6RDzzHXVvI/AAAAAAAABuo/4S28FL-3QyM/s1600/a2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-cFcyLKseh7U/T6RD0gMDPeI/AAAAAAAABu0/2tWBq2vxEc4/s1600/a3.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-cFcyLKseh7U/T6RD0gMDPeI/AAAAAAAABu0/2tWBq2vxEc4/s1600/a3.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ICSSAcSxo7o/T6RD01GQ0qI/AAAAAAAABvA/yz_Q52DLTIE/s1600/a4.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-ICSSAcSxo7o/T6RD01GQ0qI/AAAAAAAABvA/yz_Q52DLTIE/s1600/a4.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-80lK9-BaA3w/T6RD1I8x7dI/AAAAAAAABvM/tPezjUzU6g0/s1600/a5.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-80lK9-BaA3w/T6RD1I8x7dI/AAAAAAAABvM/tPezjUzU6g0/s1600/a5.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-4491276757158781511?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ObS5kNYR4TzQsJG6dpv97N3fsv4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ObS5kNYR4TzQsJG6dpv97N3fsv4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ObS5kNYR4TzQsJG6dpv97N3fsv4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ObS5kNYR4TzQsJG6dpv97N3fsv4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/UlzfqZjVaqM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/4491276757158781511/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=4491276757158781511" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/4491276757158781511?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/4491276757158781511?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/UlzfqZjVaqM/tweets-of-week-its-devops-borat.html" title="Tweets of the week: It's DevOps Borat" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-uZqBSAi8t3o/T6RCEZNQRgI/AAAAAAAABuc/aFjU6myNL5s/s72-c/a1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/05/tweets-of-week-its-devops-borat.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0ACRnc6eip7ImA9WhVWFUk.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-8777706039325253198</id><published>2012-04-27T18:49:00.000+03:00</published><updated>2012-04-27T18:49:27.912+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-27T18:49:27.912+03:00</app:edited><title>Tweets of the week: A Wcf love/hate thing</title><content type="html">Since I opened &lt;a href="http://twitter.com/#!/YaronNaveh"&gt;my twitter account&lt;/a&gt; I've seen a few &lt;strike&gt;witty fights&lt;/strike&gt; insights on web services, so here I share them. If you stumble upon anything worth to get into my next list &lt;a href="http://twitter.com/#!/YaronNaveh"&gt;let me know&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Soap vs. Rest reloaded?&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-tPh4Nqsu5Ew/T5qxy_1VRXI/AAAAAAAABqo/aTs1sU2BzUw/s1600/1.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-tPh4Nqsu5Ew/T5qxy_1VRXI/AAAAAAAABqo/aTs1sU2BzUw/s1600/1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-6uuAycvVscs/T5quxGDTA4I/AAAAAAAABo8/qqdk5LEwlq8/s1600/2.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-6uuAycvVscs/T5quxGDTA4I/AAAAAAAABo8/qqdk5LEwlq8/s1600/2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-XM7WZzUAwqU/T5qwtEX5NvI/AAAAAAAABp4/6T8P6YB_-b4/s1600/7.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-XM7WZzUAwqU/T5qwtEX5NvI/AAAAAAAABp4/6T8P6YB_-b4/s1600/7.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Wcf love/hate thing:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-iL7vJJOf49o/T5q5li1b7GI/AAAAAAAABsE/_PQJvKaUjvc/s1600/3.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-iL7vJJOf49o/T5q5li1b7GI/AAAAAAAABsE/_PQJvKaUjvc/s1600/3.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-xRpoZeW0xGw/T5qwtfZ7skI/AAAAAAAABqE/BsRSpVXZDlo/s1600/8.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-xRpoZeW0xGw/T5qwtfZ7skI/AAAAAAAABqE/BsRSpVXZDlo/s1600/8.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Z9ifgL0nBDY/T5qwtRcmgTI/AAAAAAAABqQ/156AgewaDRk/s1600/9.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-Z9ifgL0nBDY/T5qwtRcmgTI/AAAAAAAABqQ/156AgewaDRk/s1600/9.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a href="http://weblogs.asp.net/scottgu/archive/2012/02/23/asp-net-web-api-part-1.aspx"&gt;Asp.Net Web API&lt;/a&gt; to the rescue:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-E31WR36KPOQ/T5quzAICosI/AAAAAAAABpg/Vzzgjq0A3dA/s1600/5.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-E31WR36KPOQ/T5quzAICosI/AAAAAAAABpg/Vzzgjq0A3dA/s1600/5.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-_yckRNmy6To/T5q1cwI20UI/AAAAAAAABq4/hQ0gw9I_GU0/s1600/10.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-_yckRNmy6To/T5q1cwI20UI/AAAAAAAABq4/hQ0gw9I_GU0/s1600/10.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Wsdl confessions:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-VjXq7XozEs0/T5q4OqKoTRI/AAAAAAAABrI/elHmwFqNjX4/s1600/11.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-VjXq7XozEs0/T5q4OqKoTRI/AAAAAAAABrI/elHmwFqNjX4/s1600/11.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-bRd7ov6fIII/T5q4Pu_Il4I/AAAAAAAABrU/Iot8a02UzTg/s1600/12.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-bRd7ov6fIII/T5q4Pu_Il4I/AAAAAAAABrU/Iot8a02UzTg/s1600/12.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-AzvR42NcX6M/T5q4QU6MyjI/AAAAAAAABrs/Q2FCzCljETY/s1600/14.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-AzvR42NcX6M/T5q4QU6MyjI/AAAAAAAABrs/Q2FCzCljETY/s1600/14.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
If you see anything worth to put in my next list &lt;a href="http://twitter.com/#!/YaronNaveh"&gt;let me know&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-8777706039325253198?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RRlykDueXOUT7Kxt2TsCF5ezqec/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RRlykDueXOUT7Kxt2TsCF5ezqec/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RRlykDueXOUT7Kxt2TsCF5ezqec/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RRlykDueXOUT7Kxt2TsCF5ezqec/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/s_hvPmWYyUs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/8777706039325253198/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=8777706039325253198" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/8777706039325253198?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/8777706039325253198?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/s_hvPmWYyUs/tweets-of-week-wcf-lovehate-thing.html" title="Tweets of the week: A Wcf love/hate thing" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-tPh4Nqsu5Ew/T5qxy_1VRXI/AAAAAAAABqo/aTs1sU2BzUw/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/04/tweets-of-week-wcf-lovehate-thing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcDRH0_eSp7ImA9WhVWFEo.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-2722557996444117855</id><published>2012-04-27T00:01:00.000+03:00</published><updated>2012-04-27T00:01:15.341+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-27T00:01:15.341+03:00</app:edited><title>Declaratively ignoring must understand headers</title><content type="html">A soap header may specify a "must understand" flag. This instructs any processing node to throw an exception if this header is not understood by it. Such a behavior is sometimes useful and sometimes very annoying, depending on the circumstances. Let's see how such header looks like in soap:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2503066.js?file=p.xml"&gt;&lt;/script&gt;&lt;br /&gt;
By default a Wcf service will validate all incoming mustUnderstand headers a client sends. If it does not understand them it will throw the famous 'Did not understand "MustUnderstand" header' exception. Typically you would instruct Wcf not to validate these headers like this:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2503067.js?file=gistfile1.cs"&gt;&lt;/script&gt;&lt;br /&gt;
But this kind of "hard codes" this behavior to the service. Wouldn't it be nice to decide at the configuration level if we want such a behavior or not?&lt;br /&gt;
&lt;br /&gt;
All we need to do is define this class:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2503069.js?file=gistfile1.cs"&gt;&lt;/script&gt;&lt;br /&gt;
Then in the config register it:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2503072.js?file=gistfile1.xml"&gt;&lt;/script&gt;&lt;br /&gt;
And we can now configure our endpoint(s) with this behavior:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/2503084.js?file=gistfile1.xml"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-2722557996444117855?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4pd-5tklRCC5awbQCnnkXOdi0Xo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4pd-5tklRCC5awbQCnnkXOdi0Xo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4pd-5tklRCC5awbQCnnkXOdi0Xo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4pd-5tklRCC5awbQCnnkXOdi0Xo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/uM2Zl7SUkOo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/2722557996444117855/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=2722557996444117855" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/2722557996444117855?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/2722557996444117855?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/uM2Zl7SUkOo/declaratively-ignoring-must-understand.html" title="Declaratively ignoring must understand headers" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/04/declaratively-ignoring-must-understand.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MMQX8yeyp7ImA9WhVWE0o.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-230739852640087008</id><published>2012-04-25T20:38:00.000+03:00</published><updated>2012-04-25T20:38:00.193+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-25T20:38:00.193+03:00</app:edited><title>When EnableUnsecuredRespose *requires* an unsecured response</title><content type="html">A few weeks ago I had to call a legacy wse2 service from a Wcf client. The service behavior was:

&lt;br /&gt;&lt;br /&gt;

&lt;li&gt;Request must be encrypted and signed at the message level&lt;/li&gt;
&lt;li&gt;Request must contain a timestamp inside the security header&lt;/li&gt;
&lt;li&gt;Response is neither encrypted nor signed&lt;/li&gt;
&lt;li&gt;Response nevertheless contains a timestamp inside a security header&lt;/li&gt;
&lt;br /&gt;
You might think that dismissing the signature requirement from the response would do good for interoperability - after all this is &lt;b&gt;less&lt;/b&gt; work. However this time less was more. Turns out that Wcf loves symmetry and does not encourage messages in one direction to be signed and in the other direction to be clear. But hey! This complaint is so WCF 3.5. In 4.0 we got the goodie of &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.configuration.securityelementbase.enableunsecuredresponse(v=vs.110).aspx"&gt;EnableUnsecuredResponse&lt;/a&gt;:
&lt;br /&gt;&lt;br /&gt;
&lt;script src="https://gist.github.com/2439508.js?file=gistfile1.xml"&gt;&lt;/script&gt;
&lt;br /&gt;

When this setting is on Wcf should be ok with an unsigned response. But in my case even with this flag I was still getting this error:
&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
The security header element ‘timestamp’ with ‘Timestamp-xxxx’ id must be signed.
&lt;/div&gt;
&lt;br /&gt;
As you remember the service returns an unsigned timestamp element. Turns out we have this chain of rules:
&lt;br /&gt;&lt;br /&gt;

request contains a timestamp and has some signature requirement &lt;b&gt;--&gt;&lt;/b&gt; &lt;br /&gt;
the timestamp is always signed (even if we do not wish that) &lt;b&gt;--&gt;&lt;/b&gt; &lt;br /&gt;
the response must contain a signed timestamp unless EnableUnsecuredRespose in on. In that case timestamp is optional, but if present it must be signed.
&lt;br /&gt;&lt;br /&gt;
So I had to find a way to remove the timestmap from the response. Since the service could not be changed I used my good old friend the &lt;a href="http://webservices20.blogspot.com/2011/01/security-interop-gotcha-empty-signature.html"&gt;custom encoder&lt;/a&gt;.
&lt;br /&gt;&lt;br /&gt;

But even after that I got this error:
&lt;br /&gt;&lt;br /&gt;

&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
The 'body', 'http://schemas.xmlsoap.org/soap/envelope/', required message part was not signed.
&lt;/div&gt;

&lt;br /&gt;

So WCF was still looking for some ws-security goodies. To solve this I had to remove the security element all together from the response. Here is the snippet I added to the encoder:
&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
&lt;script src="https://gist.github.com/2439484.js?file=gistfile1.cs"&gt;&lt;/script&gt;
&lt;/div&gt;
&lt;br /&gt;
Many times removing the security element at all exposes us to some risks like replay attacks or a man in the middle. However here we knew up front that the service does not use any interesting security features in the response so there was no regression.
&lt;br /&gt;&lt;br /&gt;

&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;
EnableUnsecuredRespose will allow us not to have a security element in the response even if the request has it. But if the response contains a security element nevertheless, then wcf will take it seriously and if it does not comply with the expected requirements the interaction will fail.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-230739852640087008?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Kd5zTw-BtBHf0apAEeMpzaXnncU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kd5zTw-BtBHf0apAEeMpzaXnncU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Kd5zTw-BtBHf0apAEeMpzaXnncU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kd5zTw-BtBHf0apAEeMpzaXnncU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/JN1f3mefMNE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/230739852640087008/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=230739852640087008" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/230739852640087008?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/230739852640087008?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/JN1f3mefMNE/when-enableunsecuredrespose-requires.html" title="When EnableUnsecuredRespose *requires* an unsecured response" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/04/when-enableunsecuredrespose-requires.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIGSHsyeCp7ImA9WhVWEE4.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-7726583799009861596</id><published>2012-04-21T21:22:00.000+03:00</published><updated>2012-04-21T21:22:09.590+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-21T21:22:09.590+03:00</app:edited><title>Ws.js - A ws-* implementation for node.js</title><content type="html">&lt;b&gt;(Get Ws.js &lt;a href="https://github.com/yaronn/ws.js"&gt;on github&lt;/a&gt;)&lt;/b&gt;
&lt;br /&gt;&lt;br /&gt;

Some time ago I introduced &lt;a href="http://webservices20.blogspot.com/2012/02/wcf-and-nodejs-better-together.html"&gt;Wcf.js&lt;/a&gt; - a wcf-inspired client soap stack for node.js. However Wcf.js itself is a small wrapper on top of &lt;a href="https://github.com/yaronn/ws.js"&gt;Ws.js&lt;/a&gt; - the ws-* implementation for node.js. You got it right: Your node.js apps can now access your core services using various ws-* standards. No more proxies for "protocol bridging", no more service rewrites.
&lt;br /&gt;&lt;br /&gt;
Get it &lt;b&gt;&lt;a href="https://github.com/yaronn/ws.js"&gt;here&lt;/a&gt;&lt;/b&gt;.
&lt;br /&gt;&lt;br /&gt;
Here is a quick sample on what we can do with &lt;a href="https://github.com/yaronn/ws.js"&gt;Ws.js&lt;/a&gt;:

&lt;br /&gt;&lt;br /&gt;
&lt;script src="https://gist.github.com/2438720.js?file=ws.js%20sample"&gt;&lt;/script&gt;
&lt;br /&gt;

The above example adds a username token to the soap. The output soap will be:
&lt;br /&gt;&lt;br /&gt;
&lt;script src="https://gist.github.com/2438749.js?file=gistfile1.txt"&gt;&lt;/script&gt;
&lt;br /&gt;
For detailed usage instructions check it out &lt;a href="https://github.com/yaronn/ws.js"&gt;on github&lt;/a&gt;.
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Ws.js currently supports:&lt;/b&gt;

&lt;br /&gt;&lt;br /&gt;
&lt;li&gt; MTOM
&lt;/li&gt;
&lt;li&gt; WS-Security (username tokens only)
&lt;/li&gt;
&lt;li&gt; WS-Addressing (all versions)
&lt;/li&gt;
&lt;li&gt; HTTP(S)
&lt;/li&gt;
&lt;br /&gt;

Coming up next is probably deeper ws-security support including x.509 certificates encryption and signature. Needless to say that any capability added to &lt;a href="https://github.com/yaronn/ws.js"&gt;ws.js&lt;/a&gt; will also apply to &lt;a href="https://github.com/yaronn/wcf.js"&gt;wcf.js&lt;/a&gt;.
&lt;br /&gt;&lt;br /&gt;
Here is the project page &lt;b&gt;&lt;a href="https://github.com/yaronn/ws.js"&gt;on github&lt;/a&gt;&lt;/b&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-7726583799009861596?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HTlMTgh_IR4tmRKHbG26xbXOTCU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HTlMTgh_IR4tmRKHbG26xbXOTCU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HTlMTgh_IR4tmRKHbG26xbXOTCU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HTlMTgh_IR4tmRKHbG26xbXOTCU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/_a9VPFJf2XM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/7726583799009861596/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=7726583799009861596" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7726583799009861596?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7726583799009861596?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/_a9VPFJf2XM/wsjs-ws-implementation-for-nodejs.html" title="Ws.js - A ws-* implementation for node.js" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/04/wsjs-ws-implementation-for-nodejs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIGRH85cCp7ImA9WhVXFEg.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-7165892270304788613</id><published>2012-04-15T04:15:00.000+03:00</published><updated>2012-04-15T04:15:25.128+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-15T04:15:25.128+03:00</app:edited><title>I'm on Twitter: @YaronNaveh</title><content type="html">I just started my twitter account - &lt;a href="http://twitter.com/#!/YaronNaveh"&gt;@&lt;b&gt;YaronNaveh&lt;/b&gt;&lt;/a&gt; (yeah I'm a late bloomer). I'l be mostly writing about the stuff I love (node.js, wcf, web services) but expect some new stuff too! See you &lt;a href="http://twitter.com/#!/YaronNaveh"&gt;there&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-7165892270304788613?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DgGMdCqcxn-yJSeePtkFVNt9mBs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DgGMdCqcxn-yJSeePtkFVNt9mBs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DgGMdCqcxn-yJSeePtkFVNt9mBs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DgGMdCqcxn-yJSeePtkFVNt9mBs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/l4OOGJ8LvBc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/7165892270304788613/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=7165892270304788613" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7165892270304788613?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7165892270304788613?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/l4OOGJ8LvBc/im-on-twitter-yaronnaveh.html" title="I'm on Twitter: @YaronNaveh" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/04/im-on-twitter-yaronnaveh.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cARXc-fyp7ImA9WhVQGUw.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-2644128684123512625</id><published>2012-04-08T21:50:00.001+03:00</published><updated>2012-04-08T21:50:44.957+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-08T21:50:44.957+03:00</app:edited><title>WCF users voice survey</title><content type="html">&lt;a href="http://blogs.msdn.com/b/carlosfigueira/archive/2012/04/05/what-features-do-you-want-in-wcf.aspx"&gt;Carlos&lt;/a&gt; shares the &lt;a href="http://aspnet.uservoice.com/forums/147206-wcf-web-services-"&gt;WCF UserVoice channel&lt;/a&gt;. That's a great chance for all of us to influence the next version of WCF. If you're a WCF user - &lt;a href="http://aspnet.uservoice.com/forums/147206-wcf-web-services-"&gt;&lt;b&gt;go vote&lt;/b&gt;&lt;/a&gt;.
&lt;br /&gt;&lt;br /&gt;
My votes go to open source WCF. Like many of the .Net libraries WCF classes become sealed exactly where I want to change their behavior. This is especially true for all things security. Sometimes it is really important to tweak the way WCF signs a message or handles a signed one but today this requires to implement a very long chain of extensions.
&lt;br /&gt;&lt;br /&gt;
The current predominant features also include support for REST in the routing service and web sockets support on earlier windows versions. So far the traditional request to simplify configuration and bindings is not too visible, possibly because the WCF &lt;a href="http://msdn.microsoft.com/en-us/library/hh309266(v=vs.110).aspx"&gt;simplification&lt;/a&gt; &lt;a href="http://debugmode.net/2010/12/04/default-end-points-in-wcf-4-0/"&gt;features&lt;/a&gt; have done a great deal here (or because people are more focused on Rest these days).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-2644128684123512625?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UgEtFxFd3a1svoESX3dGDS9r7Kw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UgEtFxFd3a1svoESX3dGDS9r7Kw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UgEtFxFd3a1svoESX3dGDS9r7Kw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UgEtFxFd3a1svoESX3dGDS9r7Kw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/ywz_KAmyNhs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/2644128684123512625/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=2644128684123512625" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/2644128684123512625?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/2644128684123512625?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/ywz_KAmyNhs/wcf-users-voice-survey.html" title="WCF users voice survey" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/04/wcf-users-voice-survey.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEEQH85fyp7ImA9WhVQEUw.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-727142697101438587</id><published>2012-03-30T16:20:00.000+03:00</published><updated>2012-03-30T16:20:01.127+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-30T16:20:01.127+03:00</app:edited><title>Wcf to WebSphere interop: ActivityId is not protected</title><content type="html">I recently had to call a secured WebSphere service from a Wcf client. Fine tuning all the settings was challenging so I turned on &lt;a href="http://msdn.microsoft.com/en-us/library/ms733025.aspx"&gt;Wcf tracing&lt;/a&gt;. The latter gave me detailed errors which helped me to see where I was wrong. But after fixing everything I knew of, I got this new error:&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
An element, ActivityId, with nsuri, http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics, is not protected by signing algorithm, sha1, and digest algorithm&amp;nbsp;Rejected by filter; SOAP fault sent&lt;/div&gt;
&lt;br /&gt;Having no idea where this ActivityId element comes from , I took a quick look at the message my Wcf client was sending:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;s:Header&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&amp;lt;ActivityId CorrelationId="db5feb51-ae82-4c1b-bd68-1bdb2d09bbc6" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics"&amp;gt;f5aada53-669f-46d7-acc5-8d45e437ed86&amp;lt;/ActivityId&amp;gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/s:Header&amp;gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Where does this ActivityId come from?&lt;br /&gt;
Turns out this header is emitted by Wcf when we turn tracing on. Wcf uses this header to color the message as it flows between various layers so it can later show a single view of it.&lt;br /&gt;
In my case the WebSphere expected clients to sign all headers. This particular header was not signed (since wcf tracing just adds it as is) so WebSphere complained about a policy violation.&lt;br /&gt;
After turning off the Wcf trace settings the integration worked like a charm.&amp;nbsp;So you can say the whole issue was kind of a drug side affect.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-727142697101438587?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/D0OpB7VVCm5TO1xhIUPBQXAhkY0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/D0OpB7VVCm5TO1xhIUPBQXAhkY0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/D0OpB7VVCm5TO1xhIUPBQXAhkY0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/D0OpB7VVCm5TO1xhIUPBQXAhkY0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/k_eTH_KAYas" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/727142697101438587/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=727142697101438587" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/727142697101438587?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/727142697101438587?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/k_eTH_KAYas/wcf-to-websphere-interop-activityid-is.html" title="Wcf to WebSphere interop: ActivityId is not protected" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/03/wcf-to-websphere-interop-activityid-is.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMEQXszcCp7ImA9WhVQEE8.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-6643162815045669886</id><published>2012-03-29T14:00:00.000+02:00</published><updated>2012-03-29T14:00:00.588+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-29T14:00:00.588+02:00</app:edited><title>Xml stack for node.js that works on windows</title><content type="html">When I developed &lt;a href="http://webservices20.blogspot.com/2012/02/wcf-and-nodejs-better-together.html"&gt;wcf.js&lt;/a&gt; I extensively used xml operations. Finding the right libraries was not an easy task so I thought to share my findings here. My requirements were to use dom style xml parsing and that the whole stack will be multi-platform (read: work on windows). It turned out that there are many libraries that fulfill one of these requirements but it was very hard to find one which fulfills both. Then I wanted to run xpath operations on the dom. And again I needed a library that works on windows and integrates well with the former dom parser.&lt;br /&gt;
&lt;br /&gt;
I started my journey with googling for "node.js xml parser". I&amp;nbsp;immediately&amp;nbsp;found &lt;a href="https://github.com/robrighter/node-xml"&gt;node-xml&lt;/a&gt; which is a pure javascript sax parser. Finding other sax parsers was also easy but that was not what I had in mind. I then moved to "node.js xml dom". This actually led me to the main listing of node libraries sorted by category, and I&amp;nbsp;immediately&amp;nbsp;turned to the &lt;a href="https://github.com/joyent/node/wiki/modules#wiki-parsers-xml"&gt;xml section&lt;/a&gt;. I felt like I was&amp;nbsp;drinking from the firehose: Over 15 xml parsers were listed. It was very disappointing to find out that&amp;nbsp;&lt;a href="https://github.com/ajaxorg/node-o3-xml"&gt;most of them&lt;/a&gt; are based on &lt;a href="http://xmlsoft.org/"&gt;libxml2&lt;/a&gt;&amp;nbsp;which means they will work on windows only via cygwin. That's evil.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-VUGwNcLqsdQ/T2zk8NUIdfI/AAAAAAAABoU/WFNfPuXXU4w/s1600/3172_Dr_Evil.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="166" src="http://3.bp.blogspot.com/-VUGwNcLqsdQ/T2zk8NUIdfI/AAAAAAAABoU/WFNfPuXXU4w/s320/3172_Dr_Evil.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;xmldom&lt;/b&gt;&lt;br /&gt;
Just before I started to roll my own xml parser I have found &lt;a href="https://github.com/jindw/xmldom"&gt;xmldom&lt;/a&gt;. Xmldom is a pure javascript implementation of dom (and sax) which makes it fully portable to any environment.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;xpath.js&lt;/b&gt;&lt;br /&gt;
I also needed an xpath engine. Finding one that is cross platform was not an easier task. I have finally found &lt;a href="http://xpath.js/"&gt;xpath.js&lt;/a&gt;. The latter was actually not written as a node.js module (it dates back to 2006) but it was&amp;nbsp;fairly&amp;nbsp;easy to migrate it there. As you can see &lt;a href="https://github.com/yaronn/ws.js/blob/master/lib/xpath.js"&gt;here&lt;/a&gt;, I just added to it this method&amp;nbsp;in the end:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
function SelectNodes(doc, xpath)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;var parser = new XPathParser();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;var xpath = parser.parse(xpath);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;var context = new XPathContext();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;context.expressionContextNode = doc.documentElement;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;var res = xpath.evaluate(context)&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;return res.toArray();&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
exports.SelectNodes = SelectNodes;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Making it all work together&lt;/b&gt;&lt;br /&gt;
The following sample shows how to parse an xml document and match an xpath on it.&lt;br /&gt;
Note you should include the updated&amp;nbsp;&lt;a href="https://github.com/yaronn/ws.js/blob/master/lib/xpath.js"&gt;xpath.js&lt;/a&gt;&amp;nbsp;as part of your project (e.g. in /lib) and the second line in the sample should reference that path.&amp;nbsp;You should also install xmldom using&amp;nbsp;&lt;span style="background-color: #eeeeee; color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 22px; text-align: left;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: #eeeeee; color: #333333; font-family: Arial, serif; font-size: 14px; line-height: 22px; text-align: left;"&gt;npm install xmldom.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
var&amp;nbsp;select = require('./xpath').SelectNodes &amp;nbsp; //the path to xpath.js in your project&lt;br /&gt;
&amp;nbsp;&amp;nbsp;, Dom = require('xmldom').DOMParser&lt;br /&gt;
&lt;br /&gt;
var doc = new Dom().parseFromString('&amp;lt;x&amp;gt;&amp;lt;y id="1"&amp;gt;&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;')&lt;br /&gt;
&amp;nbsp;&amp;nbsp;, res = select(doc, "//*[@id]") //select all nodes that has an "id" attribute&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if (res.length==1) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;console.log(res[0].localName); //prints "y"&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-6643162815045669886?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_9491AEn246R6bYJb7yCseeip4M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_9491AEn246R6bYJb7yCseeip4M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_9491AEn246R6bYJb7yCseeip4M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_9491AEn246R6bYJb7yCseeip4M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/CjNodg-pEvE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/6643162815045669886/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=6643162815045669886" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/6643162815045669886?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/6643162815045669886?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/CjNodg-pEvE/xml-stack-for-nodejs-that-works-on.html" title="Xml stack for node.js that works on windows" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-VUGwNcLqsdQ/T2zk8NUIdfI/AAAAAAAABoU/WFNfPuXXU4w/s72-c/3172_Dr_Evil.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/03/xml-stack-for-nodejs-that-works-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYNQ3g8fip7ImA9WhVTEk0.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-6883343737841786724</id><published>2012-02-25T22:53:00.000+02:00</published><updated>2012-02-25T22:53:12.676+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-25T22:53:12.676+02:00</app:edited><title>Wcf and Node.js, better together</title><content type="html">&lt;b&gt;(get wcf.js&amp;nbsp;&lt;a href="https://github.com/yaronn/wcf.js"&gt;on github&lt;/a&gt;!)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto; padding-left: 10px; padding-right: 3px;"&gt;
&lt;span style="font-size: 100%;"&gt;&lt;br /&gt;var binding = new WSHttpBinding(&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; { MessageEncoding: "Mtom"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; , SecurityMode:"TransportWithMessageCredential"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;br /&gt;
&amp;nbsp; &amp;nbsp;, proxy = new Proxy(binding) &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
proxy.ClientCredentials.Username.Username = "yaron";&lt;br /&gt;
proxy.ClientCredentials.Username.Password = "1234";&lt;br /&gt;
&lt;br /&gt;
proxy.send(message, function(response) {&lt;br /&gt;
&amp;nbsp; console.log(response)&lt;br /&gt;
});&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Do you see anything...um, special? Well c# already has the "var" keyword since version 3.0 so maybe it is some kind of a c#-ish dialect? Or maybe it is a CTP for javascript as a CLR language? Or something related to the &lt;a href="http://www.windowsazure.com/en-us/develop/nodejs/"&gt;azure sdk for node.js&lt;/a&gt;?&lt;br /&gt;
&lt;br /&gt;
Not at all. This is a snippet from &lt;b&gt;&lt;a href="https://github.com/yaronn/wcf.js"&gt;wcf.js&lt;/a&gt; - a pure javascript node.js module that makes wcf and node.js work together!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As node assumes its central place in modern web development, many developers build node apps that must consume downstream wcf services. Now if these services use &lt;strike&gt;WCF Web API&lt;/strike&gt; &lt;a href="http://www.asp.net/web-api"&gt;ASP.NET Web API&lt;/a&gt; it is very easy. It is also a breeze if you are in a position to add a basic http binding to the Wcf service, and just a little bit of more work if you plan to employ a &lt;a href="http://msdn.microsoft.com/en-us/library/ee517423.aspx"&gt;wcf router&lt;/a&gt; to do the protocol bridging. &lt;a href="https://github.com/yaronn/wcf.js"&gt;Wcf.js&lt;/a&gt; is a library that aims to provide a pure-javascript development experiece for such scenarios.&lt;br /&gt;
&lt;br /&gt;
Note that building new node.js ws-* based services is a non-goal for this project. Putting aside all the religious wars, Soap is not the "node way", so you should stick to Rest where you'll get good language support (json) and built-in libraries.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;"Hello, Wcf... from node"&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;You are closer than you think to consume your first Wcf service node.js:&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;1.&lt;/b&gt; Create a new wcf web site in VS and call it "Wcf2Node". If you use .Net 4 than BasicHttpBinding is the default, otherwise in web.config replace WsHttp with BasicHttp. No need to deploy, just run the service in VS using F5.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2.&lt;/b&gt; Create anywhere a folder for the node side and from the command line enter its root and execute:&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
$&amp;gt; npm install wcf.js&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;3. &lt;/b&gt;In the same folder create test.js:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto; padding-left: 10px; padding-right: 3px;"&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;span style="font-size: 100%;"&gt;var BasicHttpBinding = require('wcf.js').BasicHttpBinding&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; , Proxy = require('wcf.js').Proxy&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; , binding = new BasicHttpBinding()&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; , proxy = new Proxy(binding, "
http://localhost:12/Wcf2Node/Service.svc")&lt;/div&gt;
&lt;span style="font-family: 'courier new';"&gt;&lt;span style="font-size: 100%;"&gt;&amp;nbsp; ,&amp;nbsp;&lt;/span&gt;message = '&amp;lt;Envelope&amp;nbsp;xmlns=' +&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '"http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;Header /&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp;+&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;Body&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp;+&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;GetData xmlns="http://tempuri.org/"&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp;+&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;value&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;123&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/value&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp;+&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/GetData&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp;+&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/Body&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp;+&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/Envelope&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;'&lt;/span&gt;&lt;br /&gt;
&lt;header style="font-family: 'courier new'; font-size: 100%;"&gt;&lt;br /&gt;proxy.send(message, "http://tempuri.org/IService/GetData", function(response, ctx) {&lt;br /&gt;
&amp;nbsp; console.log(response)&lt;br /&gt;
});&lt;br /&gt;
&lt;/header&gt;&lt;br /&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;4.&lt;/b&gt; In test.js, change the port 12 (don't ask...) to the port your service runs on.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;5.&lt;/b&gt;&amp;nbsp;Now we can execute node:&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
$&amp;gt; node test.js&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;6.&lt;/b&gt; You should now see the output soap on the console.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-A4ITc2y2Uyw/T0lHsptjb_I/AAAAAAAABoI/sUYx7GDGMms/s1600/b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="56" src="http://4.bp.blogspot.com/-A4ITc2y2Uyw/T0lHsptjb_I/AAAAAAAABoI/sUYx7GDGMms/s640/b.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Of course this sample is not very interesting and you may be better off sending the raw soap using &lt;a href="https://github.com/mikeal/request"&gt;request&lt;/a&gt;. Let's see something more interesting. If your service uses ssl + username token (transport with message credential), the config may look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto; padding-left: 10px; padding-right: 3px;"&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;lt;wsHttpBinding&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;binding name="NewBinding0"&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;security mode="TransportWithMessageCredential"&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;message clientCredentialType="UserName" /&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/security&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/binding&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/wsHttpBinding&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
The following modifications to the previous example will allow to consume it from node:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto; padding-left: 10px; padding-right: 3px;"&gt;
&lt;span style="font-size: 100%;"&gt;...&lt;/span&gt;&lt;br /&gt;
binding = new WSHttpBinding(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { SecurityMode: "TransportWithMessageCredential"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , MessageClientCredentialType: "UserName"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
proxy.ClientCredentials.Username.Username = "yaron";&lt;br /&gt;
proxy.ClientCredentials.Username.Password = "1234";&lt;br /&gt;
proxy.send(...)&lt;/div&gt;
&lt;br /&gt;
And here is the wire soap:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;
&amp;lt;Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Header&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;o:Security&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;u:Timestamp&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;u:Created&amp;gt;2012-02-26T11:03:40Z&amp;lt;/u:Created&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;u:Expires&amp;gt;2012-02-26T11:08:40Z&amp;lt;/u:Expires&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/u:Timestamp&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;o:UsernameToken&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;o:Username&amp;gt;yaron&amp;lt;/o:Username&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"&amp;gt;1234&amp;lt;/o:Password&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/o:UsernameToken&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/o:Security&amp;gt;&lt;br /&gt;
&amp;lt;/Header&amp;gt;&lt;br /&gt;&lt;br /&gt;
&amp;lt;Body&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;EchoString xmlns="http://tempuri.org/"&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;s&amp;gt;123&amp;lt;/s&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/EchoString&amp;gt;&lt;br /&gt;
&amp;lt;/Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
If you use Mtom check out this code:&lt;br /&gt;
&lt;br /&gt;
(The formatting here is a bit strage due to my blog layout - it looks much better &lt;a href="https://github.com/yaronn/wcf.js"&gt;in github&lt;/a&gt;!)&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto; padding-left: 10px; padding-right: 3px;"&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;span style="font-size: 100%;"&gt;var CustomBinding = require('wcf.js').CustomBinding&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;br /&gt;
&amp;nbsp; , MtomMessageEncodingBindingElement = require('wcf.js').MtomMessageEncodingBindingElement&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;br /&gt;
&amp;nbsp; , HttpTransportBindingElement = require('wcf.js').HttpTransportBindingElement&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;br /&gt;
&amp;nbsp; , Proxy = require('wcf.js').Proxy&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; , fs = require('fs')&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; , binding = new CustomBinding(&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ new MtomMessageEncodingBindingElement({MessageVersion: "Soap12WSAddressing10"}),&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , new HttpTransportBindingElement()&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ])&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;br /&gt;
&amp;nbsp; , proxy = new Proxy(binding, "http://localhost:7171/Service/mtom")&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-family: 'courier new';"&gt;&lt;span style="font-size: 100%;"&gt;&amp;nbsp; ,&amp;nbsp;&lt;/span&gt;message = '&amp;lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"&amp;gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;s:Header /&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;s:Body&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;EchoFiles xmlns="http://tempuri.org/"&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;value xmlns:a="http://schemas.datacontract.org/2004/07/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;a:File1 /&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;' +&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/value&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/EchoFiles&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/s:Body&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;' +&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;/s:Envelope&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'courier new';"&gt;'&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
proxy.addAttachment("//*[local-name(.)='File1']", "me.jpg");&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
proxy.send(message, "http://tempuri.org/IService/EchoFiles", function(response, ctx) {&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; var file = proxy.getAttachment("//*[local-name(.)='File1']")&lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
&amp;nbsp; fs.writeFileSync("result.jpg", file) &amp;nbsp; &amp;nbsp; &lt;/div&gt;
&lt;div style="font-family: 'courier new'; font-size: 100%;"&gt;
});&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
Mtom is a little bit trickier since wcf.js needs to know which nodes are binary. Using simple xpath can help you achieve that.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Getting your hands dirty with Soap&lt;/b&gt;&lt;br /&gt;
&lt;a href="https://github.com/yaronn/wcf.js"&gt;Wcf.js&lt;/a&gt; uses soap in its raw format. Code generation of proxies does not resonate well with a dynamic language like javascript. I also assume you are consuming an existing service which already has working clients so you should be able to get a working soap sample. And if you do like some level of abstraction between you and your soap I recommend&amp;nbsp;&lt;a href="https://github.com/milewise/node-soap"&gt;node-soap&lt;/a&gt;, though it still does not integrate with &lt;a href="https://github.com/yaronn/wcf.js"&gt;wcf.js&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
If you will use raw soap requests and responses you would need a good xml library. And while node has plenty of dom / xpath libraries, they are not windows friendly. My next post will be on a good match here.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Supported standards&lt;/b&gt;&lt;br /&gt;
Wcf implements many of the ws-* standards and even more via proprietary extensions. The first version of wcf.js supports the following:&lt;br /&gt;
&lt;br /&gt;
&lt;li&gt; MTOM&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; WS-Security (Username token only)&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; WS-Addressing (all versions)&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; HTTP(S)&lt;br /&gt;
&lt;br /&gt;
The supported binding are:&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; BasicHttpBinding&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; WSHttpBinding&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt; CustomBinding&lt;br /&gt;
&lt;br /&gt;
What do you want to see next? &lt;a href="mailto:yaronn01@gmail.com"&gt;Let me know&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get the code&lt;/b&gt;&lt;br /&gt;
&lt;a href="https://github.com/yaronn/wcf.js"&gt;Wcf.js&lt;/a&gt; is hosted in GitHub, and everyone is welcome to contribute features and fixes if needed.&lt;br /&gt;
Wcf.js is powered by &lt;a href="https://github.com/yaronn/ws.js"&gt;ws.js&lt;/a&gt;, the actual standards implementation, which I will introduce in an upcoming post.&lt;br /&gt;
&lt;/li&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-6883343737841786724?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/16R2x8iNi2irb2VzdPeKeHXllKI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/16R2x8iNi2irb2VzdPeKeHXllKI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/16R2x8iNi2irb2VzdPeKeHXllKI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/16R2x8iNi2irb2VzdPeKeHXllKI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/-9l4vLVzJBI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/6883343737841786724/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=6883343737841786724" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/6883343737841786724?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/6883343737841786724?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/-9l4vLVzJBI/wcf-and-nodejs-better-together.html" title="Wcf and Node.js, better together" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-A4ITc2y2Uyw/T0lHsptjb_I/AAAAAAAABoI/sUYx7GDGMms/s72-c/b.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2012/02/wcf-and-nodejs-better-together.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAGR3s9eyp7ImA9WhZaFUk.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-3901971865529412616</id><published>2011-07-01T21:58:00.000+03:00</published><updated>2011-07-01T21:58:46.563+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-01T21:58:46.563+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MVP" /><title>I'm an MVP (again!)</title><content type="html">I guess I can skip the &lt;a href="http://geekswithblogs.net/dotNETvinz/archive/2011/07/01/microsoft-mvp-again-for-2011.aspx"&gt;traditional&lt;/a&gt; &lt;a href="http://ryanhayes.net/blog/community/microsoft-mvp-award-announcement/"&gt;email quote&lt;/a&gt; by now. I just got the 2011 MVP award in Connected System Developer. &lt;a href="http://webservices20.blogspot.com/2010/07/im-microsoft-mvp.html"&gt;Becoming an MVP&lt;/a&gt; last year was the beginning of a very &lt;a href="http://webservices20.blogspot.com/2011/04/and-were-back.html"&gt;interesting year&lt;/a&gt;. I'm super exited to get this award for the second time. I'll do my best to justify this recognition.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-fDlJxsYcy68/Tg4W9CqhTdI/AAAAAAAABf8/hppiYWRaYW8/s1600/MVP_horizontal.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img style="border-width:0px;" border="0" height="81" width="200" src="http://2.bp.blogspot.com/-fDlJxsYcy68/Tg4W9CqhTdI/AAAAAAAABf8/hppiYWRaYW8/s200/MVP_horizontal.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-3901971865529412616?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MRFMKLAS6jXYM0NVMTMVX2qVp70/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MRFMKLAS6jXYM0NVMTMVX2qVp70/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MRFMKLAS6jXYM0NVMTMVX2qVp70/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MRFMKLAS6jXYM0NVMTMVX2qVp70/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/mO_Npi3jOGs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/3901971865529412616/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=3901971865529412616" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/3901971865529412616?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/3901971865529412616?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/mO_Npi3jOGs/im-mvp-again.html" title="I'm an MVP (again!)" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-fDlJxsYcy68/Tg4W9CqhTdI/AAAAAAAABf8/hppiYWRaYW8/s72-c/MVP_horizontal.png" height="72" width="72" /><thr:total>9</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/07/im-mvp-again.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUNR3k-fip7ImA9WhZbE0k.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-3588090195868574041</id><published>2011-06-18T01:03:00.001+03:00</published><updated>2011-06-18T01:04:56.756+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-18T01:04:56.756+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web Services Interoperability" /><category scheme="http://www.blogger.com/atom/ns#" term="BindingBox" /><title>Binding Box now supprots the Wcf Interop Bindings</title><content type="html">Earlier this week Microsoft had released the &lt;a href="http://webservices20.blogspot.com/2011/06/test-drive-shiny-new-wcf-interop.html"&gt;Wcf Interop Bindings and VS extension&lt;/a&gt;. You can download and try it from &lt;a href="http://wcf.codeplex.com/releases/view/68276"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Today I am proud to announce that the &lt;a href="http://webservices20.cloudapp.net/"&gt;&lt;b&gt;Wcf Binding Box&lt;/b&gt;&lt;/a&gt; supports these interoperability bindings.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://webservices20.cloudapp.net/" imageanchor="1" style="margin-left:1em; margin-right:1em; border:0px"&gt;&lt;img border="0" height="55" width="300" src="http://1.bp.blogspot.com/_6DvmzgV-o20/SpHKyel4gII/AAAAAAAABFg/URwfjJiJQXg/s400/logo+-+small.PNG" style="border-width:0px" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is the Wcf Binding Box?&lt;/b&gt;&lt;br /&gt;
It is an online bindings converter. You give it a binding configuration (e.g. WSHttpBinding) and it returns an equivalent custom binding.&lt;br /&gt;
&lt;br /&gt;
Full explanation is &lt;a href="http://webservices20.blogspot.com/2009/08/bindingbox-convert-wcf-bindings.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Why do we need it?&lt;/b&gt;&lt;br /&gt;
Because it's fun :) And also allows to take a working WSHttpBinding and further customize it with settings which it does not directly expose, for example MaxClockSkew.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How the interop bindings relate to this?&lt;/b&gt;&lt;br /&gt;
Suppose you use the interop bindings to author a Wcf service which WebLogic consumes. You may want to further configure your Wcf service with settings that the WebLogicBinding does not expose. Since the WebLogicBinding internally inherits from WSHttpBinding this is a similar use case to the original purpose of the binding box.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Put this WebSphere binding as the input in the &lt;a href="http://webservices20.cloudapp.net/"&gt;binding box&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;&amp;lt;bindings&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;      &amp;lt;webSphereBinding&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;        &amp;lt;binding name="interopBinding" messageEncoding="Text"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;          &amp;lt;security mode="MutualCertificate" establishSecurityContext="true" algorithmSuite="TripleDes" /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;        &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;      &amp;lt;/webSphereBinding&amp;gt;&lt;br /&gt;
&amp;lt;/bindings&amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
and this is the custom binding output:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;&lt;br /&gt;
&amp;lt;customBinding&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;  &amp;lt;binding name="NewBinding0"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    &amp;lt;transactionFlow transactionProtocol="WSAtomicTransaction11" /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    &amp;lt;security authenticationMode="SecureConversation" algorithmSuite="TripleDes" messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;      &amp;lt;secureConversationBootstrap authenticationMode="MutualCertificate" requireSignatureConfirmation="true" algorithmSuite="TripleDes" messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10" requireDerivedKeys="false" /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    &amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    &amp;lt;textMessageEncoding /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    &amp;lt;httpTransport /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;  &amp;lt;/binding&amp;gt;&lt;br /&gt;
&amp;lt;/customBinding&amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Check out the &lt;a href="http://webservices20.cloudapp.net/"&gt;binding box here&lt;/a&gt;.&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-3588090195868574041?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tHXL_MVEyR3eXboW0wCfFiaLww4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tHXL_MVEyR3eXboW0wCfFiaLww4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tHXL_MVEyR3eXboW0wCfFiaLww4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tHXL_MVEyR3eXboW0wCfFiaLww4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/lMhAmsVEttI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/3588090195868574041/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=3588090195868574041" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/3588090195868574041?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/3588090195868574041?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/lMhAmsVEttI/binding-box-now-supprots-wcf-interop.html" title="Binding Box now supprots the Wcf Interop Bindings" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_6DvmzgV-o20/SpHKyel4gII/AAAAAAAABFg/URwfjJiJQXg/s72-c/logo+-+small.PNG" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/06/binding-box-now-supprots-wcf-interop.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIFRnw_eyp7ImA9WhZbEEU.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-1583602142054920247</id><published>2011-06-14T23:31:00.000+03:00</published><updated>2011-06-14T23:31:57.243+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-14T23:31:57.243+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web Services Interoperability" /><category scheme="http://www.blogger.com/atom/ns#" term="WSIT" /><category scheme="http://www.blogger.com/atom/ns#" term="WCF" /><title>Test drive the shiny new Wcf interop bindings</title><content type="html">&lt;a href="http://wcf.codeplex.com/"&gt;wcf.codeplex.com&lt;/a&gt; is the place where most of the wcf action happens at these days. If you have been following it recently you have seen a lot of activity around &lt;a href="http://wcf.codeplex.com/wikipage?title=WCF%20HTTP"&gt;Rest and Http&lt;/a&gt;. As of yesterday Soap officially joins the codepex party. Microsoft has just &lt;a href="http://blogs.msdn.com/b/appfabric/archive/2011/06/13/announcing-wcf-express-interop-bindings.aspx"&gt;released&lt;/a&gt; the &lt;a href="http://wcf.codeplex.com/releases/view/68276"&gt;WCF Express Interop Bindings&lt;/a&gt; - a new Visual Studio extension for Soap web services interoperability. &lt;b&gt;If you use Wcf this matters to you!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What did Microsoft release yesterday?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Web services interoperability is always a pain. When security is involved it is usualy more then a casual 'oouch'. Yes, WsHttpBinding has a specific permutation of settings which can interoperate with Oracle web logic. And I know a lot of people who have tried to find that permutation in a brute force manner. Mostly doing this is a waste of time which we prefer to invest in more productive areas.&lt;br /&gt;
&lt;br /&gt;
So here's the idea behind yesterday's shipping: We now have a new binding, WebLogicBinding, which only allow us to configure settings which are interoperable with web logic. So all settings are interoperable! We also have bindings for web sphere, axis2 (wso2) and metro (wsit / glassfigh / tango).&lt;br /&gt;
In addition we got a nice wizard on top of Visual Studio's new project dialog which allows us to easily author interoperable services using these bindings.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-6p1U_Gz9KVA/Tfewn1DENNI/AAAAAAAABdE/430ZHoad6ac/s1600/platform.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="318" width="400" src="http://1.bp.blogspot.com/-6p1U_Gz9KVA/Tfewn1DENNI/AAAAAAAABdE/430ZHoad6ac/s400/platform.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;But don't we already have WS-Policy for interoperability?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
WS-Policy helps clients to generate proxies which complies with the service requirements as expressed by the Wsdl. The express bindings solves a prior problem: How to write from the first place a service which a specific client platform can support? Once we write such a service its Wsdl will contain the WS-Policy pixy dust so that the client can auto-configure itself.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Nice... I'll take two!&lt;/b&gt;&lt;br /&gt;
You can take four: MetroBinding, WebSphereBinding, WebLogicBinding and Wso2InteropBinding.&lt;br /&gt;
Take them from &lt;a href="http://wcf.codeplex.com/releases/view/68276"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;div style="font-size:large"&gt;Tutorial - WCF and Metro interop&lt;/div&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Let's see why web services interoperability just got a whole lot easier.&lt;br /&gt;
We'll create a WCF service with mutual x.509 certificates in the message level and consume it with a Metro client.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Prepare the environment&lt;/b&gt;&lt;br /&gt;
You need VS 2010 and the &lt;a href="http://wcf.codeplex.com/releases/view/68276"&gt;express bindings&lt;/a&gt;. After you extract the bindings zip simply execute bin\Microsoft.ServiceModel.Interop.Extension.vsix  which will install it on VS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2. Create a new service&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In VS create a new project. Note how the Wcf node now contains a new project type "Express Interop Wcf Service Application":&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-8P1ntPKWQJI/Tfeykzvg1VI/AAAAAAAABdM/lj-iaNOk-Ew/s1600/project.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="259" width="400" src="http://1.bp.blogspot.com/-8P1ntPKWQJI/Tfeykzvg1VI/AAAAAAAABdM/lj-iaNOk-Ew/s400/project.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Choose that project type. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Configure the express binding wizard&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
A few moments after creating the project you will see the wizard.&lt;br /&gt;
First choose the platform our clients will use - Metro, this time.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-xpyYJsxsw2Y/TfezHhqt-_I/AAAAAAAABdU/PTshlWdD_Iw/s1600/platform.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="318" width="400" src="http://1.bp.blogspot.com/-xpyYJsxsw2Y/TfezHhqt-_I/AAAAAAAABdU/PTshlWdD_Iw/s400/platform.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now we need to configure our security requirements. Choose "mutual certificate" which means both client and server will present an x.509 certificate in the message level. It also implies encryption and digital signature (in this case). To keep it simple we omit the secure conversation.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-VXU99K7urxU/TfezgD3L0NI/AAAAAAAABdc/YLYN_1z0APY/s1600/security.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="320" width="400" src="http://1.bp.blogspot.com/-VXU99K7urxU/TfezgD3L0NI/AAAAAAAABdc/YLYN_1z0APY/s400/security.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Next in the advanced settings use the Basic128 algorithm since it is the one Metro supports by default (for Basic256 a patch needs to be applied).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-2jDTx1eKPQg/Tfez0S_-B1I/AAAAAAAABdk/bKee1F926t4/s1600/advanced.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="320" width="400" src="http://1.bp.blogspot.com/-2jDTx1eKPQg/Tfez0S_-B1I/AAAAAAAABdk/bKee1F926t4/s400/advanced.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Finally configure the certificate. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-C352IzjY4ag/TffA5b0r5SI/AAAAAAAABfU/g0eKF9eSn28/s1600/certificate.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="323" width="400" src="http://2.bp.blogspot.com/-C352IzjY4ag/TffA5b0r5SI/AAAAAAAABfU/g0eKF9eSn28/s400/certificate.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I recommend to use this certificate (password: adminadmin):&lt;br /&gt;
&lt;br /&gt;
&lt;iframe title ="Preview" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:98px;height:115px;padding:0;background-color:#fcfcfc;" src="http://cid-4999e5d00449874d.office.live.com/embedicon.aspx/.Public/xwssecurityserver.pfx"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Now run the service. This is a web site project so it will open the documentation page with the Wsdl link. Make sure to have the Wsdl url handy since we will use it in a moment.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-gxcOb7MCoYc/Tfe0UCQiVWI/AAAAAAAABds/XXbYL1Zatg4/s1600/wsdl.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="349" width="400" src="http://4.bp.blogspot.com/-gxcOb7MCoYc/Tfe0UCQiVWI/AAAAAAAABds/XXbYL1Zatg4/s400/wsdl.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Now we want to configure Metro.&lt;br /&gt;
&lt;br /&gt;
1. Set up the environment&lt;br /&gt;
&lt;br /&gt;
You should have &lt;a href="http://netbeans.org/"&gt;NetBeans&lt;/a&gt; 7 (or higher), though NetBeans 6.7 also worked for me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Create a new project of type Java Application:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-JbrqSoX9sG8/Tfe1lsAVbGI/AAAAAAAABd0/O9ok02iOn8c/s1600/netbeans%2Bproject.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="273" width="400" src="http://1.bp.blogspot.com/-JbrqSoX9sG8/Tfe1lsAVbGI/AAAAAAAABd0/O9ok02iOn8c/s400/netbeans%2Bproject.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Any of the default settings are fine:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-SUHwXAdKm-A/Tfe1uQeeH6I/AAAAAAAABd8/Pv7-7IRSquA/s1600/app%2Bdetails.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="275" width="400" src="http://1.bp.blogspot.com/-SUHwXAdKm-A/Tfe1uQeeH6I/AAAAAAAABd8/Pv7-7IRSquA/s400/app%2Bdetails.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
3. Right click the package in the project view and add a new "web service client":&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-MFLaTvjIAfo/Tfe2DxZqkwI/AAAAAAAABeE/Q6pg1-iRA3s/s1600/add%2Bws%2Bclient.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="326" width="400" src="http://3.bp.blogspot.com/-MFLaTvjIAfo/Tfe2DxZqkwI/AAAAAAAABeE/Q6pg1-iRA3s/s400/add%2Bws%2Bclient.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now is a good time to paste that Wsdl url:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-jWeB5YEsFYs/Tfe2pZ9fcPI/AAAAAAAABeM/uaYT1LoAgYI/s1600/add%2Bws%2Bsettings.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="269" width="400" src="http://2.bp.blogspot.com/-jWeB5YEsFYs/Tfe2pZ9fcPI/AAAAAAAABeM/uaYT1LoAgYI/s400/add%2Bws%2Bsettings.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
4. The service reference is now in the project view so right click it and edit the Web Service Attributes (similar to the Wcf configuration... just very different :):&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-th9nggA2Gzc/Tfe3Piz1VII/AAAAAAAABeU/2td_dwTAsgM/s1600/ws%2Battributes.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="272" width="325" src="http://1.bp.blogspot.com/-th9nggA2Gzc/Tfe3Piz1VII/AAAAAAAABeU/2td_dwTAsgM/s400/ws%2Battributes.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
5. &lt;b&gt;This step is a workaround if your NetBeans version ships with Metro 2.0 (which is the case for NetBeans 7).&lt;/b&gt; See below how to know if you need it.&lt;br /&gt;
&lt;br /&gt;
 We can see that Metro had automatically identified that client and server certificates are required. This was due to the WS-Policy in the Wsdl. &lt;br /&gt;
&lt;br /&gt;
Before we continue we need to do some trick. NetBeans 7 ships with Metro 2.0 which has a bug with certificates. In favor of those who reach this post via a search engine this is the error message:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;java.lang.NullPointerException &lt;br /&gt;
...&lt;br /&gt;
  at com.sun.xml.ws.security.impl.policy.CertificateRetriever.digestBST (CertificateRetriever.java:136) &lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
To solve this you need to download &lt;a href="http://metro.java.net/2.1/"&gt;Metro 2.1&lt;/a&gt; (or higher). For now just extract it to some folder.&lt;br /&gt;
&lt;br /&gt;
Now as part of this workaround check the "use development defaults" drop down in the quality attributes dialog you opened in step 4. Also approve any message you are prompt with.&lt;br /&gt;
&lt;br /&gt;
 &lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-AfKXs0qH3Yw/Tfe5AElgt7I/AAAAAAAABec/yD0V-OTo67c/s1600/dev%2Bdefaults.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="267" width="400" src="http://2.bp.blogspot.com/-AfKXs0qH3Yw/Tfe5AElgt7I/AAAAAAAABec/yD0V-OTo67c/s400/dev%2Bdefaults.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Click Ok to close the dialog. &lt;br /&gt;
&lt;br /&gt;
In the project pane expand the libraries node. It should look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-8O1DB2JJdXw/Tfe6xfD8lVI/AAAAAAAABes/a00XKuwPVpY/s1600/metro20.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="366" width="375" src="http://3.bp.blogspot.com/-8O1DB2JJdXw/Tfe6xfD8lVI/AAAAAAAABes/a00XKuwPVpY/s400/metro20.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This workaround applies to version 2. If you see another version (even smaller) no need for this. What you need to do is delete all the references to Metro jar files (don't delete the jdk though). Instead of them right click the "libraries" node, choose "add jar/folder..." and choose the jar files in metro\bin folder from the metro 2.1 zip you just extracted. Add all jar files in that folder. The libraries node will now look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-A2Boh4IWzNI/Tfe7g3R3nAI/AAAAAAAABe0/3mmvnAnzp-4/s1600/metro21.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="269" width="322" src="http://4.bp.blogspot.com/-A2Boh4IWzNI/Tfe7g3R3nAI/AAAAAAAABe0/3mmvnAnzp-4/s400/metro21.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
6. We are now ready to do the actual configuration. Open again the web service quality attribute form as you did in step 4. Uncheck the "use development defaults" check box. Now configure the keystore and trust store. I recommend to use this java key store file:&lt;br /&gt;
&lt;br /&gt;
&lt;iframe title ="Preview" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:98px;height:115px;padding:0;background-color:#fcfcfc;" src="http://cid-4999e5d00449874d.office.live.com/embedicon.aspx/.Public/certificates.zip"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Open "keystore..." and "Truststore.." each in its turn and do the below.&lt;br /&gt;
Set the path to the .jks file you extracted form the certificates file above, set the password to "adminadmin", and click "load alias".  The alias for the key store is xws-security-client and for the trust store is xws-security-server.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/--4cUWJm5n5s/Tfe80-ID20I/AAAAAAAABfE/U1Wtu1X8YxY/s1600/trust.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="247" width="400" src="http://4.bp.blogspot.com/--4cUWJm5n5s/Tfe80-ID20I/AAAAAAAABfE/U1Wtu1X8YxY/s400/trust.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-hLCZ4oUNpg4/Tfe8v82vgxI/AAAAAAAABe8/eTnOE9u3eeg/s1600/keystore.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="185" width="400" src="http://4.bp.blogspot.com/-hLCZ4oUNpg4/Tfe8v82vgxI/AAAAAAAABe8/eTnOE9u3eeg/s400/keystore.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
7. Now we need to write the client code. &lt;br /&gt;
&lt;br /&gt;
Since most of my readers are .Net developers let's see if we can pull this one out without any Java coding at all.&lt;br /&gt;
&lt;br /&gt;
Drag the GetData node from the project pane to the main() method. It should now look like this (depending on the netbeans version):&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;        try { // Call Web Service Operation&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            org.tempuri.Service service = new org.tempuri.Service();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            org.tempuri.IService port = service.getMetroBindingIService();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            // TODO initialize WS operation arguments here&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            java.lang.Integer value = Integer.valueOf(0);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            // TODO process result here&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            java.lang.String result = port.getData(value);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            System.out.println("Result = "+result);&lt;br /&gt;
&amp;nbsp;        } &lt;br /&gt;
&amp;nbsp;catch (Exception ex) {&lt;br /&gt;
 &lt;br /&gt;
      &amp;nbsp;  }&lt;br /&gt;
 &lt;br /&gt;
    }&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-bkVrMSYGE10/Tfe9JKhGBwI/AAAAAAAABfM/rkR6_1vU3nc/s1600/netbeans.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="217" width="400" src="http://4.bp.blogspot.com/-bkVrMSYGE10/Tfe9JKhGBwI/AAAAAAAABfM/rkR6_1vU3nc/s400/netbeans.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
if you use Netbeans 7 it will only generate a method so you would need to add code that calls it:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;public static void main(String[] args) {&lt;br /&gt;
&amp;nbsp;        try&lt;br /&gt;
&amp;nbsp;        {                     &lt;br /&gt;
      &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;      String s = getData(2);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            System.out.println("result is" + s);&lt;br /&gt;
&amp;nbsp;        } catch (Exception ex) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;            System.out.println(ex.getMessage() + ex.getStackTrace().toString());&lt;br /&gt;
&amp;nbsp;        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private static String getData(java.lang.Integer value) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;        org.tempuri.Service service = new org.tempuri.Service();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;        org.tempuri.IService port = service.getMetroBindingIService();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;        return port.getData(value);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
7. Now run the application (F6).&lt;br /&gt;
&lt;br /&gt;
Here is the output:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;the result is: 2&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center; background-color: #ffffff;"&gt;&lt;img border="0" height="319" width="311" src="http://3.bp.blogspot.com/-635K1HM-l_w/TffDO8v6QQI/AAAAAAAABfk/H7cvPf26grg/s400/applause.jpg" style="border-width:0px" /&gt;&lt;/div&gt;&lt;br /&gt;
Web services interoperability was never easier!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-1583602142054920247?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ALjhhZNK_55-tIEqzQym8F-VamM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ALjhhZNK_55-tIEqzQym8F-VamM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ALjhhZNK_55-tIEqzQym8F-VamM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ALjhhZNK_55-tIEqzQym8F-VamM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/5I-lwG4RyNA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/1583602142054920247/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=1583602142054920247" title="31 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/1583602142054920247?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/1583602142054920247?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/5I-lwG4RyNA/test-drive-shiny-new-wcf-interop.html" title="Test drive the shiny new Wcf interop bindings" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-6p1U_Gz9KVA/Tfewn1DENNI/AAAAAAAABdE/430ZHoad6ac/s72-c/platform.jpg" height="72" width="72" /><thr:total>31</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/06/test-drive-shiny-new-wcf-interop.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUHR3w7cCp7ImA9WhZXGEU.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-2317092035264399280</id><published>2011-05-08T17:44:00.000+03:00</published><updated>2011-05-08T22:50:36.208+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-08T22:50:36.208+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web Services Interoperability" /><category scheme="http://www.blogger.com/atom/ns#" term="X.509" /><title>Cannot resolve KeyInfo for unwrapping key</title><content type="html">With web services sometimes your client is able to receive a good response from the server but your client will still throw exception due to some policy violation. With wcf / mutual authentication the following error can appear:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;&lt;br /&gt;
Cannot resolve KeyInfo for unwrapping key: KeyInfo 'SecurityKeyIdentifier&lt;br /&gt;
(&lt;br /&gt;
IsReadOnly = False,&lt;br /&gt;
Count = 1,&lt;br /&gt;
Clause[0] = X509IssuerSerialKeyIdentifierClause(Issuer = 'CN=MyCert', Serial = '-903515464456238801534567116928')&lt;br /&gt;
)&lt;br /&gt;
', available tokens 'SecurityTokenResolver&lt;br /&gt;
(&lt;br /&gt;
TokenCount = 0,&lt;br /&gt;
)&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
This error usually means that the server had digitally signed its response using an unexpected certificate. The expected certificate is the one which the client has configured as the server certificate and have possibly used to encrypt the message with.&lt;br /&gt;
&lt;br /&gt;
So as with many of the security interoperability problems, you should verify that you use the correct certificate on both sides of the wire.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-2317092035264399280?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uci-vG2Iv81CggmPBofBpsWySbA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uci-vG2Iv81CggmPBofBpsWySbA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uci-vG2Iv81CggmPBofBpsWySbA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uci-vG2Iv81CggmPBofBpsWySbA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/vaBGT00H0Ao" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/2317092035264399280/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=2317092035264399280" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/2317092035264399280?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/2317092035264399280?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/vaBGT00H0Ao/cannot-resolve-keyinfo-for-unwrapping.html" title="Cannot resolve KeyInfo for unwrapping key" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/05/cannot-resolve-keyinfo-for-unwrapping.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAGRXY5eSp7ImA9WhdRGEk.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-5888651375322452044</id><published>2011-05-08T00:56:00.001+03:00</published><updated>2011-08-09T02:05:24.821+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-09T02:05:24.821+03:00</app:edited><title>Anyone else having problems with Google Calendar?</title><content type="html">&lt;b&gt;Update (july 11): Fixed!&lt;/b&gt;
&lt;br  /&gt;&lt;br  /&gt;

I'll start by saying that &lt;a href="http://draft.blogger.com/www.google.com/calendar"&gt;google calendar&lt;/a&gt; is a great product which I was happy to use for quite a while. Not any more, it seams. For some reason I intermittently don't get email notifications about scheduled events. I have first noticed that over a year ago and assumed it is a one off glitch. I have then noticed it in many more occasions and since last week I don't get notifications at all.&lt;br /&gt;
&lt;br /&gt;
I mainly use gcal as a "send myself a future email reminder" application. While it does not contain any important appointments, I do have there information about birthdays, random arrangements, sites without rss which I periodically visit etc. And while managing to live without these unsent reminders makes me wonder if I had ever needed them anyway, it is still annoying.&lt;br /&gt;
&lt;br /&gt;
This issue appears in several gcal  &lt;a href="http://www.google.com/support/forum/p/Calendar/thread?tid=5f8b821e94687f07&amp;amp;hl=en"&gt;forum&lt;/a&gt; &lt;a href="http://www.google.com/support/forum/p/Calendar/thread?tid=3192687cb0f4cc40&amp;amp;hl=en"&gt;threads&lt;/a&gt;, has a special &lt;a href="http://www.google.com/support/calendar/bin/answer.py?hl=en&amp;amp;answer=36589"&gt;troubleshooting&lt;/a&gt; page, and is actually a &lt;a href="http://www.google.com/support/calendar/bin/static.py?page=known_issues.cs"&gt;known issue&lt;/a&gt;. The last link says "We're currently investigating reports from users who indicate that they're not receiving email notifications for their events". How many users? What is the current status?&lt;br /&gt;
&lt;br /&gt;
Just out of curiosity - does anyone else experience missing email notifications from google calendar?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-5888651375322452044?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OFGr1735bOLAtlJk3WvDmmDjISs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OFGr1735bOLAtlJk3WvDmmDjISs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OFGr1735bOLAtlJk3WvDmmDjISs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OFGr1735bOLAtlJk3WvDmmDjISs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/qns1G9x1WMY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/5888651375322452044/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=5888651375322452044" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/5888651375322452044?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/5888651375322452044?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/qns1G9x1WMY/anyone-else-having-problems-with-google.html" title="Anyone else having problems with Google Calendar?" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/05/anyone-else-having-problems-with-google.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4MSHk6fyp7ImA9WhZXF00.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-7155304586258470441</id><published>2011-05-06T22:09:00.000+03:00</published><updated>2011-05-06T22:09:49.717+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-06T22:09:49.717+03:00</app:edited><title>Wcf with WS-Addressing March 2004</title><content type="html">&lt;p&gt;Wcf supports two WS-Addressing versions – the August 2004 draft and the actual standard v 1.0. There is another wsa version which is used by some soap stacks (who said wse 2?) – the march 2004 draft. To turn this fact to a more practical&amp;#160; problem, you might need to write a wcf client to a (non Wcf) service which expects a request like this:&lt;/p&gt;&lt;div style="padding-right: 3px; padding-left: 10px; background-color: #eeeeee"&gt;&lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Envelope&lt;/font&gt;&lt;font color="#ff0000"&gt; xmlns&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; xmlns:wsa&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;&lt;strong&gt;http://schemas.xmlsoap.org/ws/2004/03/addressing&lt;/strong&gt;&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;Header&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;wsa:Action&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;http://myAction&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;wsa:Action&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;wsa:MessageID&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;uuid:5024616c-d0r2-56h3-bjj7-ab10p89eee63&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;wsa:MessageID&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;wsa:ReplyTo&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;wsa:Address&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;wsa:Address&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;wsa:ReplyTo&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;wsa:To&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;http://server/Calc&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;wsa:To&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;        &lt;br /&gt;
...         &lt;br /&gt;
&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
(note the bold wsa version – wcf cannot emit it).&lt;br /&gt;
&lt;br /&gt;
One straight forward way to do this with wcf is to push these headers to the soap using a message inspector. But what if you also need to sign the wsa headers with a digital signature?&lt;/p&gt;In this case you need to write a custom behavior which push the wsa headers to the IncomingSignatureParts property. The whole code looks like this:&lt;br /&gt;
&amp;#160;&lt;/p&gt;&lt;div style="padding-right: 3px; padding-left: 10px; background-color: #eeeeee"&gt;&lt;div class="code"&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.Collections.Generic&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.Linq&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.Runtime.Serialization&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.ServiceModel&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.ServiceModel.Channels&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.ServiceModel.Description&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.ServiceModel.Dispatcher&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.ServiceModel.Security&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.Text&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.Xml&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.Xml.Linq&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;MyApplication.ServiceReference1&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;namespace&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;MyApplication&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;SignMessageHeaderBehavior&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;Attribute&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;IEndpointBehavior&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;action&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;XmlQualifiedName&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;headers&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;SignMessageHeaderBehavior(&lt;/font&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;XmlQualifiedName&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;headers,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;action)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;this&lt;/font&gt;&lt;font color="#000000"&gt;.headers&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;headers&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;this&lt;/font&gt;&lt;font color="#000000"&gt;.action&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;action&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Validate(ServiceEndpoint&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;endpoint)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;AddBindingParameters(ServiceEndpoint&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;endpoint,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;BindingParameterCollection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;bindingParameters)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;requirements&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;bindingParameters.Find&amp;lt;ChannelProtectionRequirements&amp;gt;()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;foreach&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;h&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;headers)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;part&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;MessagePartSpecification(h)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;requirements.IncomingSignatureParts.AddParts(part,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;action)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ApplyDispatchBehavior(ServiceEndpoint&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;endpoint,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;EndpointDispatcher&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;endpointDispatcher)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ApplyClientBehavior(ServiceEndpoint&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;endpoint,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ClientRuntime&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;clientRuntime)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;clientRuntime.MessageInspectors.Add(&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;AddHeaderMessageInspector())&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;[DataContract(Namespace&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)]&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ReplyToHeader&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;[DataMember]&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Address&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;get;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;set;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;AddHeaderMessageInspector&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;IClientMessageInspector&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;BeforeSendRequest(&lt;/font&gt;&lt;font color="#0000ff"&gt;ref&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Message&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;request,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;IClientChannel&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;channel)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;request.Headers.Add(MessageHeader.CreateHeader(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Action&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://myAction&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;request.Headers.Add(MessageHeader.CreateHeader(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;MessageID&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;uuid:5024616c-d0r2-56h3-bjj7-ab10p89eee63&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;request.Headers.Add(MessageHeader.CreateHeader(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;ReplyTo&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ReplyToHeader()&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Address&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;}))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;request.Headers.Add(MessageHeader.CreateHeader(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;To&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://server/Calc&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;request&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;AfterReceiveReply(&lt;/font&gt;&lt;font color="#0000ff"&gt;ref&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Message&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;reply,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;correlationState)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Program&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Main(&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#000000"&gt;[]&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;args)&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;c&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;SimpleServiceSoapClient()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;headers&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;XmlQualifiedName&amp;gt;()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;headers.Add(&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;XmlQualifiedName(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Action&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;headers.Add(&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;XmlQualifiedName(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;MessageID&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;headers.Add(&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;XmlQualifiedName(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;ReplyTo&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;headers.Add(&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;XmlQualifiedName(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;To&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://schemas.xmlsoap.org/ws/2004/03/addressing&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;c.Endpoint.Behaviors.Add(&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;SignMessageHeaderBehavior(headers,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;http://tempuri.org/EchoString&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;c.EchoString(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;123&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;        &lt;br /&gt;
&lt;br /&gt;
&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-7155304586258470441?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/go-4c09DWtUmuZ4YT0L2ZEmN5h8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/go-4c09DWtUmuZ4YT0L2ZEmN5h8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/go-4c09DWtUmuZ4YT0L2ZEmN5h8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/go-4c09DWtUmuZ4YT0L2ZEmN5h8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/qen8IcmH0BQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/7155304586258470441/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=7155304586258470441" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7155304586258470441?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7155304586258470441?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/qen8IcmH0BQ/wcf-with-ws-addressing-march-2004.html" title="Wcf with WS-Addressing March 2004" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/05/wcf-with-ws-addressing-march-2004.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MGRXw_eSp7ImA9WhZQFUQ.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-8566630159677163028</id><published>2011-04-23T13:57:00.001+03:00</published><updated>2011-04-24T01:57:04.241+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-24T01:57:04.241+03:00</app:edited><title>svcutil.exe with a wsdl on the local disk</title><content type="html">&lt;a href="http://msdn.microsoft.com/en-us/library/aa347733.aspx"&gt;svcutil.exe&lt;/a&gt; is a command line to generate wcf proxies from wsdl files (and more).&lt;br /&gt;
&lt;br /&gt;
for example the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;$&gt; svcutil http://localhost/MyServices/Service.svc?WSDL&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
will generate Service.cs which is the proxy you can add to your project.&lt;br /&gt;
&lt;br /&gt;
Sometimes the wsdl file is not on a url but on the local disk. In theory this should work:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;$&gt; svcutil c:\services\calc.wsdl&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
In practice this would work only if the wsdl does not reference other wsdl or xsd files (even if their relative reference is correct). The same would work with "add service reference" in VS so not sure why it fails here. One solution is to explicitly specify all the referenced schema files in the command:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;$&gt; svcutil" c:\services\calc.wsdl" "c:\person.xsd c:\units.xsd"&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
This usually works but requires manual work and is not always desired when a large number of references is used.&lt;br /&gt;
&lt;br /&gt;
An alternative would be to upload the wsdl and the references to a web server and svcutil from there. If you have iis on your dev machine this is actually pretty simple:&lt;br /&gt;
&lt;br /&gt;
1. copy the wsdl root folder to a subfolder under c:\inetpub\wwwroot&lt;br /&gt;
2. run&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;$&gt; svcutil http://localhost/root/calc.wsdl&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
That's all, no need to specify all files. svcutil works well from url locations. Do not forget to remove the wsdl folder after so your iis folder would stay clean.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-8566630159677163028?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r1qysJv8hbVi460XaYHPHnaPiZ8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r1qysJv8hbVi460XaYHPHnaPiZ8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r1qysJv8hbVi460XaYHPHnaPiZ8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r1qysJv8hbVi460XaYHPHnaPiZ8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/CTvuDLRzzZA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/8566630159677163028/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=8566630159677163028" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/8566630159677163028?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/8566630159677163028?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/CTvuDLRzzZA/svcutilexe-with-wsdl-on-local-disk.html" title="svcutil.exe with a wsdl on the local disk" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>6</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/04/svcutilexe-with-wsdl-on-local-disk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YNRngyfCp7ImA9WhZQFU0.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-1272997824112368740</id><published>2011-04-22T22:32:00.001+03:00</published><updated>2011-04-22T22:39:57.694+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-22T22:39:57.694+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="blogging" /><title>...and, we're back!</title><content type="html">This post violates at least 4 of the &lt;a href="http://www.codinghorror.com/blog/2007/08/thirteen-blog-cliches.html"&gt;blogging cliches&lt;/a&gt;. Read at your own risk!&lt;br /&gt;
&lt;br /&gt;
You might have noticed I've disappeared for a while. The reason is that I have been practically leaving on an airplane in the last two months beeing over 80 hours in flights.&lt;br /&gt;
&lt;br /&gt;
In early march I have visited Redmond for the MVP global summit. I've met people which so far I've only seen in the cover of &lt;a href="http://www.amazon.com/Vittorio-Bertocci/e/B001JSFAPC/ref=sr_ntt_srch_lnk_6?qid=1303498816&amp;sr=1-6"&gt;their books&lt;/a&gt;. I've met some of my &lt;a href="http://weblogs.asp.net/cibrax/"&gt;favorite bloggers&lt;/a&gt; and readers. And even though I'm a Connected Systems MVP I took a picture with the Biztalk MVP's (thanks to &lt;a href="http://geekswithblogs.net/leonidganeline/Default.aspx"&gt;leonid&lt;/a&gt; who took the photo):&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-YIB5pDXYoWA/TbHToEJNOwI/AAAAAAAABbs/M6c21K3Bd9I/s1600/biztalk.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="233" width="400" src="http://1.bp.blogspot.com/-YIB5pDXYoWA/TbHToEJNOwI/AAAAAAAABbs/M6c21K3Bd9I/s400/biztalk.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I have then visited customers in many states in the US. I never regretted for taking that extra coat and clothes because some places were damn cold! Still I had a lot of fun, met some super smart people, and also had time to visit beautiful places:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-RQz1ZY7IFDg/TbHTvq1CNuI/AAAAAAAABb0/pUWKmFKO1pI/s1600/maine_tower.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="300" width="400" src="http://4.bp.blogspot.com/-RQz1ZY7IFDg/TbHTvq1CNuI/AAAAAAAABb0/pUWKmFKO1pI/s400/maine_tower.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-K5oPmzmB7iY/TbHTvlA7DJI/AAAAAAAABb8/qxrXR2Bnehg/s1600/maine_forest.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="300" width="400" src="http://1.bp.blogspot.com/-K5oPmzmB7iY/TbHTvlA7DJI/AAAAAAAABb8/qxrXR2Bnehg/s400/maine_forest.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Shortly after I came back home I got my 5th star in the &lt;a href="http://social.msdn.microsoft.com/forums/en-US/wcf/threads/"&gt;MSDN forums&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-lG6MqXElmio/TbHZTtOpAxI/AAAAAAAABcc/Gi15cvzyMS8/s1600/forum1.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="134" width="400" src="http://3.bp.blogspot.com/-lG6MqXElmio/TbHZTtOpAxI/AAAAAAAABcc/Gi15cvzyMS8/s400/forum1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I'm very proud for being able to help so many people. I am going to continue and participate in these forums not only because I love to help but also since I learn a lot on the way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-1272997824112368740?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/M6zkkNrcCdFHLo6YEwU16I_dahc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M6zkkNrcCdFHLo6YEwU16I_dahc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/M6zkkNrcCdFHLo6YEwU16I_dahc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M6zkkNrcCdFHLo6YEwU16I_dahc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/j1TbFftNegw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/1272997824112368740/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=1272997824112368740" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/1272997824112368740?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/1272997824112368740?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/j1TbFftNegw/and-were-back.html" title="...and, we're back!" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-YIB5pDXYoWA/TbHToEJNOwI/AAAAAAAABbs/M6c21K3Bd9I/s72-c/biztalk.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/04/and-were-back.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YFQnczeip7ImA9Wx9bFk4.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-4148799028609395875</id><published>2011-02-25T13:58:00.000+02:00</published><updated>2011-02-25T13:58:33.982+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-25T13:58:33.982+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Azure" /><title>More lessons learned on Windows Azure pricing</title><content type="html">My &lt;a href="http://webservices20.blogspot.com/2011/02/bart-simpsons-guide-to-windows-azure.html"&gt;Bart Simpson's guide to windows Azure&lt;/a&gt; has been highly successful. From &lt;a href="http://twitter.com/#search?q=bart%20simpson%20guide%20azure"&gt;Twitter&lt;/a&gt; to the &lt;a href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=801441008259024895"&gt;post comments&lt;/a&gt; to &lt;a href="mailto:yaronn01@gmail.com"&gt;my mail box&lt;/a&gt; I got a lot of good feedback.&lt;br /&gt;
&lt;br /&gt;
Here are some insights you might want to know:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Extra small instances might not be included in your free Azure account.&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://davidpallmann.blogspot.com/"&gt;David Pallmann&lt;/a&gt; was the first to notice that some of the special Azure offers (like the &lt;a href="http://www.microsoft.com/windowsazure/offers/popup/popup.aspx?lang=en&amp;locale=he-il&amp;offer=MS-AZR-0005P"&gt;MSDN&lt;/a&gt; one) actually have some small letters:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;**Extra small compute instances are available in beta and are billed separately from other compute instance sizes.&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
This practically means you pay for these instances from day 1! Here is my account:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-U0My5zWE7w0/TWeXqaDROHI/AAAAAAAABbQ/EEnt3VSFMec/s1600/xsmall.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="104" width="400" src="http://4.bp.blogspot.com/-U0My5zWE7w0/TWeXqaDROHI/AAAAAAAABbQ/EEnt3VSFMec/s400/xsmall.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
So you should check your account details and determine if extra small instances work for you.&lt;br /&gt;
&lt;br /&gt;
I also recommend you check out David's &lt;a href="http://davidpallmann.blogspot.com/2010/08/hidden-costs-in-cloud-part-1-driving.html"&gt;Hidden Costs in the Cloud&lt;/a&gt; series which has some important insights.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Hot news: Azure trial with extra small instances&lt;/b&gt;&lt;br /&gt;
A few days ago Microsoft has started to offer an introductory offer which includes 750 free monthly hours of x-small instances (until June). &lt;a href="http://blogs.msdn.com/b/windowsazure/archive/2011/02/22/announcing-new-windows-azure-platform-introductory-special-includes-750-free-hours-of-windows-azure-extra-small-instance-and-more.aspx"&gt;Check it out&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Also thanks to &lt;a href="http://www.blogger.com/profile/05166122279770270194"&gt;David Makogon&lt;/a&gt; I've fixed an error in the config sample to configure extra small instances.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-4148799028609395875?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2y0zNkBmOlPSMO7zodrWdhKGb2g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2y0zNkBmOlPSMO7zodrWdhKGb2g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2y0zNkBmOlPSMO7zodrWdhKGb2g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2y0zNkBmOlPSMO7zodrWdhKGb2g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/c8ciJtRxVWU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/4148799028609395875/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=4148799028609395875" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/4148799028609395875?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/4148799028609395875?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/c8ciJtRxVWU/more-lessons-learned-on-windows-azure.html" title="More lessons learned on Windows Azure pricing" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-U0My5zWE7w0/TWeXqaDROHI/AAAAAAAABbQ/EEnt3VSFMec/s72-c/xsmall.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/02/more-lessons-learned-on-windows-azure.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MASHc_fyp7ImA9Wx9bFE0.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-801441008259024895</id><published>2011-02-19T15:17:00.002+02:00</published><updated>2011-02-22T23:17:29.947+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-22T23:17:29.947+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Azure" /><title>Bart Simpson's guide to Windows Azure</title><content type="html">The original name of this post was "a poor developer's guide to windows azure" but then I found the &lt;a href="http://www.addletters.com/pictures/bart-simpson-generator/759648.htm"&gt;Bart Simpson's Chalkboard Generator&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-riYODsfFs6U/TV-pHhon4CI/AAAAAAAABaA/KFO-OAbYqjU/s1600/bart1.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0"  height="321" width="600" src="http://3.bp.blogspot.com/-riYODsfFs6U/TV-pHhon4CI/AAAAAAAABaA/KFO-OAbYqjU/s1600/bart1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
My Azure story begins back in PDC08 where Microsoft announced a community preview of Windows Azure which includes a free subscription for a limited period. I took advantage of this to develop the &lt;a href="http://webservices20.cloudapp.net/"&gt;Wcf binding box&lt;/a&gt; (which btw got some &lt;a href="http://sgomez.blogspot.com/2010/01/moving-from-basichttpbinding-to.html"&gt;good&lt;/a&gt; &lt;a href="http://blog.aggregatedintelligence.com/2010/06/wcf-tool-convert-binding-to-custom.html"&gt;reviews&lt;/a&gt;). A few months after, the preview has ended and my account became read only. I was not too bothered by it as I had &lt;a href="http://webservices20.blogspot.com/2010/11/wsihero-gui-utility-for-web-services.html"&gt;other&lt;/a&gt; &lt;a href="http://webservices20.blogspot.com/2009/06/wcf-self-hosting-project-template.html"&gt;things&lt;/a&gt; &lt;a href="http://webservices20.blogspot.com/2010/07/im-microsoft-mvp.html"&gt;in mind&lt;/a&gt;. A few weeks ago I had a crazy idea to build a &lt;a href="http://webservices20.blogspot.com/2011/02/wsdl2wsdl-convert-wsdl-20-to-wsdl-11.html"&gt;wsdl2--&gt;wsdl1&lt;/a&gt; converter. The most natural way to do it was to create an online service. But my azure trial is already in freeze, and I did not want to pay a hosting service just to host a free contribution I make for the community. What could I do? I then remembered &lt;a href="http://webservices20.blogspot.com/2010/09/free-msdn-ultimate-subscriptions-vs.html"&gt;that I&lt;/a&gt; (and my contest &lt;a href="http://webservices20.blogspot.com/2010/10/and-winners-are.html"&gt;winners&lt;/a&gt;) have a special &lt;a href="http://www.microsoft.com/windowsazure/offers/popup/popup.aspx?lang=en&amp;locale=he-il&amp;offer=MS-AZR-0005P"&gt;MSDN premium Azure offer&lt;/a&gt;. And this is how &lt;a href="http://webservices20.blogspot.com/2011/02/wsdl2wsdl-convert-wsdl-20-to-wsdl-11.html"&gt;wsdl2wsdl&lt;/a&gt; came to life. Veni, vidi, vici? Oh my...&lt;br /&gt;
&lt;br /&gt;
A few days after going on air I get this email from Microsoft:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;&lt;b&gt;Your Windows Azure Platform Usage Estimate - 75% of Base Units Consumed‏&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
This e-mail notification comes to you as a courtesy to update you on your Windows Azure platform usage.  Our records indicate that your subscription has exceeded 75% of the compute hours amount included with your offer for your current billing period.  Any hours in excess of the amount included with your offer will be charged at standard rates.&lt;br /&gt;
&lt;br /&gt;
Total Consumed*:                         592.000000 Compute Hours&lt;br /&gt;
Amount included with your offer:     750 Compute Hours&lt;br /&gt;
Amount over (under) your monthly average:        -158.000000 Compute Hours&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Let's see... I should get 750 compute hours / month, a month has 31 days (a worse case analyses), 750 / 31 &gt; 24 which means I should have more than 24 complimentary compute hours per day. How could they run out so fast?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Bart Simpson's Azure Rule #1:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-PVZkVI5Cmsg/TV-sQT9wwvI/AAAAAAAABaI/sGmveWORo0k/s1600/bart2.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="321" width="600" src="http://3.bp.blogspot.com/-PVZkVI5Cmsg/TV-sQT9wwvI/AAAAAAAABaI/sGmveWORo0k/s1600/bart2.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
As a developer, it made too much sense to develop the &lt;a href="http://webservices20.cloudapp.net/"&gt;binding box&lt;/a&gt; and &lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html"&gt;wsdl2wsdl&lt;/a&gt; in a separate visual studio solutions. This yields two separate azure hosted services:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-zoKzO7DxBk4/TV-tZe7PzXI/AAAAAAAABaQ/Fgojiuki1ds/s1600/azure1.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="193" width="400" src="http://2.bp.blogspot.com/-zoKzO7DxBk4/TV-tZe7PzXI/AAAAAAAABaQ/Fgojiuki1ds/s400/azure1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
And this yields two separate bill items per day:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-uNyUXNcFf2k/TV-uH1I6xkI/AAAAAAAABaY/ByW96iUekRM/s1600/azure2.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="219" width="400" src="http://3.bp.blogspot.com/-uNyUXNcFf2k/TV-uH1I6xkI/AAAAAAAABaY/ByW96iUekRM/s400/azure2.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;This means I was not paying for 24 compute hours per day, I was paying 24*2!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-GK-9KBkIRK0/TV-6vdb777I/AAAAAAAABbA/sTH2_x_RLHI/s1600/homer.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="320" src="http://2.bp.blogspot.com/-GK-9KBkIRK0/TV-6vdb777I/AAAAAAAABbA/sTH2_x_RLHI/s400/homer.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now you may say RTFM. But nobody does it. Not when we download some open source library from the web, and not when we upload something in the other direction.&lt;br /&gt;
&lt;br /&gt;
But why did the bill had 4 itmes and not two?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Bart Simpson's Azure Rule #2:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-UyqM2Q3wEtc/TV-wy5M0kCI/AAAAAAAABag/xaoa_zNCiLg/s1600/bart3.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="321" width="600" src="http://1.bp.blogspot.com/-UyqM2Q3wEtc/TV-wy5M0kCI/AAAAAAAABag/xaoa_zNCiLg/s1600/bart3.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Not only did I had two hosted services online, but I also had two environments for each - staging and deployment. You pay for what you get:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;2 services * 2 deployments = 4 * 24 hours a day = &lt;b&gt;96 hours a day!&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Bart Simpson's Azure Rule #3:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-oKt8Z8qO3_M/TV-yCOykxhI/AAAAAAAABao/8ekP-DeBNaQ/s1600/bart4.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="321" width="600" src="http://2.bp.blogspot.com/-oKt8Z8qO3_M/TV-yCOykxhI/AAAAAAAABao/8ekP-DeBNaQ/s1600/bart4.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I was on my way to a &lt;a href="http://en.wikipedia.org/wiki/Chapter_11,_Title_11,_United_States_Code"&gt;Chapter 11&lt;/a&gt; when I decided to panically press the stop button on my unintended deployments:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-4W_f7SP2VgM/TV-y3lxDxFI/AAAAAAAABaw/BQc4Zwi-sMI/s1600/stop.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="87" width="235" src="http://3.bp.blogspot.com/-4W_f7SP2VgM/TV-y3lxDxFI/AAAAAAAABaw/BQc4Zwi-sMI/s400/stop.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
However this does not &lt;a href="http://www.microsoft.com/online/help/en-us/helphowto/af25ac10-7c47-42dc-b139-dab954ed2eff.htm"&gt;reduce costs&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;&lt;i&gt;Suspending your deployment will still result in charges because the compute instances are allocated to you and cannot be allocated to another customer.&lt;/i&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Remember: Always delete deployments you do not want to pay for. Suspending / stopping them still results in charges.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Bart Simpson's Azure Rule #4:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-jeN-w4qc_fo/TV-1RANF3yI/AAAAAAAABa4/8toVExQ-nGs/s1600/bart5.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="321" width="600" src="http://3.bp.blogspot.com/-jeN-w4qc_fo/TV-1RANF3yI/AAAAAAAABa4/8toVExQ-nGs/s1600/bart5.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
For applications with very small needs an &lt;a href="http://msdn.microsoft.com/en-us/library/ee814754.aspx"&gt;extra small instance&lt;/a&gt; should be enough. It can save you costs by &lt;b&gt;up to 60%!&lt;/b&gt; &lt;a href="http://msdn.microsoft.com/en-us/library/ee814754.aspx"&gt;Configuring it&lt;/a&gt; is very easy:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;&amp;lt;WebRole name="WebRole1" vmsize="ExtraSmall"&amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Homer Simpson once said "Trying is the first step towards failure." In my case it was the first step to this blog post and to my first two weeks Azure bill:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Z5I07o-K8oc/TV-7ae70p_I/AAAAAAAABbI/udNZmSy4jnk/s1600/bill.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="125" width="400" src="http://3.bp.blogspot.com/-Z5I07o-K8oc/TV-7ae70p_I/AAAAAAAABbI/udNZmSy4jnk/s400/bill.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I'll end the month on around 50$ which is not too bad for a commercial site. But for a contribution to the community and my fun? Oh my...&lt;br /&gt;
&lt;br /&gt;
Weather you are an independent developer or a Fortune 5000 company - know the Azure &lt;a href="http://www.microsoft.com/windowsazure/pricing/"&gt;pricing model&lt;/a&gt; and how your account fits in.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-801441008259024895?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/U5JsLRSWQGU9yxnCDP4sbYbjjP8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U5JsLRSWQGU9yxnCDP4sbYbjjP8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/U5JsLRSWQGU9yxnCDP4sbYbjjP8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U5JsLRSWQGU9yxnCDP4sbYbjjP8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/DO4EWMsThxo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/801441008259024895/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=801441008259024895" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/801441008259024895?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/801441008259024895?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/DO4EWMsThxo/bart-simpsons-guide-to-windows-azure.html" title="Bart Simpson's guide to Windows Azure" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-riYODsfFs6U/TV-pHhon4CI/AAAAAAAABaA/KFO-OAbYqjU/s72-c/bart1.jpg" height="72" width="72" /><thr:total>8</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/02/bart-simpsons-guide-to-windows-azure.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEEQX85cCp7ImA9Wx9UFkw.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-2960157726505119502</id><published>2011-02-13T19:20:00.060+02:00</published><updated>2011-02-13T19:20:00.128+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-13T19:20:00.128+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="X.509" /><title>Wcf: Keyset does not exist</title><content type="html">When using X.509 certificates with Wcf the below error may appear:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;System.Security.Cryptography.CryptographicException: Keyset does not exist &lt;br /&gt;
ArgumentException: The certificate 'CN=MyCert' must have a private key that is capable of key exchange. The process must have access rights for the private key.&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
95% of the time this means that the certificate which the server/client use either does not have a private key or the Wcf host process does not have permissions to the key. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;No private key&lt;/b&gt;&lt;br /&gt;
This case applies when the certificate is expected to have a private key, e.g. the server private certificate when defined on the server side, and not the server public when defined on the client. To check if the certificate has a private key follow these steps:&lt;br /&gt;
&lt;br /&gt;
1. start--&gt;run--&gt;"mmc"&lt;br /&gt;
&lt;br /&gt;
2. file--&gt;add remove snap in...&lt;br /&gt;
&lt;br /&gt;
3. double click "certificates" in the list&lt;br /&gt;
&lt;br /&gt;
4. Choose "My user account" if the certificate is located in the current user store, or "Computer account" if located on the local machine store. If you are unsure you can repeat the process twice each time with a different choice.&lt;br /&gt;
&lt;br /&gt;
5. click Finish + Ok&lt;br /&gt;
&lt;br /&gt;
6. now expand the tree to the correct store and when you see the certificate double click it. Then check if it has the little key icon on it. If it does not then you did not import it with its private key (or got the wrong cert).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-vhKcMw672to/TVb8BM1IX2I/AAAAAAAABZk/r9jS0-FyYds/s1600/cert.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="354" width="400" src="http://1.bp.blogspot.com/-vhKcMw672to/TVb8BM1IX2I/AAAAAAAABZk/r9jS0-FyYds/s400/cert.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;No permissions&lt;/b&gt;&lt;br /&gt;
Even if the certificate has a private key, it still does not mean all users on the machine have access to it. One common gotcha is to give access to the admin (or logged in user) but forget that IIS usually runs under another user account. This may cause a code to work correctly under an interactive user but to fail under IIS or any windows service. One way to check if this is the case is אם give the user &lt;everyone&gt; full permissions to the key (temporarily!).&lt;br /&gt;
&lt;br /&gt;
How to give permissions to a key?&lt;br /&gt;
the hard way is using WinHttpCertCfg.exe (&lt;a href="http://msdn.microsoft.com/en-us/library/aa384088(v=vs.85).aspx"&gt;details&lt;/a&gt; ,&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=c42e27ac-3409-40e9-8667-c748e422833f&amp;displaylang=en"&gt;download&lt;/a&gt;):&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;winhttpcertcfg -g -c LOCAL_MACHINE\My -s CN=WSE2QuickStartServer -a SomeUser&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Another way is using some gui utility and WseCertificate2.exe is a good one:&lt;br /&gt;
&lt;br /&gt;
1. install the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=1ba1f631-c3e7-420a-bc1e-ef18bab66122&amp;displaylang=en"&gt;Wse2 sdk&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2. run C:\Program Files\Microsoft WSE\v2.0\Tools\Certificates\WseCertificate2.exe&lt;br /&gt;
&lt;br /&gt;
3. choose the certificate using the location / store drop down lists and the "open certificate" button.&lt;br /&gt;
&lt;br /&gt;
4. click the "view private key file properties..." button on the bottom.&lt;br /&gt;
&lt;br /&gt;
5. depending on your OS version, grant permissions for the user you want.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-L89hIXEojyw/TVb-pxpp4OI/AAAAAAAABZs/Vv5sWq0XkA0/s1600/cert1.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="353" width="400" src="http://1.bp.blogspot.com/-L89hIXEojyw/TVb-pxpp4OI/AAAAAAAABZs/Vv5sWq0XkA0/s400/cert1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
If all this did not help ten make sure that when have you installed the certificate you checked the "mark this key as exportable" checkbox:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-aroaDrDz3mM/TVb_FSdzNUI/AAAAAAAABZ0/XytFpQpX0c8/s1600/cert3.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="358" width="400" src="http://1.bp.blogspot.com/-aroaDrDz3mM/TVb_FSdzNUI/AAAAAAAABZ0/XytFpQpX0c8/s400/cert3.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Sometimes these permissions are cached so you can also restart IIS (and maybe even the PC). And as always with certificate, when you're already pulling out your hair it's time to uninstall all certificates and start all over again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-2960157726505119502?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DH0jDCSK1V0cVrQOfw3qE7hJ6BE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DH0jDCSK1V0cVrQOfw3qE7hJ6BE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DH0jDCSK1V0cVrQOfw3qE7hJ6BE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DH0jDCSK1V0cVrQOfw3qE7hJ6BE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/JJ0ZBPkSiyE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/2960157726505119502/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=2960157726505119502" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/2960157726505119502?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/2960157726505119502?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/JJ0ZBPkSiyE/wcf-keyset-does-not-exist.html" title="Wcf: Keyset does not exist" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-vhKcMw672to/TVb8BM1IX2I/AAAAAAAABZk/r9jS0-FyYds/s72-c/cert.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/02/wcf-keyset-does-not-exist.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QNSXkyfSp7ImA9Wx9bEEs.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-7643698719452192389</id><published>2011-02-12T12:28:00.003+02:00</published><updated>2011-02-19T00:49:58.795+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-19T00:49:58.795+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wsdl2" /><title>Wcf support for Wsdl2</title><content type="html">Last time I introduced &lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html"&gt;wsdl2wsdl&lt;/a&gt;, an online wsdl2--&gt;wsdl1 converter.&lt;br /&gt;
Today I am proud to announce &lt;a href="http://svcutil2.codeplex.com/"&gt;svcutil2&lt;/a&gt; - a Wcf proxy generator for Wsdl2. svcutil2, like the original svcutil, generates Wcf proxies from Wsdl2 documents. This is a huge accelerator for web services interoperability. See related discussion &lt;a href="http://webservices20.blogspot.com/2011/02/wsdl2wsdl-convert-wsdl-20-to-wsdl-11.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
svcutil2 is &lt;a href="http://svcutil2.codeplex.com/"&gt;fully open sourced&lt;/a&gt; in CodePlex.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to generate Wcf clients from Wsdl2 documents?&lt;/b&gt;&lt;br /&gt;
1. Download the latest version of &lt;a href="http://svcutil2.codeplex.com/"&gt;svcutil2.exe&lt;/a&gt; from CodePlex&lt;br /&gt;
&lt;br /&gt;
2. Open the VS command console or otherwise make sure the original svcutil.exe is in the current path (usually located in C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin)&lt;br /&gt;
&lt;br /&gt;
3. Use svcutil2 exactly like you use svcutil:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee; padding-left: 10px; padding-right: 3px;"&gt;$&gt; svcutil2.exe http://webservices20.cloudapp.net/wsdl2wsdl/wsdl/simple2.wsdl&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
you can also work with Wsdl's from file system or use any of the svcutil available flags.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-7643698719452192389?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AsldLaZHrirjmFBotmV9s9Z4lnQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AsldLaZHrirjmFBotmV9s9Z4lnQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AsldLaZHrirjmFBotmV9s9Z4lnQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AsldLaZHrirjmFBotmV9s9Z4lnQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/Eg8Ihqsy6y4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/7643698719452192389/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=7643698719452192389" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7643698719452192389?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/7643698719452192389?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/Eg8Ihqsy6y4/wcf-support-for-wsdl2.html" title="Wcf support for Wsdl2" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/02/wcf-support-for-wsdl2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QGQXc7eyp7ImA9Wx9bEEs.&quot;"><id>tag:blogger.com,1999:blog-1482776199578137808.post-607525057331675545</id><published>2011-02-05T23:53:00.003+02:00</published><updated>2011-02-19T00:48:40.903+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-19T00:48:40.903+02:00</app:edited><title>Downgrade! Convert Wsdl 2.0 to Wsdl 1.1 (Wsdl2Wsdl)</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="87" width="305" src="http://2.bp.blogspot.com/_6DvmzgV-o20/TU2-G78v7dI/AAAAAAAABZU/1N1H--OORn4/s400/logo.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html"&gt;Wsdl2Wsdl&lt;/a&gt; is Here!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html"&gt;Wsdl 2.0&lt;/a&gt; never fulfilled its promises: It did not replace Wsdl 1.1 and soap stacks rarely support it. It did not became the Metadata standard for Rest based web services. And in an era where a service metadata can be summed up with a resource uri, Wsdl 2.0 is barely looked at as a simplification. All this is hardly Wsdl 2.0 fault. It's the timing. The backlash against Soap/Wsdl based services was far behind its point of no return in the period where Wsdl 2.0 was expected to get high adoption. It is not too risky to bet that Wsdl 2.0 will never be implemented by existing soap stacks, and Wcf is no exception.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;And the sky is blue. So?&lt;/b&gt;&lt;br /&gt;
While service authors may elegantly ignore Wsdl 2, if you're on the consumer side you might need to consume a service which metadata is a Wsdl 2 document. Most chances are that your client stack does not support code generation from this version of Wsdl. This is an annoying interoperability problem.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Wsdl2Wsdl&lt;/b&gt;&lt;br /&gt;
I have written an &lt;b&gt;&lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html"&gt;online Wsdl 2 --&gt; Wsdl 1 converter&lt;/a&gt;&lt;/b&gt;. While there are a number of &lt;a href="http://ssagara.blogspot.com/2009/01/converting-wsdl11-to-wsdl20-using-woden.html"&gt;Wsdl1 --&gt; Wsdl 2 converters&lt;/a&gt; available, I have yet to find one in the opposite direction.&lt;br /&gt;
&lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html"&gt;Wsdl2Wsdl&lt;/a&gt; provides you a url which dynamically converts the Wsdl per demand. This means you always get the live version of the wsdl. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="249" width="400" src="http://2.bp.blogspot.com/_6DvmzgV-o20/TU3C-k1gmtI/AAAAAAAABZc/gHZm09GPPHs/s400/wsdl2wsdl.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Can I run Wsdl2Wsdl on my premise?&lt;/b&gt;&lt;br /&gt;
The current version of &lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html"&gt;Wsdl2Wsdl&lt;/a&gt; is web based so if your Wsdl has some secrets / IP you should take this into consideration. I plan to open source it and ship an on premise version. You are welcome to &lt;a href="mailto:yaronn01@gmail.com"&gt;contact me&lt;/a&gt; if you need this urgently.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Where is Wsdl2Wsdl?&lt;/b&gt;&lt;br /&gt;
It's hosted on my Azure account:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://webservices20.cloudapp.net/wsdl2wsdl.html"&gt;http://webservices20.cloudapp.net/wsdl2wsdl.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="mailto:yaronn01@gmail.com"&gt;Drop me a mail&lt;/a&gt; with any issue or feedback.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1482776199578137808-607525057331675545?l=webservices20.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Zxu1He8vaDaHPLKhE-3w-jtSzIk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Zxu1He8vaDaHPLKhE-3w-jtSzIk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Zxu1He8vaDaHPLKhE-3w-jtSzIk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Zxu1He8vaDaHPLKhE-3w-jtSzIk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebServices20/~4/OLETr-9bptM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://webservices20.blogspot.com/feeds/607525057331675545/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1482776199578137808&amp;postID=607525057331675545" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/607525057331675545?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1482776199578137808/posts/default/607525057331675545?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebServices20/~3/OLETr-9bptM/wsdl2wsdl-convert-wsdl-20-to-wsdl-11.html" title="Downgrade! Convert Wsdl 2.0 to Wsdl 1.1 (Wsdl2Wsdl)" /><author><name>Yaron Naveh (MVP)</name><uri>http://www.blogger.com/profile/11793800386245798442</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://1.bp.blogspot.com/-RpzhtcNHGsg/T0kbdAm9OvI/AAAAAAAABnc/3p_EKqKcF04/s220/yaron.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_6DvmzgV-o20/TU2-G78v7dI/AAAAAAAABZU/1N1H--OORn4/s72-c/logo.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://webservices20.blogspot.com/2011/02/wsdl2wsdl-convert-wsdl-20-to-wsdl-11.html</feedburner:origLink></entry></feed>

