if(compExtCtxClass == null)
{
String msg = getErrorReporter().getFormattedMessage("WSDL015",
new Object[] {extNamespace.toString(), parentClass.getName()});
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL015: " + msg);
}
ComponentExtensionContext compExtCtx = null;
/* TODO remove with woden-47
try {
compExtCtx = (ComponentExtensionContext)compExtCtxClass.newInstance();
}
catch (InstantiationException e)
{
String msg = getErrorReporter().getFormattedMessage("WSDL009",
new Object[] {compExtCtxClass.getName()});
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
}
catch (IllegalAccessException e) {
String msg = getErrorReporter().getFormattedMessage("WSDL009",
new Object[] {compExtCtxClass.getName()});
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
}
*/
try {
Class[] ctorParms = new Class[] {WSDLComponent.class, URI.class, ErrorReporter.class};
Constructor ctor = compExtCtxClass.getConstructor(ctorParms);
Object[] ctorParmValues = new Object[] {parentComp, extNamespace, getErrorReporter()};
compExtCtx = (ComponentExtensionContext)ctor.newInstance(ctorParmValues);
}
catch (Exception e) {
//SecurityException
//NoSuchMethodException
//InvocationTargetException
//InstantiationException
//IllegalAccessException
String msg = getErrorReporter().getFormattedMessage("WSDL009",
new Object[] {compExtCtxClass.getName()});
throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
}
return compExtCtx;
}