Working with HeadersHeaders are an important component to web services as they allow web services to process a message without parsing the body of a SOAP message. The body will contain information directly related to the web service operation being invoked. However, a header generally contains more general content that is used to invoke any of the web service operations. For example, a header may contain a username and password. It is useful to include the username and password as a header, because a separate component can be used to process the username and password without needing to know anything about the body. The Web Services Package supports headers by including the header as part of the function signature of an operation. So it will look like any other parameter of the operation. If an operation requires a header that consists of an authentication object that includes two strings defining the username and password, then a compound object consisting of these two strings will be expected when calling this function.
|