2015-01-26 85 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

相关问题