Consume WCF service using add web reference and add a soap header

你说的曾经没有我的故事 提交于 2019-12-07 19:32:50

问题


I have a WCF 4 web service that checks for a soap header. This works fine with a WCF client but I have a customer that needs to use the old web reference from their app. How do you consume a WCF service using Add Web Reference and the add a SOAP header in the client? Lets keep it simple and say I want to pass a country in a header, so the header name will be country.

Thanks, Paul


回答1:


You need to expose your endpoint across the basicHttpBinding in order to interoperate with pre .net 3.0 clients.

UPDATE

Does this help? http://msmvps.com/blogs/paulomorgado/archive/2007/04/27/wcf-building-an-http-user-agent-message-inspector.aspx



来源:https://stackoverflow.com/questions/8581831/consume-wcf-service-using-add-web-reference-and-add-a-soap-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!