Taverna has now moved to the Apache Software Foundation. For updated information, see Apache Taverna (incubating).

XMLHandler

A class that implements the org.embl.ebi.escience.scuflworkers.XMLHandler interface specifies how the information relevant to instances of a service of a given type should be serialized and deserialized in XML.

The name of the new class must be specified for an xml property within a taverna.properties file within the appropriate resources/META-INF directory. The full name of the xml property is determined by the corresponding ProcessorInfoBean extension.

Example

org.embl.ebi.escience.scuflworkers.wsdl.WSDLXMLHandler implements the org.embl.ebi.escience.scuflworkers.XMLHandler interface.

public class WSDLXMLHandler implements XMLHandler {

	public Element elementForProcessor(Processor p) {
		WSDLBasedProcessor wsdlp = (WSDLBasedProcessor) p;
		return getElement(wsdlp.getWSDLLocation(), wsdlp.getOperationName());
	}

	public Element elementForFactory(ProcessorFactory pf) {
		WSDLBasedProcessorFactory factory = (WSDLBasedProcessorFactory) pf;
		return getElement(factory.getWSDLLocation(), factory.getOperationName());
	}

	public Processor loadProcessorFromXML(Element processorNode,
			ScuflModel model, String name) throws ProcessorCreationException,
			DuplicateProcessorNameException, XScuflFormatException {
		...
	}

	public ProcessorFactory getFactory(Element specElement) {
		...
	}

	private Element getElement(String wsdlLocation, String operationName) {
		...
	}
}

The taverna.properties file should contain the line:

taverna.processor.arbitrarywsdl.xml = org.embl.ebi.escience.scuflworkers.wsdl.WSDLXMLHandler