while (token != XMLStreamReader.END_ELEMENT) {
if (token == XMLStreamReader.CHARACTERS) {
OMText text = factory.createText(value, parser.getText());
value.addChild(text);
} else {
throw new SOAPProcessingException("Only Characters are allowed here");
}
token = parser.next();
}
} catch (XMLStreamException e) {
throw new SOAPProcessingException(e);
}
}