private void flattenChildType(String name, Central central, String current, List list) throws ProcessorCreationException { MobyDataType dt = null; try { dt = central.getDataType(name); } catch (MobyException e) { throw new ProcessorCreationException( "There was a problem getting information from the MobyCentral registry at " + this.registryEndpoint + System.getProperty("line.separator") + e.getLocalizedMessage()); } catch (NoSuccessException e) { throw new ProcessorCreationException( "There was no success in getting information from the MobyCentral registry at " + this.registryEndpoint + System.getProperty("line.separator") + e.getLocalizedMessage()); } processDatatype(dt, central, current, list); }
public void actionPerformed(ActionEvent ae) { String name = (String) JOptionPane.showInputDialog(UIUtils.getActionEventParentWindow(ae), "Name for the new processor?", "Name required", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name != null) { try { pf.createProcessor(name, ScavengerTreePopupHandler.this.scavenger.model); } catch (ProcessorCreationException pce) { JOptionPane.showMessageDialog(null, "Processor creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } catch (DuplicateProcessorNameException dpne) { JOptionPane.showMessageDialog(null, "Duplicate name : \n" + dpne.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } } });
parser = new WSDLParser(wsdlLocation); } catch (Exception e) { ProcessorCreationException pce = new ProcessorCreationException( procName + ": Unable to load wsdl at " + wsdlLocation); pce.initCause(e); logger.error(pce); throw pce; throw new ProcessorCreationException(procName + ": Unable to locate operation " + operationName + " in WSDL at " + wsdlLocation); } catch (Exception e) { ProcessorCreationException ex = new ProcessorCreationException( "Unable to process operation " + operationName + " in WSDL at " + wsdlLocation); ex.initCause(e); throw ex;
buildInputPortsFromQuery(); } catch (Exception ex) { ProcessorCreationException pce = new ProcessorCreationException( "Can't build output ports"); pce.initCause(ex); throw pce;
throw new ProcessorCreationException(name + ": The supplied endpoint url was \n malformed, endpoint was specified as '" + theEndpoint + "'");
public void actionPerformed(ActionEvent ae) { String defaultName = pf.getName(); String validName = ScavengerTreePopupHandler.this.scavenger.model .getValidProcessorName(defaultName); try { pf.createProcessor(validName, ScavengerTreePopupHandler.this.scavenger.model); } catch (ProcessorCreationException pce) { logger.error("Problem creating processor", pce); JOptionPane.showMessageDialog(null, "Processor creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } catch (DuplicateProcessorNameException dpne) { logger.error("Problem creating processor", dpne); JOptionPane.showMessageDialog(null, "Duplicate name : \n" + dpne.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } });
public Processor loadProcessorFromXML(Element processorNode, ScuflModel model, String name) throws ProcessorCreationException, DuplicateProcessorNameException, XScuflFormatException { Element workflowProcessor = processorNode.getChild("workflow",XScufl.XScuflNS); // See if we're being loaded from a URL, if so use the old mechanism to load. Element locationElement = workflowProcessor.getChild("xscufllocation",XScufl.XScuflNS); if (locationElement != null) { String definitionURL = workflowProcessor.getChild("xscufllocation",XScufl.XScuflNS).getTextTrim(); return new WorkflowProcessor(model, name, definitionURL); } else { // Loading from inlined workflow Element scuflElement = workflowProcessor.getChild("scufl",XScufl.XScuflNS); if (scuflElement == null) { // Neither location nor literal workflow, this is a fault throw new ProcessorCreationException("Neither XScufl location nor literal inlined workflow defined for nested workflow processor, failing!"); } // Otherwise have a full XScufl definition to use to populate the model with return new WorkflowProcessor(model, name, scuflElement); } }
System.out.println("Cannot read 2" + e.getMessage()); } catch (ProcessorCreationException e) { System.out.println("Cannot read 3 " + e.getMessage()); } catch (DataConstraintCreationException e) { System.out.println("Cannot read 4" + e.getMessage());
/** * Construct a new processor with the given model to bind to, name and URL * of a workflow description to contain. */ public WorkflowProcessor(ScuflModel model, String name, String definitionURL) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); this.definitionURL = definitionURL; try { // Create a new model instance theInternalModel = new ScuflModel(); try { theInternalModel.setOffline(model.isOffline()); } catch (SetOnlineException soe) { // } // Populate from the definition URL XScuflParser.populate(new URL(definitionURL).openStream(), theInternalModel, null); buildPorts(); } catch (MalformedURLException mue) { throw new ProcessorCreationException("The supplied definition URL was malformed, specified as '" + definitionURL + "'"); } catch (Exception e) { e.printStackTrace(); throw new ProcessorCreationException("The workflow processor '" + name + "' caused an exception :\n" + e.getMessage() + "\n during creation. The exception had type :\n" + e.getClass().toString()); } }
System.out.println("Cannot read 2" + e.getMessage()); } catch (ProcessorCreationException e) { System.out.println("Cannot read 3 " + e.getMessage()); } catch (DataConstraintCreationException e) { System.out.println("Cannot read 4" + e.getMessage());
/** * Use the endpoint data to set the description field */ public void getDescriptionText() throws ProcessorCreationException { try { Map info = (Map) Soap.callWebService(endpoint.toString(), "getAnalysisType"); // Get the description element from the map String description = (String) info.get("description"); if (description != null) { setDescription(description); } } catch (ServiceException se) { throw new ProcessorCreationException(getName() + ": Unable to create a new call to connect to\n soaplab, error was : " + se.getMessage()); } catch (RemoteException re) { throw new ProcessorCreationException(getName() + ": Unable to call the get description method\n for XScufl processor " + getName() + "\nendpoint : " + endpoint.toString() + "\n Remote exception message " + re.getMessage()); } }
JOptionPane.showMessageDialog(null, "Processor creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); return;
private void init() throws ProcessorCreationException { // Find the service endpoint (by calling Moby registry) try { if (mobyObject == null) { worker = new CentralImpl(mobyEndpoint); mobyObject = worker.getDataType(this.serviceName); setEndpoint(mobyEndpoint); } } catch (Exception e) { if (e instanceof ProcessorCreationException) { throw (ProcessorCreationException) e; } throw new ProcessorCreationException(formatError(e.toString())); } }
init(); } catch (DuplicatePortNameException e) { throw new ProcessorCreationException( "There was an error creating the parser. If the error was service specific please contact the service provider." + e.getLocalizedMessage()); } catch (PortCreationException e) { throw new ProcessorCreationException( "There was an error creating the parser. If the error was service specific please contact the service provider." + e.getLocalizedMessage());
public NotificationProcessor(ScuflModel model, String name) throws ProcessorCreationException, DuplicateProcessorNameException { super(model, name); try { Port inputPort1 = new InputPort(this, "publishMessage"); Port inputPort2 = new InputPort(this, "Topic"); addPort(inputPort1); addPort(inputPort2); } catch (Exception e) { throw new ProcessorCreationException("Couldn't create NotificationProcessor"); } }
/** * Set the description field */ public void getDescriptionText() throws ProcessorCreationException { if (mobyObject.getDescription() != null) setDescription(mobyObject.getDescription()); else { try { // worker = new CentralImpl(this.mobyEndpoint); this.mobyObject = worker.getDataType(this.serviceName); } catch (MobyException e) { e.printStackTrace(); throw new ProcessorCreationException( "Error creating new CentralImpl in getDescriptionText. Processor not created"); } catch (NoSuccessException e) { e.printStackTrace(); throw new ProcessorCreationException( "Error getting data type in getDescriptionText. Processor not created"); } } }
bp.addPort(p); } catch (PortCreationException pce) { throw new ProcessorCreationException("Unable to create port! " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException("Unable to create port! " + dpne.getMessage()); bp.addPort(p); } catch (PortCreationException pce) { throw new ProcessorCreationException("Unable to create port! " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException("Unable to create port! " + dpne.getMessage());
init(); } catch (DuplicatePortNameException e) { throw new ProcessorCreationException( "There was an error creating the parser. If the error was service specific please contact the service provider." + e.getLocalizedMessage()); } catch (PortCreationException e) { throw new ProcessorCreationException( "There was an error creating the parser. If the error was service specific please contact the service provider." + e.getLocalizedMessage());
bp.addPort(p); } catch (PortCreationException pce) { throw new ProcessorCreationException( "Unable to create port! " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException( "Unable to create port! " + dpne.getMessage()); bp.addPort(p); } catch (PortCreationException pce) { throw new ProcessorCreationException( "Unable to create port! " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException( "Unable to create port! " + dpne.getMessage());
apProcessor.addPort(inputPort); } catch (PortCreationException pce) { throw new ProcessorCreationException( "Unable to create input port! " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException( "Unable to create input port! " + dpne.getMessage()); apProcessor.addPort(outputPort); } catch (PortCreationException pce) { throw new ProcessorCreationException( "Unable to create output port! " + pce.getMessage()); } catch (DuplicatePortNameException dpne) { throw new ProcessorCreationException( "Unable to create output port! " + dpne.getMessage());