Reputation: 445
We have a non .net client that accesses an AX 2012 R2 AIF service using Basic HTTP binding in a development environment. When the service is invoked with bad XML, understandably, we get a 500 HTTP error code. However, subsequent requests to the service fail for a period of time even after correcting the client. We haven't figured out how long we have to wait.
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>
Is there a way to recover from this situation without having to wait?
Thank you.
Upvotes: 0
Views: 1215
Reputation: 7627
Your message format is not valid for this call.
The error clearly says: Expected to find node type 'Element' with name 'MyServiceNameMyOperationNameRequest' and namespace 'http://tempuri.org'. Found node type 'Element' with name 'MyServiceNamemyOperationNameRequest' and namespace ''
You have to add namespace
attribute to the request ('http://tempuri.org
).
Upvotes: 0