2015-01-26 50 views
0

我們有一個非.NET客戶端,它在開發環境中使用基本HTTP綁定訪問AX 2012 R2 AIF服務。當服務被錯誤的XML調用時,可以理解的是,我們得到一個500 HTTP錯誤代碼。但是,即使在糾正客戶端之後,對服務的後續請求也會在一段時間內失敗。我們還沒有弄清楚我們需要等多久。在基於綁定的500 HTTP錯誤後,Dynamics AX 2012 R2 AIF服務未運行一段時間

Error details: 

HttpStatusCode: 500 
Content-Length: 2980 
Content-Type: text/xml; charset=utf-8 
Server: Microsoft-IIS/7.5 
X-Powered-By: ASP.NET 
Date: Mon, 26 Jan 2015 21:24:19 GMT 
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> 
    <s:Body> 
    <s:Fault> 
     <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode> 
     <faultstring xml:lang="en-US"> 
     Error in deserializing body of request message for operation 'myOperationName'. 
     OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'MyServiceNameMyOperationNameRequest' and 
     namespace 'http://tempuri.org'. Found node type 'Element' with name 'MyServiceNamemyOperationNameRequest' and namespace '' 
     </faultstring> 
     <detail  xmlns:s="http://www.w3.org/2003/05/soap-envelope"> 
     <ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel"  xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> 
      <HelpLink i:nil="true"></HelpLink> 
      <InnerException> 
      <HelpLink i:nil="true"></HelpLink> 
      <InnerException i:nil="true"></InnerException> 
      <Message> 
       OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'MyServiceNameMyOperationNameRequest' 
       and namespace 'http://tempuri.org'. Found node type 'Element' with name 'MyServiceNamemyOperationNameRequest' and namespace '' 
      </Message> 
      <StackTrace> 
       at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, 
       MessageDescription messageDescription, Object[] parameters, Boolean isRequest) 
       at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest) 
       at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[] parameters) 
      </StackTrace> 
      <Type>System.Runtime.Serialization.SerializationException</Type> 
      </InnerException> 
      <Message>Error in deserializing body of request message for operation 'myOperationName'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'MyServiceNamemyOperationNameRequest' and namespace 'http://tempuri.org'. Found node type 'Element' with name 'MyServiceNamemyOperationNameRequest' and namespace ''</Message> 
      <StackTrace> 
      at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[] parameters) 
      at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc) 
      at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) 
      at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) 
      at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) 
      at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) 
      </StackTrace> 
      <Type>System.ServiceModel.CommunicationException</Type> 
     </ExceptionDetail> 
     </detail> 
    </s:Fault> 
    </s:Body> 
</s:Envelope> 

有沒有辦法從這種情況下,無需等待恢復?

謝謝。

+0

請包含一些錯誤消息。對於AX轉到系統管理 - 定期 - 服務和應用程序集成框架 - 例外。對於IIS檢查Windows應用程序日誌或啓用錯誤輸出。 – Matej 2015-01-27 08:42:32

+0

好消息是我可以通過IIS重置恢復正常。顯然,這在生產環境中不是一個好的解決方案。我需要一個生產環境的解決方案。我無法發佈整個錯誤消息,因爲它太長而無法發表評論。讓我看看我是否可以編輯原始帖子。 – 2015-01-29 16:32:01

+0

AIF異常不顯示任何錯誤。我懷疑AIF服務甚至沒有被調用,因爲XML開始時不好。 – 2015-01-29 16:43:15

回答

0

您的信息格式對此通話無效。

錯誤清清楚楚地寫着:Expected to find node type 'Element' with name 'MyServiceNameMyOperationNameRequest' and namespace 'http://tempuri.org'. Found node type 'Element' with name 'MyServiceNamemyOperationNameRequest' and namespace ''

你必須namespace屬性添加到請求('http://tempuri.org)。

+0

我們知道問題出在哪裏。這篇文章是關於在例外之後沒有任何延遲地恢復環境。 – 2015-01-30 23:33:28