I have created a web service in php using `SOAPServer`. It expects to see a `SoapHeader` `UsernameToken` with username and password elements. Everything actually works fine when I include this header in the request. Just by defining a method in the Soap handler class named "UsernameToken" this method is called and the stdClass Obj is passed to it. I can then validate user by `$Obj->username` and `$Obj->password`.

What I don't know is what to add to the WSDL file to first of all define this `UsernameToken` header and second how to indicate in WSDL that it is required?

I've read somewhere that new SOAP standard deprecated the notion of "required" header.

Any advice on how to at least indicate is my wsdl that request should include this header?