Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01

weblogic.wsee.message
Class MsgHeader

java.lang.Object
  extended by weblogic.wsee.message.MsgHeader
All Implemented Interfaces:
Serializable

public abstract class MsgHeader
extends Object
implements Serializable

A message header

See Also:
Serialized Form

Constructor Summary
MsgHeader()
           
 
Method Summary
protected  void addStandardNamespaces(Element element)
          Adds standard namespace declarations like xmlns:env and xmlns:wsu.
protected  String getCurrentSoapEnvelopeNamespace()
          The current SOAP envelope namespace in force during the writeToParent method invocation.
abstract  QName getName()
          Gets the name of the header
 String getRole()
          Gets the role targeted by this header.
abstract  MsgHeaderType getType()
          Gets the type of message header
 boolean hasDuplicated()
          Has duplicated header or not.
 boolean isMultiple()
          Determines if this header can appear multiple times in SOAP header.
 boolean isMustUnderstand()
          Determines if this header must be understood by the received node
 boolean isRefParam()
          Determines if this header is a reference parameter
abstract  void read(Element element)
          Reads the header
 void setDuplicated(boolean duplicated)
          Set duplicated flag marks this header is duplicated, so we can detect it later and throw standard WS-Addressing exception instead of throwing duplicated header exception when parsing headers.
 void setMustUnderstand(boolean mustUnderstand)
          Marks whether this header must be understood by the receiving node
 void setRefParam(boolean refParam)
          Marks whether this header is a reference parameter
 void setRole(String role)
          Sets the role targeted by this header.
 String toString()
           
 void toString(ToStringWriter writer)
           
abstract  void write(Element element)
          Writes the header
 Element writeToParent(Element parentElt)
          Writes the header
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MsgHeader

public MsgHeader()
Method Detail

getType

public abstract MsgHeaderType getType()
Gets the type of message header

Returns:
The type of message header

getName

public abstract QName getName()
Gets the name of the header

Returns:
The name of the header

read

public abstract void read(Element element)
                   throws MsgHeaderException
Reads the header

Parameters:
element - The XML element containing the header data
Throws:
MsgHeaderException

write

public abstract void write(Element element)
                    throws MsgHeaderException
Writes the header

Parameters:
element - The XML element to contain the header data
Throws:
MsgHeaderException

isMultiple

public boolean isMultiple()
Determines if this header can appear multiple times in SOAP header.


getCurrentSoapEnvelopeNamespace

protected String getCurrentSoapEnvelopeNamespace()
The current SOAP envelope namespace in force during the writeToParent method invocation. Subclasses can use this method to do SOAP version specific operations.


writeToParent

public Element writeToParent(Element parentElt)
                      throws MsgHeaderException
Writes the header

Parameters:
parentElt - The parent XML element
Throws:
MsgHeaderException

addStandardNamespaces

protected void addStandardNamespaces(Element element)
Adds standard namespace declarations like xmlns:env and xmlns:wsu. Subclasses may feel free to override this method to add their own, or prevent the addition of standard declarations. Note, however, that having the SOAP envelope namespace declared and bound to env: is important for mustUnderstand headers because we put the attribute into the header element using a qualified name 'env:mustUnderstand'.


setMustUnderstand

public void setMustUnderstand(boolean mustUnderstand)
Marks whether this header must be understood by the receiving node

Parameters:
mustUnderstand - true if this header must be understood

isMustUnderstand

public boolean isMustUnderstand()
Determines if this header must be understood by the received node

Returns:
true if this header must be understood

setRefParam

public void setRefParam(boolean refParam)
Marks whether this header is a reference parameter

Parameters:
refParam - true if this header is a reference parameter

isRefParam

public boolean isRefParam()
Determines if this header is a reference parameter

Returns:
true if this header is a reference parameter

setDuplicated

public void setDuplicated(boolean duplicated)
Set duplicated flag marks this header is duplicated, so we can detect it later and throw standard WS-Addressing exception instead of throwing duplicated header exception when parsing headers.

Parameters:
duplicated -

hasDuplicated

public boolean hasDuplicated()
Has duplicated header or not.

Returns:
true if this header has duplicated copy.

getRole

public String getRole()
Gets the role targeted by this header. If null the header is targeted at the ultimate receiver

Returns:
The role targeted by the header.

setRole

public void setRole(String role)
Sets the role targeted by this header.

Parameters:
role - The role targeted by this header

toString

public void toString(ToStringWriter writer)

toString

public String toString()
Overrides:
toString in class Object

Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01