本文介绍了如何在使用ServiceHost时指定SOAP版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是WCF和Web开发的新手,所以希望有人可以回答这个简单的问题:


我正在使用.Net 4.0中的ServiceHost创建一个网站将从开源CXF客户端调用的服务。但是当我尝试进行Web服务调用时,我在CXF中得到一个异常:

 faultCode = INVALID_WSDL:期望元素'{http://schemas.xmlsoap。 org / wsdl /} definitions'

据说CXF只支持SOAP 1.1。  WCF默认使用SOAP 1.2吗?如果是这种情况,我如何指定我需要SOAP 1.1?


提前感谢您对此的任何帮助。

解决方案

I am new to WCF and web development in general, so hopefully someone can answer this simple question:

I am using ServiceHost in .Net 4.0 to create a web service that will be called from an open source CXF client. But when I try to make the web service call, I get an exception in CXF that states:

faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'

Supposedly CXF only supports SOAP 1.1. Does WCF use SOAP 1.2 by default? If that is the case, how can I specify that I need SOAP 1.1?

Thanks in advance for any help with this.

解决方案


这篇关于如何在使用ServiceHost时指定SOAP版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 23:28