// TODO
//if (isAsyncHandler(param)) {
// continue;
//}
Block block = null;
JAXBBlockContext context = new JAXBBlockContext(packages);
AttachmentDescription attachmentDesc = pd.getAttachmentDescription();
if (attachmentDesc == null) {
// Normal Processing: Not an Attachment
// Trigger unmarshal by java type if necessary
if (unmarshalByJavaType != null && unmarshalByJavaType[i] != null) {
context.setProcessType(unmarshalByJavaType[i]);
context.setIsxmlList(pd.isListType());
}
boolean consume = true;
// Unmarshal the object into a JAXB object or JAXBElement
if (pd.isHeader()) {
// Get the Block from the header
// NOTE The parameter name is always used to get the header
// element...even if the style is RPC.
String localName = pd.getParameterName();
block = message.getHeaderBlock(pd.getTargetNamespace(),
localName,
context,
factory);
consume = false;
} else {
if (totalBodyBlocks > 1) {
// You must use this method if there are more than one body block
// This method may cause OM expansion
block = message.getBodyBlock(index, context, factory);
} else {
// Use this method if you know there is only one body block.
// This method prevents OM expansion.
block = message.getBodyBlock(context, factory);
}
index++;
}
Element element;
if (block != null) {
element = new Element(block.getBusinessObject(true),
block.getQName());
} else {
// The block could be null if the header is missing (which is allowed)
QName qName = new QName(pd.getTargetNamespace(),pd.getParameterName());
if (log.isDebugEnabled()) {
log.debug("There is no value in the incoming message for " + qName);