final TextElement subSubcodeElement = new TextElement(streamReader) ;
soapFault.setSubSubcode(QNameHelper.toQName(streamReader.getNamespaceContext(), subSubcodeElement.getText())) ;
if (!StreamHelper.checkParentFinished(streamReader))
{
// Throw away any subcodes as we only support two level.
new AnyElement(streamReader) ;
if (!StreamHelper.checkParentFinished(streamReader))
{
final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.soap.Soap12Details_1") ;
final String message = MessageFormat.format(pattern, new Object[] {streamReader.getName()}) ;
throw new XMLStreamException(message) ;
}
}
if (!StreamHelper.checkParentFinished(streamReader))
{
final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.soap.Soap12Details_1") ;
final String message = MessageFormat.format(pattern, new Object[] {streamReader.getName()}) ;
throw new XMLStreamException(message) ;
}
}
if (!StreamHelper.checkParentFinished(streamReader))
{
final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.soap.Soap12Details_1") ;
final String message = MessageFormat.format(pattern, new Object[] {streamReader.getName()}) ;
throw new XMLStreamException(message) ;
}
}
// Reason processing
StreamHelper.checkNextStartTag(streamReader, QNAME_REASON) ;
StreamHelper.checkNextStartTag(streamReader, QNAME_TEXT) ;
final TextElement reasonElement = new TextElement(streamReader) ;
soapFault.setReason(reasonElement.getText()) ;
if (!StreamHelper.checkParentFinished(streamReader))
{
final String pattern = WSCLogger.log_mesg.getString("com.arjuna.webservices.soap.Soap12Details_1") ;
final String message = MessageFormat.format(pattern, new Object[] {streamReader.getName()}) ;
throw new XMLStreamException(message) ;
}
if (StreamHelper.checkParentFinished(streamReader))
{
return soapFault ;
}
// Node if present
if (QNAME_NODE.equals(streamReader.getName()))
{
final TextElement nodeElement = new TextElement(streamReader) ;
soapFault.setNode(nodeElement.getText()) ;
if (StreamHelper.checkParentFinished(streamReader))
{
return soapFault ;
}
}
// Role if present
if (QNAME_ROLE.equals(streamReader.getName()))
{
final TextElement roleElement = new TextElement(streamReader) ;
soapFault.setRole(roleElement.getText()) ;
if (StreamHelper.checkParentFinished(streamReader))
{
return soapFault ;
}
}
// Detail if present
if (QNAME_DETAIL.equals(streamReader.getName()))
{
soapFault.setDetailElement(new NamedElement(null, new AnyElement(streamReader))) ;
if (StreamHelper.checkParentFinished(streamReader))
{
return soapFault ;
}
}