com.sun.xml.ws.message
Class RelatesToHeader

java.lang.Object
  extended by com.sun.xml.ws.message.AbstractHeaderImpl
      extended by com.sun.xml.ws.message.StringHeader
          extended by com.sun.xml.ws.message.RelatesToHeader
All Implemented Interfaces:
Header

public final class RelatesToHeader
extends StringHeader

WS-Addressing <RelatesTo> header. Used for outbound only.


Field Summary
protected  String type
           
 
Fields inherited from class com.sun.xml.ws.message.StringHeader
name, value
 
Fields inherited from class com.sun.xml.ws.message.AbstractHeaderImpl
EMPTY_ATTS
 
Constructor Summary
RelatesToHeader(QName name, String mid)
           
RelatesToHeader(QName name, String messageId, String type)
           
 
Method Summary
 String getType()
           
 void writeTo(javax.xml.soap.SOAPMessage saaj)
          Writes out the header to the given SOAPMessage.
 void writeTo(javax.xml.stream.XMLStreamWriter w)
          Writes out the header as a fragment.
 
Methods inherited from class com.sun.xml.ws.message.StringHeader
getAttribute, getLocalPart, getNamespaceURI, readHeader, writeTo
 
Methods inherited from class com.sun.xml.ws.message.AbstractHeaderImpl
getAttribute, getRole, getStringContent, isIgnorable, isRelay, parseBool, readAsEPR, readAsJAXB, readAsJAXB, readAsJAXB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected String type
Constructor Detail

RelatesToHeader

public RelatesToHeader(QName name,
                       String messageId,
                       String type)

RelatesToHeader

public RelatesToHeader(QName name,
                       String mid)
Method Detail

getType

public String getType()

writeTo

public void writeTo(javax.xml.stream.XMLStreamWriter w)
             throws javax.xml.stream.XMLStreamException
Description copied from interface: Header
Writes out the header as a fragment.

Specified by:
writeTo in interface Header
Overrides:
writeTo in class StringHeader
Throws:
javax.xml.stream.XMLStreamException - if the operation fails for some reason. This leaves the writer to an undefined state.

writeTo

public void writeTo(javax.xml.soap.SOAPMessage saaj)
             throws javax.xml.soap.SOAPException
Description copied from interface: Header
Writes out the header to the given SOAPMessage.

Sometimes a Message needs to produce itself as SOAPMessage, in which case each header needs to turn itself into a header.

Specified by:
writeTo in interface Header
Overrides:
writeTo in class StringHeader
Throws:
javax.xml.soap.SOAPException - if the operation fails for some reason. This leaves the writer to an undefined state.