开发者

Calling Java Web Service from .NET Window Service issue

开发者 https://www.devze.com 2023-02-04 12:28 出处:网络
Does anyone have any idea why I am getting \"Unrecognised Message Version\" exception error back when calling a web service written in java?

Does anyone have any idea why I am getting "Unrecognised Message Version" exception error back when calling a web service written in java?

this is the stacktrace: System.ServiceModel.CommunicationException: Unrecognized message version. Server stack trace: at System.ServiceModel.Channels.ReceivedMessage.ReadStartEnvelope(XmlDictionaryReader reader) 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.MessageEncoder.ReadMessage(Stream stream, BufferManager bufferManager, Int32 maxBufferSize, String contentType) at System.ServiceModel.Channels.HttpInput.ReadChunkedBufferedMessage(Stream inputStream) at System.ServiceModel.Chann开发者_JS百科els.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.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) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

Basically, all i have in hand is the endpoint address and login credentials. So what i did was putting that endpoint into IE and save it as WSDL file.

Then I run the WSDL file against Svcutil to generate the C# code. which I can then use in my window service to invoke the web service.

Is there anything wrong with that process?

Any help would be appreciated.

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号