SoapHeader Required=true not working

  • Thread starter Thread starter Martin Lapierre
  • Start date Start date
M

Martin Lapierre

I've got the following soap header attribute set:

[WebMethod]
[SoapHeader("m_UserInfo", Direction=SoapHeaderDirection.In, Required=true)]
public void SetTest()
{
....
}

The bad thing is, the requirement isn't working: the client can call the
method without the setting the header. What's missing???

Thanks
 
[WebMethod]
[SoapHeader("m_UserInfo", Direction=SoapHeaderDirection.In, Required=true)]
public void SetTest()
{
...
}

The bad thing is, the requirement isn't working: the client can call the
method without the setting the header. What's missing???
Are you using ASP .NET v1.1? If yes, please consider that as of this version
the "Required" attribute has been marked obsolete (see doc), and is not
working anymore:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwebservicesprotocolssoapheaderattributememberstopic.asp
http://www.gotdotnet.com/team/changeinfo/Backwards1.0to1.1/default.aspx#0000
0101
HTH
 
Back
Top