*/
static ArrayList EMPTY_LIST = new ArrayList();
public static ArrayList getHeaderParamaterList(MessageContext msgContext) {
ArrayList headers = null;
// Build a list of understood headers for all the operations under the service
AxisService axisService = msgContext.getAxisService();
if (log.isDebugEnabled()) {
log.debug("Building list of understood headers for all operations under " + axisService);
}
if (axisService == null) {
headers = EMPTY_LIST;
} else {
// Get the understood headers from the sei methods
ArrayList seiMethodHeaders = (ArrayList)
axisService.getParameterValue("seiMethodHeaderParameter");
if (seiMethodHeaders == null) {
// examine SEI methods
seiMethodHeaders = new ArrayList();
Iterator operationIterator = axisService.getOperations();
if (operationIterator != null) {
while (operationIterator.hasNext()) {
AxisOperation operation = (AxisOperation) operationIterator.next();
ArrayList list = getSEIMethodHeaderParameterList(operation);
if (log.isDebugEnabled()) {
log.debug("Adding headers from operation " + operation + "; headers = "
+ list);
}
if (list != null && !list.isEmpty()) {
seiMethodHeaders.addAll(list);
}
}
}
try {
// Save calculated value since this won't change
axisService.addParameter("seiMethodHeaderParameter", seiMethodHeaders);
} catch (AxisFault e) {
if (log.isDebugEnabled()) {
log.debug("Problem caching seiMethodHeaderParameter. " +
"Processing continues without cached value");
}