StAXArtifactProcessorExtensionPoint artifactExtensionPoint = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
StAXArtifactProcessor<Object> extensibleStAXProcessor = new ExtensibleStAXArtifactProcessor(artifactExtensionPoint, inputFactory, outputFactory);
StAXAttributeProcessorExtensionPoint attributeExtensionPoint = registry.getExtensionPoint(StAXAttributeProcessorExtensionPoint.class);
StAXAttributeProcessor<Object> extensibleStAXAttributeProcessor = new ExtensibleStAXAttributeProcessor(attributeExtensionPoint, inputFactory, outputFactory);
WSPolicyProcessor processor = new WSPolicyProcessor(new DefaultExtensionPointRegistry(),
extensibleStAXProcessor,
extensibleStAXAttributeProcessor);
Object artifact = null;
QName name = null;
reader.next();
while (true) {
int event = reader.getEventType();
switch (event) {
case START_ELEMENT: {
name = reader.getName();
if (WSPolicy.WS_POLICY_QNAME.equals(name)) {
artifact = processor.read(reader, new ProcessorContext());
}
break;
}
}