} else {
msg = operation.getOperationInfo().getOutput();
}
message.put(MessageInfo.class, msg);
MessageContentsList parameters = new MessageContentsList();
StaxUtils.nextEvent(xmlReader);
boolean hasNext = true;
Iterator<MessagePartInfo> itr = msg.getMessageParts().iterator();
while (itr.hasNext()) {
MessagePartInfo part = itr.next();
if (hasNext) {
hasNext = StaxUtils.toNextElement(xmlReader);
}
if (hasNext) {
QName qn = xmlReader.getName();
if (qn.equals(SOAP12_RESULT)) {
//just ignore this. The parts should work correctly.
try {
while (xmlReader.getEventType() != XMLStreamReader.END_ELEMENT) {
xmlReader.next();
}
xmlReader.next();
} catch (XMLStreamException e) {
//ignore
}
StaxUtils.toNextElement(xmlReader);
qn = xmlReader.getName();
}
// WSI-BP states that RPC/Lit part accessors should be completely unqualified
// However, older toolkits (Axis 1.x) are qualifying them. We'll go
// ahead and just match on the localpart. The RPCOutInterceptor
// will always generate WSI-BP compliant messages so it's unknown if
// the non-WSI-BP toolkits will be able to understand the CXF
// generated messages if they are expecting it to be qualified.
while (!qn.getLocalPart().equals(part.getConcreteName().getLocalPart())
&& itr.hasNext()) {
part = itr.next();
}
if (!qn.equals(part.getConcreteName())) {
throw new Fault(
new org.apache.cxf.common.i18n.Message(
"UNKNOWN_RPC_LIT_PART",
LOG,
qn));
}
try {
parameters.put(part, dr.read(part, xmlReader));
} catch (Fault f) {
if (!isRequestor(message)) {
f.setFaultCode(Fault.FAULT_CODE_CLIENT);
}
throw f;