0
我有以下类别:NServiceBus与WCF在Azure上
namespace GAT.Cloud.Integration.WebServices {
public class DepartureUpdatedService : WcfService<DepartureUpdated, ErrorResponse> {
}
}
而且
namespace GAT.ESB.Messages.Integration {
[Serializable]
public class DepartureUpdated : ICommand {
public Departure Departure { get; set; }
public DepartureSeries DepartureSeries { get; set; }
}
}
而且
namespace GAT.Cloud.Integration.Responses {
public enum ErrorResponse {
None,
Fail
}
}
而且在App.config下面的代码片段
<system.serviceModel>
<services>
<service name="GAT.Cloud.Integration.WebServices.DepartureUpdatedService" behaviorConfiguration="Default">
<endpoint address="http://<something>.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]]" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
我得到两个错误:
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.
而且
The 'name' attribute is invalid - The value 'GAT.Cloud.Integration.WebServices.DepartureUpdatedService' is invalid according to its datatype 'serviceNameType' - The Enumeration constraint failed.
我不知道什么是错。有人有任何想法吗?此外,这是否正确设置为在作为云服务发布到Azure时在http://<something>.cloudapp.net/WebHttpService/
上显示?
我在哭,但我不知道为什么。 – Darren
关于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]],这使得它有点......这个,反清理 –