validateRequest(operation,version,uddiReq);
// Lookup the appropriate XML handler. Throw an
// UnsupportedException if one could not be located.
HandlerMaker maker = HandlerMaker.getInstance();
IHandler requestHandler = maker.lookup(operation);
if (requestHandler == null)
throw new UnsupportedException("The UDDI service operation " +
"specified is unknown or unsupported: " +operation);
// Unmarshal the raw xml into the appropriate jUDDI
// request object.
RegistryObject uddiReqObj = requestHandler.unmarshal(uddiReq);
// Grab a reference to the shared jUDDI registry
// instance (make sure it's running) and execute the
// requested UDDI function.
RegistryObject uddiResObj = null;
RegistryEngine registry = RegistryServlet.getRegistry();
if ((registry != null) && (registry.isAvailable()))
uddiResObj = registry.execute(uddiReqObj);
else
throw new BusyException("The Registry is currently unavailable.");
// Lookup the appropriate response handler which will
// be used to marshal the UDDI object into the appropriate
// xml format.
IHandler responseHandler = maker.lookup(uddiResObj.getClass().getName());
if (responseHandler == null)
throw new FatalErrorException("The response object " +
"type is unknown: " +uddiResObj.getClass().getName());
// Create a new 'temp' XML element to use as a container