The actor Attribute
  • The actor attribute is used to direct a header block to a particular endpoint.
  • The actor attribute, if not specified, indicates that the message is intended for the final recipient.
  • The syntax for the actor attribute is actor="namespaceURI"

In the code example, the actor attribute is used in the Header element. The path name http://www.school.com/stock/ is the namespaceURI that indicates the endpoint.

<?xml version="1.0"?>

<Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
encodingStyle="http://www.w3.org/2001/12/soap-encoding">

  <Header>
  <m:Trans
  xmlns:m="http://www.school.com/transaction/"   
soap:actor="http://www.school.com/stock/">
  </m:Trans>
  </Header>

  <Body>
    ...
    ...
    <Fault>
      ...
      ...
    </Fault>
  </Body>

</Envelope>

Click the Next button to continue.