简体   繁体   中英

How to set WCF service to check SOAP Header

I had a .asmx web service that check parameters of soap header like this:

    public class Credential : SoapHeader
    {
        public string username;
        public string password;
    }

    [WebMethod]
    [SoapHeader("ClientCredential")]
    public BE78[] Get78(BE78Equal equal, ref ResponseInfo info)

now, i want to re-implement something like this with WCF service. How can I do that without adding ClientCredential as input parameter of the service?

这很好地说明了如何实现您的要求: 如何为每个WCF调用添加自定义HTTP标头?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM