我在一個BizTalk 2009年整合的另一面,我有一個非常簡單的合同站了起來,看起來是這樣的:當使用BizTalk消費WCF端點時,會導致對象引用錯誤的原因是什麼?
[ServiceContract(Name = "ReceiverService", Namespace = "http://services.company.org/")]
public interface IReceiverService : ILoadBalanced
{
[OperationContract]
void FinishedRouting(long applicationId);
[OperationContract]
void ResponsePending(long applicationId, string stringId, short count);
[OperationContract]
void ReportException(long applicationId, string errorMessage, string stringId);
[OperationContract]
void SaveResponse(WebResponseDto decision);
}
然而,當BizTalk組嘗試使用WCF服務消費嚮導,它扼流圈和提供該堆棧跟蹤:
[5096] System.NullReferenceException: Object reference not set to an instance of an object.
[5096] at Microsoft.BizTalk.Adapter.Wcf.Consuming.Exporters.BindingInfoExporter.CreatePrimaryTransport(ServiceEndpoint serviceEndpoint, Boolean custom)
[5096] at Microsoft.BizTalk.Adapter.Wcf.Consuming.Exporters.BindingInfoExporter.CreateSendPort(ServiceEndpoint endpoint, Port port, Boolean custom)
[5096] at Microsoft.BizTalk.Adapter.Wcf.Consuming.Exporters.BindingInfoExporter.Export(ServiceEndpointCollection endpoints, ServiceDescriptionCollection wsdlDocuments, Boolean custom)
[5096] at Microsoft.BizTalk.Adapter.Wcf.Consuming.Consumer.CreateBindingFiles(MetadataSet metadataSet, String serviceName)
然後再在這裏:
[5096] System.NullReferenceException: Object reference not set to an instance of an object.
[5096] at Microsoft.BizTalk.Adapter.Wcf.Consuming.Implementation.ClientImplementation.AddFilesToProject(String schemaNamespace)
[5096] System.NullReferenceException: Object reference not set to an instance of an object.
[5096] at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
[5096] at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
[5096] at Microsoft.BizTalk.Adapter.Wcf.Consuming.Consumer.Consume(ISynchronizeInvoke synchronizeInvoke, DTE dte, MetadataSet metadataSet, Project project, String importNamespace)
任何人都知道從哪裏開始尋找這一個?
感謝徹底反應!這最終導致我回答我的答案......挖掘LoadBalanced契約,有一個WebGet方法最終打破了BizTalk的導入。 WCF測試客戶端可以看到它,但確實在它旁邊放了一點紅色感嘆號......我想BizTalk在這種情況下拒絕繼續。 – 2010-09-30 15:25:33