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]],這使得它有點......這個,反清理 –