While reading SOAP I came across the concept of understanding role. My question is how a soap Node acquire a specific role? For example if a soap message is send to an end point with a role header set to say "http://myrole.com" then how the reciever says I am in that specific role? Is it up to the recieving node who inspects the header and decide that I am in this role?
A SOAP node must be coded or configured, in order to be able to know which role it is in.
Your understanding about having to inspect the header blocks is correct; the SOAP node must inspect the headers and process headers as stipulated by the SOAP specification and the Basic Profile.