XMLOutputSplitterActivity extends
		AbstractAsynchronousActivity<JsonNode> implements
		OutputPortTypeDescriptorActivity { public TypeDescriptor getTypeDescriptorForOutputPort(String portName) { TypeDescriptor result = null; if (typeDescriptor instanceof ComplexTypeDescriptor) { for (TypeDescriptor desc : ((ComplexTypeDescriptor) typeDescriptor) .getElements()) { if (desc.getName().equals(portName)) { result = desc; break; } } } else if (typeDescriptor instanceof ArrayTypeDescriptor) { TypeDescriptor desc = ((ArrayTypeDescriptor)typeDescriptor).getElementType(); if (typeDescriptor.getName().equals(portName)) { result = desc; } } return result; }  @Override void configure(JsonNode configBean); @Override void executeAsynch(final Map<String, T2Reference> data,
			final AsynchronousActivityCallback callback); @Override JsonNode getConfiguration(); TypeDescriptor getTypeDescriptorForOutputPort(String portName); @Override Map<String, TypeDescriptor> getTypeDescriptorsForOutputPorts(); static final String URI; }
@Test public void testGetTypeDescriptorForOutputPort() throws Exception { String xml = "<s:extensions xmlns:s=\"http: Element element = new SAXBuilder().build(new StringReader(xml)).getRootElement(); JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForOutput(element); XMLOutputSplitterActivity a = new XMLOutputSplitterActivity(); a.setEdits(new EditsImpl()); a.configure(bean); assertNotNull("There should be a descriptor for the port getPersonReturn",a.getTypeDescriptorForOutputPort("getPersonReturn")); assertTrue("The descriptor should be complex",a.getTypeDescriptorForOutputPort("getPersonReturn") instanceof ComplexTypeDescriptor); }