Name

MimeHeaders

Synopsis

public class MimeHeaders {
// Public Constructors
    public MimeHeaders(  ); 
// Public Instance Methods
    public void addHeader( String name, String value); 
    public Iterator getAllHeaders(  );
               // default:Itr
    public String[ ] getHeader( String name); 
    public Iterator getMatchingHeaders(String[ ] names); 
    public Iterator getNonMatchingHeaders(String[ ] names); 
    public void removeAllHeaders(  ); 
    public void removeHeader( String name); 
    public void setHeader( String name, String value); 
}

MimeHeaders is a container class that represents a group of MIME headers associated with a SOAP message. A message that has no attachments has a single set of MIME headers that can be obtained by calling the getMimeHeaders( ) method of its SOAPMessage object. A message with attachments has additional sets of independent MIME headers associated with the SOAP envelope (available from the SOAPPart object) and with each attachment.

MimeHeaders manages a set of MimeHeader objects, each of which represents a single header name/value combination. It is possible for a header to have multiple values, in which case each value has its own MimeHeader object. The addHeader( ) method creates a new entry with a given name and value, leaving all existing entries with the same name intact. The setHeader( ) method adds a new entry if a header with the given name does not already exist; otherwise, it replaces the value of the first header in the collection with the given name, as illustrated by the following ...

Get Java Web Services in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.