}
OMNamespace ns = factory.createOMNamespace(namespace, reader.getPrefix());
InputStream payload = ContextListenerUtils.createPayloadElement(parsedStream, ns, localPart, parent,
nsElementDecls, attrElementDecls);
ParserInputStreamDataSource ds = new ParserInputStreamDataSource(payload, encoding);
OMSourcedElement om = null;
if (parent instanceof SOAPHeader && factory instanceof SOAPFactory) {
om = ((SOAPFactory)factory).createSOAPHeaderBlock(localPart, ns, ds);
} else {
om = factory.createOMElement(ds, localPart, ns);