title: NServiceBus with WCF on Azure
body: <p>I have the following classes:</p>
  
  <pre><code>namespace GAT.Cloud.Integration.WebServices {
      public class DepartureUpdatedService : WcfService&lt;DepartureUpdated, ErrorResponse&gt; {
      }
  }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>namespace GAT.ESB.Messages.Integration {
      [Serializable]
      public class DepartureUpdated : ICommand {
          public Departure Departure { get; set; }
          public DepartureSeries DepartureSeries { get; set; }
      }
  }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>namespace GAT.Cloud.Integration.Responses {
      public enum ErrorResponse {
          None,
          Fail
      }
  }
  </code></pre>
  
  <p>And the following snippet in the app.config</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;services&gt;
          &lt;service name="GAT.Cloud.Integration.WebServices.DepartureUpdatedService" behaviorConfiguration="Default"&gt;
              &lt;endpoint address="http://&lt;something&gt;.cloudapp.net/WebHttpService/" binding="basicHttpBinding" contract="NServiceBus.IWcfService`2[[GAT.ESB.Messages.Integration.DepartureUpdated, GAT.ESB.Messages.Integration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[GAT.Cloud.Integration.Responses.ErrorResponse, GAT.Cloud.Integration.Responses, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" /&gt;
              &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;                  
        &lt;/service&gt;
    &lt;/services&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am getting two errors:</p>
  
  <pre><code>The 'contract' attribute is invalid - The value 'NServiceBus.IWcfService`2[[GAT.ESB.Messages.Integration.DepartureUpdated, GAT.ESB.Messages.Integration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[GAT.Cloud.Integration.Responses.ErrorResponse, GAT.Cloud.Integration.Responses, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' is invalid according to its datatype 'serviceContractType' - The Enumeration constraint failed.
  </code></pre>
  
  <p>And</p>
  
  <pre><code>The 'name' attribute is invalid - The value 'GAT.Cloud.Integration.WebServices.DepartureUpdatedService' is invalid according to its datatype 'serviceNameType' - The Enumeration constraint failed.
  </code></pre>
  
  <p>I have no idea what is wrong with this. Does anybody have any ideas? Also, is this the correct set up for it to show up at <code>http://&lt;something&gt;.cloudapp.net/WebHttpService/</code> when it is published to Azure as a cloud service?</p>