.net 调用 cxf接口报错,求大神帮忙参考下,100分求助
我在服务引用中添加了接口,然后调用接口中的方法,报错如下
用户代码未处理 System.ServiceModel.ProtocolException
HResult=-2146233087
Message=响应消息的内容类型 multipart/related; type="application/xop+xml"; boundary="----=_Part_0_4315167.1407191370328"; start="<root.message@cxf.apache.org>"; start-info="text/xml" 与绑定(text/xml; charset=utf-8)的内容类型不匹配。如果使用自定义编码器,请确保正确实现 IsContentTypeSupported 方法。响应的前 627 个字节为:“
------=_Part_0_4315167.1407191370328
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:GetCkxxResponse xmlns:ns1="http://server.webservice.yuyue.dongcheng.asop.com/"><return>2014年08月05日,已预约到 09:24:00,已预约到 13:12:00,1,1,星期二</return><return>2014年08月06日,已预约到 09:06:00,已预约到 13:00:00,1,1,星期三</return></ns1:GetCkxxResponse></soap:Body></soap:Envelope>
------=_Part_0_4315167.1407191370328--”。
Source=mscorlib
StackTrace:
Server stack trace:
在 System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding)
在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
在 System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Handler.SocialServiceReference.WebReviewService.GetCkxx(GetCkxx request)
在 Handler.SocialServiceReference.WebReviewServiceClient.Handler.SocialServiceReference.WebReviewService.GetCkxx(GetCkxx request) 位置 E:\xxx
在 Handler.SocialServiceReference.WebReviewServiceClient.GetCkxx(Int64 arg0, Int64 arg1) 位置 E:\xxx
在 Handler.test.HelloWorld() 位置 E:\xxx