parameter.setValue(element);
return parameter;
}
private void processListener(AxisConfigurationImpl axisGlobal) throws DeploymentException {
AxisObserver observer = null;
int attribCount = pullparser.getAttributeCount();
if (attribCount == 1) {
String attname = pullparser.getAttributeLocalName(0);
String attvalue = pullparser.getAttributeValue(0);
if (CLASSNAME.equals(attname)) {
try {
Class observerclass = Class.forName(attvalue, true, Thread.currentThread().
getContextClassLoader());
observer = (AxisObserver) observerclass.newInstance();
} catch (ClassNotFoundException e) {
throw new DeploymentException(e);
} catch (IllegalAccessException e) {
throw new DeploymentException(e);
} catch (InstantiationException e) {
throw new DeploymentException(e);
}
}
} else {
throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.BAD_LIST_ARGU));
}
boolean END_LISTENER = false;
try {
while (!END_LISTENER) {
int eventType = pullparser.next();
if (eventType == XMLStreamConstants.END_DOCUMENT) {
END_LISTENER = true;
} else if (eventType == XMLStreamConstants.START_ELEMENT) {
String tagnae = pullparser.getLocalName();
if (tagnae.equals(PARAMETERST)) {
Parameter parameter = processParameter();
observer.addParameter(parameter);
} else {
throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
}
} else if (eventType == XMLStreamConstants.END_ELEMENT) {
String endtagname = pullparser.getLocalName();
if (LISTENERST.equals(endtagname)) {
END_LISTENER = true;
break;
}
} else if (eventType == XMLStreamConstants.CHARACTERS) {
}
}
} catch (XMLStreamException e) {
throw new DeploymentException(e);
} catch (Exception e) {
throw new DeploymentException(e);
}
observer.init();
axisGlobal.addObservers(observer);
}