I created a web service in php using SOAPServer . He expects to see a SoapHeader UsernameToken with username and password elements. Everything works fine when I include this header in the request. By simply defining a method in the Soap handler class named "UsernameToken", this method is called and stdClass Obj is passed to it. Then I can check the user for $Obj->username and $Obj->password .
I donโt know what to add to the WSDL file, first of all, to define this UsernameToken header and the second, how to indicate in the WSDL that this is necessary?
I read somewhere that the new SOAP standard does not endorse the concept of a โmandatoryโ header.
Any advice on how to at least indicate this is my wsdl that should include this header?
source share