asp.netアプリケーションでWebサービスを呼び出します。
MyService s = new MyService();
s.myMethod();
s.myMethod()
戻り値 :
System.ServiceModel.CommunicationException: A body element was not found inside the message envelope.
Server stack trace:
at System.ServiceModel.Channels.ReceivedMessage.VerifyStartBody(XmlDictionaryReader reader, EnvelopeVersion version)
at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData, RecycledMessageState recycledMessageState, Boolean[] understoodHeaders, Boolean understoodHeadersModified)
at System.ServiceModel.Channels.TextMessageEncoderFactory.TextMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)
at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception& requestException)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
これで、MyServiceが稼働していると確信しています。また、このエラーは常に発生するわけではありません。
MyServiceは別のマシンで動作します。MyServiceのログファイルを見ると、リクエストが処理されていることがわかります。
誰かが以前にこのエラーメッセージに遭遇したことがありますか?