title: Calling a soap web service from Microsoft CRM plugin
body: <p>I have a plugin which calls a soap based web service on creation of a new contact.Its a simple soap web service which displays a welcome message when called</p>
  
  <p>Below is app.config which contains all configuration requirements.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
          &lt;configuration&gt;
              &lt;system.serviceModel&gt;
                  &lt;bindings&gt;
                      &lt;basicHttpBinding&gt;
                          &lt;binding name="WelcomeBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"&gt;
                          &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/&gt;
                          &lt;security mode="None"&gt;
                              &lt;transport clientCredentialType="None" proxyCredentialType="None" realm=""/&gt;
                              &lt;message clientCredentialType="UserName" algorithmSuite="Default"/&gt;
                          &lt;/security&gt;
                      &lt;/binding&gt;
                  &lt;/basicHttpBinding&gt;
              &lt;/bindings&gt;
              &lt;client&gt;
                  &lt;endpoint address="http://revesinc.com/WelcomeSeamService/Welcome" binding="basicHttpBinding" bindingConfiguration="WelcomeBinding" contract="ServiceReference1.Welcome" name="WelcomePort"/&gt;
              &lt;/client&gt;
          &lt;/system.serviceModel&gt;
      &lt;startup&gt;&lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;&lt;/startup&gt;&lt;/configuration&gt;
  </code></pre>
  
  <p>and below is C# plugin code</p>
  
  <pre><code>BasicHttpBinding myBinding = new BasicHttpBinding();    
  myBinding.Name = "WelcomeBinding";
  myBinding.Security.Mode = BasicHttpSecurityMode.None;
  myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;                       
  myBinding.Security.Message.ClientCredentialType =                   BasicHttpMessageCredentialType.UserName;
                      EndpointAddress endPointAddress = new EndpointAddress("http://revesinc.com/WelcomeSeamService/Welcome");
  WelcomeClient client = new WelcomeClient(myBinding,endPointAddress);
  </code></pre>
  
  <p>when i create a contact in CRM, nothing gets displayed on my server. there is no exception on CRM side either.
  Any idea???
  thanks</p>