Class Headers


  • public abstract class Headers
    extends Object
    Factory methods for various Header implementations.

    This class provides various methods to create different flavors of Header classes that store data in different formats.

    This is a part of the JAX-WS RI internal API so that Pipe implementations can reuse the implementations done inside the JAX-WS without having a strong dependency to the actual class.

    If you find some of the useful convenience methods missing from this class, please talk to us.

    Author:
    Kohsuke Kawaguchi
    • Method Detail

      • create

        public static Header create​(jakarta.xml.bind.JAXBContext context,
                                    Object o)
        Creates a Header backed a by a JAXB bean.
      • create

        public static Header create​(SOAPVersion soapVersion,
                                    jakarta.xml.bind.Marshaller m,
                                    QName tagName,
                                    Object o)
        Creates a Header backed a by a JAXB bean, with the given tag name. See create(SOAPVersion, Marshaller, Object) for the meaning of other parameters.
        Parameters:
        tagName - The name of the newly created header. Must not be null.
        o - The JAXB bean that represents the contents of the header. Must not be null.
      • create

        public static Header create​(org.glassfish.jaxb.runtime.api.Bridge bridge,
                                    Object jaxbObject)
        Deprecated.
        Creates a Header backed a by a JAXB bean.
      • create

        public static Header create​(jakarta.xml.soap.SOAPHeaderElement header)
        Creates a new Header backed by a SAAJ object.
      • create

        public static Header create​(QName name,
                                    String value)
        Creates a new Header that that has a single text value in it (IOW, of the form <foo>text</foo>.)
        Parameters:
        name - QName of the header element
        value - text value of the header
      • createMustUnderstand

        public static Header createMustUnderstand​(@NotNull
                                                  SOAPVersion soapVersion,
                                                  @NotNull
                                                  QName name,
                                                  @NotNull
                                                  String value)
        Creates a new Header that that has a single text value in it (IOW, of the form <foo>text</foo>.)
        Parameters:
        name - QName of the header element
        value - text value of the header