java.lang.Object
com.sun.xml.ws.api.message.Headers
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 Summary
Modifier and TypeMethodDescriptionstatic Headercreate(SOAPVersion soapVersion, XMLStreamReader reader) Creates a newHeaderthat reads fromXMLStreamReader.static Headercreate(BindingContext context, Object o) static Headerstatic HeaderCreates aHeaderbacked a by a JAXB bean.static Headercreate(jakarta.xml.soap.SOAPHeaderElement header) Creates a newHeaderbacked by a SAAJ object.static HeaderCreates a newHeaderthat that has a single text value in it (IOW, of the form <foo>text</foo>.)static Headerstatic HeadercreateMustUnderstand(SOAPVersion soapVersion, QName name, String value) Creates a newHeaderthat that has a single text value in it (IOW, of the form <foo>text</foo>.)
-
Method Details
-
create
Creates aHeaderbacked a by a JAXB bean. -
create
-
create
-
create
Creates a newHeaderbacked by a SAAJ object. -
create
-
create
public static Header create(SOAPVersion soapVersion, XMLStreamReader reader) throws XMLStreamException Creates a newHeaderthat reads fromXMLStreamReader.Note that the header implementation will read the entire data into memory anyway, so this might not be as efficient as you might hope.
- Throws:
XMLStreamException
-
create
Creates a newHeaderthat that has a single text value in it (IOW, of the form <foo>text</foo>.)- Parameters:
name- QName of the header elementvalue- text value of the header
-
createMustUnderstand
public static Header createMustUnderstand(@NotNull SOAPVersion soapVersion, @NotNull QName name, @NotNull String value) Creates a newHeaderthat that has a single text value in it (IOW, of the form <foo>text</foo>.)- Parameters:
name- QName of the header elementvalue- text value of the header
-