}
throw f;
}
if (mpi.getTypeClass() != null) {
Header param = findHeader(message, mpi);
Object object = null;
if (param != null) {
message.getHeaders().remove(param);
if (param.getDataBinding() == null) {
Node source = (Node)param.getObject();
if (source instanceof Element) {
//need to remove these attributes as they
//would cause validation failures
Element el = (Element)source;
el.removeAttributeNS(soapVersion.getNamespace(),
soapVersion.getAttrNameMustUnderstand());
el.removeAttributeNS(soapVersion.getNamespace(),
soapVersion.getAttrNameRole());
}
if (supportsNode) {
object = getNodeDataReader(message).read(mpi, source);
} else {
W3CDOMStreamReader reader = new W3CDOMStreamReader((Element)source);
try {
reader.nextTag(); //advance into the first tag
} catch (XMLStreamException e) {
//ignore
}
object = getDataReader(message, XMLStreamReader.class).read(mpi, reader);
}
} else {
object = param.getObject();
}
}
parameters.put(mpi, object);
}